net/bnxt: refactor the query stats
[dpdk.git] / drivers / net / bnxt / bnxt.h
index 0c59c66..e411704 100644 (file)
@@ -45,7 +45,7 @@
 
 #include "bnxt_cpr.h"
 
-#define BNXT_MAX_MTU           9000
+#define BNXT_MAX_MTU           9500
 #define VLAN_TAG_SIZE          4
 
 enum bnxt_hw_context {
@@ -67,6 +67,7 @@ struct bnxt_child_vf_info {
        uint32_t                func_cfg_flags;
        uint32_t                l2_rx_mask;
        uint16_t                fid;
+       uint16_t                dflt_vlan;
        bool                    random_mac;
 };
 
@@ -130,6 +131,8 @@ struct bnxt {
        uint32_t                flags;
 #define BNXT_FLAG_REGISTERED   (1 << 0)
 #define BNXT_FLAG_VF           (1 << 1)
+#define BNXT_FLAG_PORT_STATS   (1 << 2)
+#define BNXT_FLAG_JUMBO                (1 << 3)
 #define BNXT_PF(bp)            (!((bp)->flags & BNXT_FLAG_VF))
 #define BNXT_VF(bp)            ((bp)->flags & BNXT_FLAG_VF)
 #define BNXT_NPAR_ENABLED(bp)  ((bp)->port_partition_type)
@@ -138,10 +141,16 @@ struct bnxt {
        unsigned int            rx_nr_rings;
        unsigned int            rx_cp_nr_rings;
        struct bnxt_rx_queue **rx_queues;
+       const void              *rx_mem_zone;
+       struct rx_port_stats    *hw_rx_port_stats;
+       phys_addr_t             hw_rx_port_stats_map;
 
        unsigned int            tx_nr_rings;
        unsigned int            tx_cp_nr_rings;
        struct bnxt_tx_queue **tx_queues;
+       const void              *tx_mem_zone;
+       struct tx_port_stats    *hw_tx_port_stats;
+       phys_addr_t             hw_tx_port_stats_map;
 
        /* Default completion ring */
        struct bnxt_cp_ring_info        *def_cp_ring;
@@ -188,7 +197,14 @@ struct bnxt {
        struct bnxt_pf_info             pf;
        uint8_t                 port_partition_type;
        uint8_t                 dev_stopped;
+       uint8_t                 vxlan_port_cnt;
+       uint8_t                 geneve_port_cnt;
+       uint16_t                vxlan_port;
+       uint16_t                geneve_port;
+       uint16_t                vxlan_fw_dst_port_id;
+       uint16_t                geneve_fw_dst_port_id;
        uint32_t                fw_ver;
+       rte_atomic64_t          rx_mbuf_alloc_fail;
 };
 
 /*
@@ -220,4 +236,5 @@ struct rte_pmd_bnxt_mb_event_param {
 int bnxt_link_update_op(struct rte_eth_dev *eth_dev, int wait_to_complete);
 int bnxt_rcv_msg_from_vf(struct bnxt *bp, uint16_t vf_id, void *msg);
 
+#define RX_PROD_AGG_BD_TYPE_RX_PROD_AGG                0x6
 #endif