net/i40e: set TC strict priority mode
[dpdk.git] / drivers / net / i40e / i40e_ethdev.h
index 0ce8de2..e0c8574 100644 (file)
@@ -128,6 +128,7 @@ enum i40e_flxpld_layer_idx {
 #define I40E_FLAG_FDIR                  (1ULL << 6)
 #define I40E_FLAG_VXLAN                 (1ULL << 7)
 #define I40E_FLAG_RSS_AQ_CAPABLE        (1ULL << 8)
+#define I40E_FLAG_VF_MAC_BY_PF          (1ULL << 9)
 #define I40E_FLAG_ALL (I40E_FLAG_RSS | \
                       I40E_FLAG_DCB | \
                       I40E_FLAG_VMDQ | \
@@ -136,7 +137,8 @@ enum i40e_flxpld_layer_idx {
                       I40E_FLAG_HEADER_SPLIT_ENABLED | \
                       I40E_FLAG_FDIR | \
                       I40E_FLAG_VXLAN | \
-                      I40E_FLAG_RSS_AQ_CAPABLE)
+                      I40E_FLAG_RSS_AQ_CAPABLE | \
+                      I40E_FLAG_VF_MAC_BY_PF)
 
 #define I40E_RSS_OFFLOAD_ALL ( \
        ETH_RSS_FRAG_IPV4 | \
@@ -288,7 +290,7 @@ struct i40e_bw_info {
        /* Relative credits within same TC with respect to other VSIs or Comps */
        uint8_t  bw_ets_share_credits[I40E_MAX_TRAFFIC_CLASS];
        /* Bandwidth limit per TC */
-       uint8_t  bw_ets_credits[I40E_MAX_TRAFFIC_CLASS];
+       uint16_t bw_ets_credits[I40E_MAX_TRAFFIC_CLASS];
        /* Max bandwidth limit per TC */
        uint8_t  bw_ets_max[I40E_MAX_TRAFFIC_CLASS];
 };
@@ -303,6 +305,7 @@ struct i40e_veb {
        uint16_t stats_idx;
        struct i40e_eth_stats stats;
        uint8_t enabled_tc;   /* The traffic class enabled */
+       uint8_t strict_prio_tc; /* bit map of TCs set to strict priority mode */
        struct i40e_bw_info bw_info; /* VEB bandwidth information */
 };
 
@@ -361,6 +364,8 @@ struct i40e_vsi {
        uint16_t msix_intr; /* The MSIX interrupt binds to VSI */
        uint16_t nb_msix;   /* The max number of msix vector */
        uint8_t enabled_tc; /* The traffic class enabled */
+       uint8_t vlan_anti_spoof_on; /* The VLAN anti-spoofing enabled */
+       uint8_t vlan_filter_on; /* The VLAN filter enabled */
        struct i40e_bw_info bw_info; /* VSI bandwidth information */
 };
 
@@ -496,11 +501,17 @@ struct i40e_ethertype_rule {
 /* Tunnel filter number HW supports */
 #define I40E_MAX_TUNNEL_FILTER_NUM 400
 
+enum i40e_tunnel_iptype {
+       I40E_TUNNEL_IPTYPE_IPV4,
+       I40E_TUNNEL_IPTYPE_IPV6,
+};
+
 /* Tunnel filter struct */
 struct i40e_tunnel_filter_input {
        uint8_t outer_mac[6];    /* Outer mac address to match */
        uint8_t inner_mac[6];    /* Inner mac address to match */
        uint16_t inner_vlan;     /* Inner vlan address to match */
+       enum i40e_tunnel_iptype ip_type;
        uint16_t flags;          /* Filter type flag */
        uint32_t tenant_id;      /* Tenant id to match */
 };
@@ -795,6 +806,7 @@ int i40e_add_del_fdir_filter(struct rte_eth_dev *dev,
 int i40e_dev_tunnel_filter_set(struct i40e_pf *pf,
                               struct rte_eth_tunnel_filter_conf *tunnel_filter,
                               uint8_t add);
+int i40e_fdir_flush(struct rte_eth_dev *dev);
 
 #define I40E_DEV_TO_PCI(eth_dev) \
        RTE_DEV_TO_PCI((eth_dev)->device)