#include <linux/log2.h>
#include <linux/circ_buf.h>
#include "sdma.h"
#include "verbs.h"
#include "trace_ibhdrs.h"
#include "ipoib.h"
#include "trace_tx.h"
#define CIRC_ADD(val, add, size) …
#define CIRC_NEXT(val, size) …
#define CIRC_PREV(val, size) …
struct ipoib_txparms { … };
static struct ipoib_txreq *
hfi1_txreq_from_idx(struct hfi1_ipoib_circ_buf *r, u32 idx)
{ … }
static u32 hfi1_ipoib_txreqs(const u64 sent, const u64 completed)
{ … }
static u64 hfi1_ipoib_used(struct hfi1_ipoib_txq *txq)
{ … }
static void hfi1_ipoib_stop_txq(struct hfi1_ipoib_txq *txq)
{ … }
static void hfi1_ipoib_wake_txq(struct hfi1_ipoib_txq *txq)
{ … }
static uint hfi1_ipoib_ring_hwat(struct hfi1_ipoib_txq *txq)
{ … }
static uint hfi1_ipoib_ring_lwat(struct hfi1_ipoib_txq *txq)
{ … }
static void hfi1_ipoib_check_queue_depth(struct hfi1_ipoib_txq *txq)
{ … }
static void hfi1_ipoib_check_queue_stopped(struct hfi1_ipoib_txq *txq)
{ … }
static void hfi1_ipoib_free_tx(struct ipoib_txreq *tx, int budget)
{ … }
static void hfi1_ipoib_drain_tx_ring(struct hfi1_ipoib_txq *txq)
{ … }
static int hfi1_ipoib_poll_tx_ring(struct napi_struct *napi, int budget)
{ … }
static void hfi1_ipoib_sdma_complete(struct sdma_txreq *txreq, int status)
{ … }
static int hfi1_ipoib_build_ulp_payload(struct ipoib_txreq *tx,
struct ipoib_txparms *txp)
{ … }
static int hfi1_ipoib_build_tx_desc(struct ipoib_txreq *tx,
struct ipoib_txparms *txp)
{ … }
static void hfi1_ipoib_build_ib_tx_headers(struct ipoib_txreq *tx,
struct ipoib_txparms *txp)
{ … }
static struct ipoib_txreq *hfi1_ipoib_send_dma_common(struct net_device *dev,
struct sk_buff *skb,
struct ipoib_txparms *txp)
{ … }
static int hfi1_ipoib_submit_tx_list(struct net_device *dev,
struct hfi1_ipoib_txq *txq)
{ … }
static int hfi1_ipoib_flush_tx_list(struct net_device *dev,
struct hfi1_ipoib_txq *txq)
{ … }
static int hfi1_ipoib_submit_tx(struct hfi1_ipoib_txq *txq,
struct ipoib_txreq *tx)
{ … }
static int hfi1_ipoib_send_dma_single(struct net_device *dev,
struct sk_buff *skb,
struct ipoib_txparms *txp)
{ … }
static int hfi1_ipoib_send_dma_list(struct net_device *dev,
struct sk_buff *skb,
struct ipoib_txparms *txp)
{ … }
static u8 hfi1_ipoib_calc_entropy(struct sk_buff *skb)
{ … }
int hfi1_ipoib_send(struct net_device *dev,
struct sk_buff *skb,
struct ib_ah *address,
u32 dqpn)
{ … }
static int hfi1_ipoib_sdma_sleep(struct sdma_engine *sde,
struct iowait_work *wait,
struct sdma_txreq *txreq,
uint seq,
bool pkts_sent)
{ … }
static void hfi1_ipoib_sdma_wakeup(struct iowait *wait, int reason)
{ … }
static void hfi1_ipoib_flush_txq(struct work_struct *work)
{ … }
int hfi1_ipoib_txreq_init(struct hfi1_ipoib_dev_priv *priv)
{ … }
static void hfi1_ipoib_drain_tx_list(struct hfi1_ipoib_txq *txq)
{ … }
void hfi1_ipoib_txreq_deinit(struct hfi1_ipoib_dev_priv *priv)
{ … }
void hfi1_ipoib_napi_tx_enable(struct net_device *dev)
{ … }
void hfi1_ipoib_napi_tx_disable(struct net_device *dev)
{ … }
void hfi1_ipoib_tx_timeout(struct net_device *dev, unsigned int q)
{ … }