i40evf: fix code style
[dpdk.git] / lib / librte_pmd_i40e / i40e_ethdev.h
index e61d258..96361c2 100644 (file)
 #define I40E_QUEUE_BASE_ADDR_UNIT 128
 /* number of VSIs and queue default setting */
 #define I40E_MAX_QP_NUM_PER_VF    16
-#define I40E_DEFAULT_QP_NUM_VMDQ  64
 #define I40E_DEFAULT_QP_NUM_FDIR  64
 #define I40E_UINT32_BIT_SIZE      (CHAR_BIT * sizeof(uint32_t))
 #define I40E_VFTA_SIZE            (4096 / I40E_UINT32_BIT_SIZE)
 /* Default TC traffic in case DCB is not enabled */
 #define I40E_DEFAULT_TCMAP        0x1
 
+/* Always assign pool 0 to main VSI, VMDQ will start from 1 */
+#define I40E_VMDQ_POOL_BASE       1
+
 /* i40e flags */
 #define I40E_FLAG_RSS                   (1ULL << 0)
 #define I40E_FLAG_DCB                   (1ULL << 1)
@@ -232,6 +234,14 @@ struct i40e_pf_vf {
        uint16_t reset_cnt; /* Total vf reset times */
 };
 
+/*
+ * Structure to store private data for VMDQ instance
+ */
+struct i40e_vmdq_info {
+       struct i40e_pf *pf;
+       struct i40e_vsi *vsi;
+};
+
 /*
  * Structure to store private data specific for PF instance.
  */
@@ -264,6 +274,11 @@ struct i40e_pf {
        /* store VXLAN UDP ports */
        uint16_t vxlan_ports[I40E_MAX_PF_UDP_OFFLOAD_PORTS];
        uint16_t vxlan_bitmap; /* Vxlan bit mask */
+
+       /* VMDQ related info */
+       uint16_t max_nb_vmdq_vsi; /* Max number of VMDQ VSIs supported */
+       uint16_t nb_cfg_vmdq_vsi; /* number of VMDQ VSIs configured */
+       struct i40e_vmdq_info *vmdq;
 };
 
 enum pending_msg {
@@ -308,7 +323,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 */
 
@@ -340,7 +356,7 @@ struct i40e_adapter {
        };
 };
 
-int i40e_vsi_switch_queues(struct i40e_vsi *vsi, bool on);
+int i40e_dev_switch_queues(struct i40e_pf *pf, bool on);
 int i40e_vsi_release(struct i40e_vsi *vsi);
 struct i40e_vsi *i40e_vsi_setup(struct i40e_pf *pf,
                                enum i40e_vsi_type type,
@@ -394,7 +410,7 @@ i40e_get_vsi_from_adapter(struct i40e_adapter *adapter)
                return pf->main_vsi;
        }
 }
-#define I40E_DEV_PRIVATE_TO_VSI(adapter) \
+#define I40E_DEV_PRIVATE_TO_MAIN_VSI(adapter) \
        i40e_get_vsi_from_adapter((struct i40e_adapter *)adapter)
 
 /* I40E_VSI_TO */