net/i40e/base: use new virtchnl header file
[dpdk.git] / drivers / net / i40e / i40e_ethdev.h
index 3255d2e..07677da 100644 (file)
 
 /* Linux PF host with virtchnl version 1.1 */
 #define PF_IS_V11(vf) \
-       (((vf)->version_major == I40E_VIRTCHNL_VERSION_MAJOR) && \
+       (((vf)->version_major == VIRTCHNL_VERSION_MAJOR) && \
        ((vf)->version_minor == 1))
 
 /* index flex payload per layer */
@@ -405,7 +405,7 @@ enum I40E_VF_STATE {
 struct i40e_pf_vf {
        struct i40e_pf *pf;
        struct i40e_vsi *vsi;
-       enum I40E_VF_STATE state; /* The number of queue pairs availiable */
+       enum I40E_VF_STATE state; /* The number of queue pairs available */
        uint16_t vf_idx; /* VF index in pf->vfs */
        uint16_t lan_nb_qps; /* Actual queues allocated */
        uint16_t reset_cnt; /* Total vf reset times */
@@ -448,6 +448,7 @@ struct i40e_vmdq_info {
                        I40E_PRTQF_FLX_PIT_DEST_OFF_MASK))
 #define I40E_WORD(hi, lo) (uint16_t)((((hi) << 8) & 0xFF00) | ((lo) & 0xFF))
 #define I40E_FLEX_WORD_MASK(off) (0x80 >> (off))
+#define I40E_FDIR_IPv6_TC_OFFSET       20
 
 /*
  * Structure to store flex pit for flow diretor.
@@ -502,6 +503,8 @@ struct i40e_fdir_info {
        /* Mark if flex pit and mask is set */
        bool flex_pit_flag[I40E_MAX_FLXPLD_LAYER];
        bool flex_mask_flag[I40E_FILTER_PCTYPE_MAX];
+
+       bool inset_flag[I40E_FILTER_PCTYPE_MAX]; /* Mark if input set is set */
 };
 
 /* Ethertype filter number HW supports */
@@ -765,7 +768,7 @@ struct i40e_vf {
        /* Event from pf */
        bool dev_closed;
        bool link_up;
-       enum i40e_aq_link_speed link_speed;
+       enum virtchnl_link_speed link_speed;
        bool vf_reset;
        volatile uint32_t pend_cmd; /* pending command not finished yet */
        int32_t cmd_retval; /* return value of the cmd response from PF */
@@ -773,8 +776,8 @@ struct i40e_vf {
        uint8_t *aq_resp; /* buffer to store the adminq response from PF */
 
        /* VSI info */
-       struct i40e_virtchnl_vf_resource *vf_res; /* All VSIs */
-       struct i40e_virtchnl_vsi_resource *vsi_res; /* LAN VSI */
+       struct virtchnl_vf_resource *vf_res; /* All VSIs */
+       struct virtchnl_vsi_resource *vsi_res; /* LAN VSI */
        struct i40e_vsi vsi;
        uint64_t flags;
 };
@@ -919,6 +922,12 @@ 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);
+int i40e_validate_input_set(enum i40e_filter_pctype pctype,
+                           enum rte_filter_type filter, uint64_t inset);
+int i40e_generate_inset_mask_reg(uint64_t inset, uint32_t *mask,
+                                uint8_t nb_elem);
+uint64_t i40e_translate_input_set_reg(enum i40e_mac_type type, uint64_t input);
+void i40e_check_write_reg(struct i40e_hw *hw, uint32_t addr, uint32_t val);
 
 /* I40E_DEV_PRIVATE_TO */
 #define I40E_DEV_PRIVATE_TO_PF(adapter) \