#include <linux/io.h>
#include <linux/if_vlan.h>
#include "vnic.h"
#include "netdev.h"
#define HFI_TX_TIMEOUT_MS …
#define HFI1_VNIC_RCV_Q_SIZE …
#define HFI1_VNIC_UP …
static DEFINE_SPINLOCK(vport_cntr_lock);
#define SUM_GRP_COUNTERS(stats, qstats, x_grp) …
#define VNIC_MASK …
#define VNIC_ID(val) …
static void hfi1_vnic_update_stats(struct hfi1_vnic_vport_info *vinfo,
struct opa_vnic_stats *stats)
{ … }
static inline void update_len_counters(struct opa_vnic_grp_stats *grp,
int len)
{ … }
static void hfi1_vnic_update_tx_counters(struct hfi1_vnic_vport_info *vinfo,
u8 q_idx, struct sk_buff *skb, int err)
{ … }
static void hfi1_vnic_update_rx_counters(struct hfi1_vnic_vport_info *vinfo,
u8 q_idx, struct sk_buff *skb, int err)
{ … }
static void hfi1_vnic_get_stats64(struct net_device *netdev,
struct rtnl_link_stats64 *stats)
{ … }
static u64 create_bypass_pbc(u32 vl, u32 dw_len)
{ … }
static void hfi1_vnic_maybe_stop_tx(struct hfi1_vnic_vport_info *vinfo,
u8 q_idx)
{ … }
static netdev_tx_t hfi1_netdev_start_xmit(struct sk_buff *skb,
struct net_device *netdev)
{ … }
static u16 hfi1_vnic_select_queue(struct net_device *netdev,
struct sk_buff *skb,
struct net_device *sb_dev)
{ … }
static inline int hfi1_vnic_decap_skb(struct hfi1_vnic_rx_queue *rxq,
struct sk_buff *skb)
{ … }
static struct hfi1_vnic_vport_info *get_vnic_port(struct hfi1_devdata *dd,
int vesw_id)
{ … }
static struct hfi1_vnic_vport_info *get_first_vnic_port(struct hfi1_devdata *dd)
{ … }
void hfi1_vnic_bypass_rcv(struct hfi1_packet *packet)
{ … }
static int hfi1_vnic_up(struct hfi1_vnic_vport_info *vinfo)
{ … }
static void hfi1_vnic_down(struct hfi1_vnic_vport_info *vinfo)
{ … }
static int hfi1_netdev_open(struct net_device *netdev)
{ … }
static int hfi1_netdev_close(struct net_device *netdev)
{ … }
static int hfi1_vnic_init(struct hfi1_vnic_vport_info *vinfo)
{ … }
static void hfi1_vnic_deinit(struct hfi1_vnic_vport_info *vinfo)
{ … }
static void hfi1_vnic_set_vesw_id(struct net_device *netdev, int id)
{ … }
static const struct net_device_ops hfi1_netdev_ops = …;
static void hfi1_vnic_free_rn(struct net_device *netdev)
{ … }
struct net_device *hfi1_vnic_alloc_rn(struct ib_device *device,
u32 port_num,
enum rdma_netdev_t type,
const char *name,
unsigned char name_assign_type,
void (*setup)(struct net_device *))
{ … }