#include "sdma.h"
#include "vnic.h"
#define HFI1_VNIC_SDMA_Q_ACTIVE …
#define HFI1_VNIC_SDMA_Q_DEFERRED …
#define HFI1_VNIC_TXREQ_NAME_LEN …
#define HFI1_VNIC_SDMA_DESC_WTRMRK …
struct vnic_txreq { … };
static void vnic_sdma_complete(struct sdma_txreq *txreq,
int status)
{ … }
static noinline int build_vnic_ulp_payload(struct sdma_engine *sde,
struct vnic_txreq *tx)
{ … }
static int build_vnic_tx_desc(struct sdma_engine *sde,
struct vnic_txreq *tx,
u64 pbc)
{ … }
static inline void hfi1_vnic_update_pad(unsigned char *pad, u8 plen)
{ … }
int hfi1_vnic_send_dma(struct hfi1_devdata *dd, u8 q_idx,
struct hfi1_vnic_vport_info *vinfo,
struct sk_buff *skb, u64 pbc, u8 plen)
{ … }
static int hfi1_vnic_sdma_sleep(struct sdma_engine *sde,
struct iowait_work *wait,
struct sdma_txreq *txreq,
uint seq,
bool pkts_sent)
{ … }
static void hfi1_vnic_sdma_wakeup(struct iowait *wait, int reason)
{
struct hfi1_vnic_sdma *vnic_sdma =
container_of(wait, struct hfi1_vnic_sdma, wait);
struct hfi1_vnic_vport_info *vinfo = vnic_sdma->vinfo;
vnic_sdma->state = HFI1_VNIC_SDMA_Q_ACTIVE;
if (__netif_subqueue_stopped(vinfo->netdev, vnic_sdma->q_idx))
netif_wake_subqueue(vinfo->netdev, vnic_sdma->q_idx);
};
inline bool hfi1_vnic_sdma_write_avail(struct hfi1_vnic_vport_info *vinfo,
u8 q_idx)
{ … }
void hfi1_vnic_sdma_init(struct hfi1_vnic_vport_info *vinfo)
{ … }
int hfi1_vnic_txreq_init(struct hfi1_devdata *dd)
{ … }
void hfi1_vnic_txreq_deinit(struct hfi1_devdata *dd)
{ … }