ethdev: support multiple sizes of redirection table
[dpdk.git] / lib / librte_pmd_i40e / i40e_ethdev.h
index afa14aa..c30208e 100644 (file)
 /* Always assign pool 0 to main VSI, VMDQ will start from 1 */
 #define I40E_VMDQ_POOL_BASE       1
 
+#define I40E_DEFAULT_RX_FREE_THRESH  32
+#define I40E_DEFAULT_RX_PTHRESH      8
+#define I40E_DEFAULT_RX_HTHRESH      8
+#define I40E_DEFAULT_RX_WTHRESH      0
+
+#define I40E_DEFAULT_TX_FREE_THRESH  32
+#define I40E_DEFAULT_TX_PTHRESH      32
+#define I40E_DEFAULT_TX_HTHRESH      0
+#define I40E_DEFAULT_TX_WTHRESH      0
+#define I40E_DEFAULT_TX_RSBIT_THRESH 32
+
+/* Bit shift and mask */
+#define I40E_4_BIT_WIDTH  (CHAR_BIT / 2)
+#define I40E_4_BIT_MASK   RTE_LEN2MASK(I40E_4_BIT_WIDTH, uint8_t)
+#define I40E_8_BIT_WIDTH  CHAR_BIT
+#define I40E_8_BIT_MASK   UINT8_MAX
+#define I40E_16_BIT_WIDTH (CHAR_BIT * 2)
+#define I40E_16_BIT_MASK  UINT16_MAX
+#define I40E_32_BIT_WIDTH (CHAR_BIT * 4)
+#define I40E_32_BIT_MASK  UINT32_MAX
+#define I40E_48_BIT_WIDTH (CHAR_BIT * 6)
+#define I40E_48_BIT_MASK  RTE_LEN2MASK(I40E_48_BIT_WIDTH, uint64_t)
+
 /* i40e flags */
 #define I40E_FLAG_RSS                   (1ULL << 0)
 #define I40E_FLAG_DCB                   (1ULL << 1)
@@ -270,7 +293,7 @@ struct i40e_pf {
        uint16_t vmdq_nb_qps; /* The number of queue pairs of VMDq */
        uint16_t vf_nb_qps; /* The number of queue pairs of VF */
        uint16_t fdir_nb_qps; /* The number of queue pairs of Flow Director */
-
+       uint16_t hash_lut_size; /* The size of hash lookup table */
        /* store VXLAN UDP ports */
        uint16_t vxlan_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS];
        uint16_t vxlan_bitmap; /* Vxlan bit mask */
@@ -323,7 +346,8 @@ struct i40e_vf {
        bool promisc_unicast_enabled;
        bool promisc_multicast_enabled;
 
-       bool host_is_dpdk; /* The flag indicates if the host is DPDK */
+       uint32_t version_major; /* Major version number */
+       uint32_t version_minor; /* Minor version number */
        uint16_t promisc_flags; /* Promiscuous setting */
        uint32_t vlan[I40E_VFTA_SIZE]; /* VLAN bit map */