#ifndef NIC_H
#define NIC_H
#include <linux/netdevice.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include "thunder_bgx.h"
#define PCI_DEVICE_ID_THUNDER_NIC_PF …
#define PCI_DEVICE_ID_THUNDER_PASS1_NIC_VF …
#define PCI_DEVICE_ID_THUNDER_NIC_VF …
#define PCI_DEVICE_ID_THUNDER_BGX …
#define PCI_SUBSYS_DEVID_88XX_NIC_PF …
#define PCI_SUBSYS_DEVID_81XX_NIC_PF …
#define PCI_SUBSYS_DEVID_83XX_NIC_PF …
#define PCI_SUBSYS_DEVID_88XX_PASS1_NIC_VF …
#define PCI_SUBSYS_DEVID_88XX_NIC_VF …
#define PCI_SUBSYS_DEVID_81XX_NIC_VF …
#define PCI_SUBSYS_DEVID_83XX_NIC_VF …
#define PCI_CFG_REG_BAR_NUM …
#define PCI_MSIX_REG_BAR_NUM …
#define MAX_NUM_VFS_SUPPORTED …
#define DEFAULT_NUM_VF_ENABLED …
#define NIC_TNS_BYPASS_MODE …
#define NIC_TNS_MODE …
#define NIC_SRIOV_ENABLED …
#define NIC_HW_MIN_FRS …
#define NIC_HW_MAX_FRS …
#define NIC_MAX_PKIND …
#define NIC_MAX_CPI_PER_LMAC …
#define NICVF_INTR_CQ …
#define NICVF_INTR_SQ …
#define NICVF_INTR_RBDR …
#define NICVF_INTR_PKT_DROP …
#define NICVF_INTR_TCP_TIMER …
#define NICVF_INTR_MBOX …
#define NICVF_INTR_QS_ERR …
#define NICVF_INTR_CQ_SHIFT …
#define NICVF_INTR_SQ_SHIFT …
#define NICVF_INTR_RBDR_SHIFT …
#define NICVF_INTR_PKT_DROP_SHIFT …
#define NICVF_INTR_TCP_TIMER_SHIFT …
#define NICVF_INTR_MBOX_SHIFT …
#define NICVF_INTR_QS_ERR_SHIFT …
#define NICVF_INTR_CQ_MASK …
#define NICVF_INTR_SQ_MASK …
#define NICVF_INTR_RBDR_MASK …
#define NICVF_INTR_PKT_DROP_MASK …
#define NICVF_INTR_TCP_TIMER_MASK …
#define NICVF_INTR_MBOX_MASK …
#define NICVF_INTR_QS_ERR_MASK …
#define NIC_PF_MSIX_VECTORS …
#define NIC_VF_MSIX_VECTORS …
#define NIC_PF_INTR_ID_ECC0_SBE …
#define NIC_PF_INTR_ID_ECC0_DBE …
#define NIC_PF_INTR_ID_ECC1_SBE …
#define NIC_PF_INTR_ID_ECC1_DBE …
#define NIC_PF_INTR_ID_ECC2_SBE …
#define NIC_PF_INTR_ID_ECC2_DBE …
#define NIC_PF_INTR_ID_ECC3_SBE …
#define NIC_PF_INTR_ID_ECC3_DBE …
#define NIC_PF_INTR_ID_MBOX0 …
#define NIC_PF_INTR_ID_MBOX1 …
#define NICPF_CQM_MIN_DROP_LEVEL …
#define NICPF_CLK_PER_INT_TICK …
#define NICVF_TX_TIMEOUT …
struct nicvf_cq_poll { … };
#define NIC_MAX_RSS_HASH_BITS …
#define NIC_MAX_RSS_IDR_TBL_SIZE …
#define RSS_HASH_KEY_SIZE …
struct nicvf_rss_info { … } ____cacheline_aligned_in_smp;
struct nicvf_pfc { … };
enum rx_stats_reg_offset { … };
enum tx_stats_reg_offset { … };
struct nicvf_hw_stats { … };
struct nicvf_drv_stats { … };
struct cavium_ptp;
struct xcast_addr_list { … };
struct nicvf_work { … };
struct nicvf { … } ____cacheline_aligned_in_smp;
#define NIC_PF_VF_MAILBOX_SIZE …
#define NIC_MBOX_MSG_TIMEOUT …
#define NIC_MBOX_MSG_READY …
#define NIC_MBOX_MSG_ACK …
#define NIC_MBOX_MSG_NACK …
#define NIC_MBOX_MSG_QS_CFG …
#define NIC_MBOX_MSG_RQ_CFG …
#define NIC_MBOX_MSG_SQ_CFG …
#define NIC_MBOX_MSG_RQ_DROP_CFG …
#define NIC_MBOX_MSG_SET_MAC …
#define NIC_MBOX_MSG_SET_MAX_FRS …
#define NIC_MBOX_MSG_CPI_CFG …
#define NIC_MBOX_MSG_RSS_SIZE …
#define NIC_MBOX_MSG_RSS_CFG …
#define NIC_MBOX_MSG_RSS_CFG_CONT …
#define NIC_MBOX_MSG_RQ_BP_CFG …
#define NIC_MBOX_MSG_RQ_SW_SYNC …
#define NIC_MBOX_MSG_BGX_STATS …
#define NIC_MBOX_MSG_BGX_LINK_CHANGE …
#define NIC_MBOX_MSG_ALLOC_SQS …
#define NIC_MBOX_MSG_NICVF_PTR …
#define NIC_MBOX_MSG_PNICVF_PTR …
#define NIC_MBOX_MSG_SNICVF_PTR …
#define NIC_MBOX_MSG_LOOPBACK …
#define NIC_MBOX_MSG_RESET_STAT_COUNTER …
#define NIC_MBOX_MSG_PFC …
#define NIC_MBOX_MSG_PTP_CFG …
#define NIC_MBOX_MSG_CFG_DONE …
#define NIC_MBOX_MSG_SHUTDOWN …
#define NIC_MBOX_MSG_RESET_XCAST …
#define NIC_MBOX_MSG_ADD_MCAST …
#define NIC_MBOX_MSG_SET_XCAST …
struct nic_cfg_msg { … };
struct qs_cfg_msg { … };
struct rq_cfg_msg { … };
struct sq_cfg_msg { … };
struct set_mac_msg { … };
struct set_frs_msg { … };
struct cpi_cfg_msg { … };
struct rss_sz_msg { … };
struct rss_cfg_msg { … };
struct bgx_stats_msg { … };
struct bgx_link_status { … };
struct sqs_alloc { … };
struct nicvf_ptr { … };
struct set_loopback { … };
struct reset_stat_cfg { … };
struct pfc { … };
struct set_ptp { … };
struct xcast { … };
nic_mbx;
#define NIC_NODE_ID_MASK …
#define NIC_NODE_ID_SHIFT …
static inline int nic_get_node_id(struct pci_dev *pdev)
{ … }
static inline bool pass1_silicon(struct pci_dev *pdev)
{ … }
static inline bool pass2_silicon(struct pci_dev *pdev)
{ … }
int nicvf_set_real_num_queues(struct net_device *netdev,
int tx_queues, int rx_queues);
int nicvf_open(struct net_device *netdev);
int nicvf_stop(struct net_device *netdev);
int nicvf_send_msg_to_pf(struct nicvf *vf, union nic_mbx *mbx);
void nicvf_config_rss(struct nicvf *nic);
void nicvf_set_rss_key(struct nicvf *nic);
void nicvf_set_ethtool_ops(struct net_device *netdev);
void nicvf_update_stats(struct nicvf *nic);
void nicvf_update_lmac_stats(struct nicvf *nic);
#endif