net/mlx5: panic when destroying a queue in use
[dpdk.git] / drivers / net / i40e / i40e_ethdev.h
index f537a3a..71b0874 100644 (file)
@@ -524,12 +524,13 @@ struct i40e_tunnel_filter_input {
        uint16_t flags;          /* Filter type flag */
        uint32_t tenant_id;      /* Tenant id to match */
        uint16_t general_fields[32];  /* Big buffer */
-       uint16_t vf_id;         /* VF id for tunnel filtering. */
 };
 
 struct i40e_tunnel_filter {
        TAILQ_ENTRY(i40e_tunnel_filter) rules;
        struct i40e_tunnel_filter_input input;
+       uint8_t is_to_vf; /* 0 - to PF, 1 - to VF */
+       uint16_t vf_id;   /* VF id, avaiblable when is_to_vf is 1. */
        uint16_t queue; /* Queue assigned to when match */
 };
 
@@ -582,7 +583,7 @@ struct i40e_tunnel_filter_conf {
        uint32_t tenant_id;     /**< Tenant ID to match. VNI, GRE key... */
        uint16_t queue_id;      /**< Queue assigned to if match. */
        uint8_t is_to_vf;       /**< 0 - to PF, 1 - to VF */
-       uint16_t vf_id;         /**< VF id for tunnel filter insertion. */
+       uint16_t vf_id;         /**< VF id, avaiblable when is_to_vf is 1. */
 };
 
 #define I40E_MIRROR_MAX_ENTRIES_PER_RULE   64
@@ -743,6 +744,8 @@ struct i40e_vf {
        uint64_t flags;
 };
 
+#define I40E_MAX_PKT_TYPE 256
+
 /*
  * Structure to store private data for each PF/VF instance.
  */
@@ -767,6 +770,9 @@ struct i40e_adapter {
        struct rte_timecounter systime_tc;
        struct rte_timecounter rx_tstamp_tc;
        struct rte_timecounter tx_tstamp_tc;
+
+       /* ptype mapping table */
+       uint32_t ptype_tbl[I40E_MAX_PKT_TYPE] __rte_cache_min_aligned;
 };
 
 extern const struct rte_flow_ops i40e_flow_ops;
@@ -868,6 +874,17 @@ int i40e_dev_consistent_tunnel_filter_set(struct i40e_pf *pf,
                                  struct i40e_tunnel_filter_conf *tunnel_filter,
                                  uint8_t add);
 int i40e_fdir_flush(struct rte_eth_dev *dev);
+int i40e_find_all_vlan_for_mac(struct i40e_vsi *vsi,
+                              struct i40e_macvlan_filter *mv_f,
+                              int num, struct ether_addr *addr);
+int i40e_remove_macvlan_filters(struct i40e_vsi *vsi,
+                               struct i40e_macvlan_filter *filter,
+                               int total);
+void i40e_set_vlan_filter(struct i40e_vsi *vsi, uint16_t vlan_id, bool on);
+int i40e_add_macvlan_filters(struct i40e_vsi *vsi,
+                            struct i40e_macvlan_filter *filter,
+                            int total);
+bool is_i40e_supported(struct rte_eth_dev *dev);
 
 #define I40E_DEV_TO_PCI(eth_dev) \
        RTE_DEV_TO_PCI((eth_dev)->device)