net/i40e/base: rename a field
authorQi Zhang <qi.z.zhang@intel.com>
Tue, 9 Jan 2018 20:30:21 +0000 (15:30 -0500)
committerFerruh Yigit <ferruh.yigit@intel.com>
Tue, 16 Jan 2018 17:47:49 +0000 (18:47 +0100)
Rename virtchnl_vf_resource's vf_offload_flags to vf_cap_flags.
The new name is more generic, so more than just offloading
capabilities can be added.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
drivers/net/i40e/base/i40e_common.c
drivers/net/i40e/base/virtchnl.h
drivers/net/i40e/i40e_ethdev_vf.c
drivers/net/i40e/i40e_pf.c

index f3e3496..6c65a32 100644 (file)
@@ -7175,9 +7175,9 @@ void i40e_vf_parse_hw_config(struct i40e_hw *hw,
        hw->dev_caps.num_rx_qp = msg->num_queue_pairs;
        hw->dev_caps.num_tx_qp = msg->num_queue_pairs;
        hw->dev_caps.num_msix_vectors_vf = msg->max_vectors;
-       hw->dev_caps.dcb = msg->vf_offload_flags &
+       hw->dev_caps.dcb = msg->vf_cap_flags &
                           VIRTCHNL_VF_OFFLOAD_L2;
-       hw->dev_caps.iwarp = (msg->vf_offload_flags &
+       hw->dev_caps.iwarp = (msg->vf_cap_flags &
                              VIRTCHNL_VF_OFFLOAD_IWARP) ? 1 : 0;
        for (i = 0; i < msg->num_vsis; i++) {
                if (vsi_res->vsi_type == VIRTCHNL_VSI_SRIOV) {
index 715f562..b2d5fe7 100644 (file)
@@ -240,7 +240,7 @@ struct virtchnl_vsi_resource {
 
 VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
 
-/* VF offload flags
+/* VF capability flags
  * VIRTCHNL_VF_OFFLOAD_L2 flag is inclusive of base mode L2 offloads including
  * TX/RX Checksum offloading and TSO for non-tunnelled packets.
  */
@@ -269,7 +269,7 @@ struct virtchnl_vf_resource {
        u16 max_vectors;
        u16 max_mtu;
 
-       u32 vf_offload_flags;
+       u32 vf_cap_flags;
        u32 rss_key_size;
        u32 rss_lut_size;
 
index 138a26f..4334010 100644 (file)
@@ -1567,7 +1567,7 @@ i40evf_vlan_offload_set(struct rte_eth_dev *dev, int mask)
        struct rte_eth_conf *dev_conf = &dev->data->dev_conf;
        struct i40e_vf *vf = I40EVF_DEV_PRIVATE_TO_VF(dev->data->dev_private);
 
-       if (!(vf->vf_res->vf_offload_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
+       if (!(vf->vf_res->vf_cap_flags & VIRTCHNL_VF_OFFLOAD_VLAN))
                return -ENOTSUP;
 
        /* Vlan stripping setting */
index 1bca250..93b484b 100644 (file)
@@ -308,8 +308,8 @@ i40e_pf_host_process_cmd_get_vf_resource(struct i40e_pf_vf *vf, bool b_op)
                goto send_msg;
        }
 
-       vf_res->vf_offload_flags = VIRTCHNL_VF_OFFLOAD_L2 |
-                               VIRTCHNL_VF_OFFLOAD_VLAN;
+       vf_res->vf_cap_flags = VIRTCHNL_VF_OFFLOAD_L2 |
+                              VIRTCHNL_VF_OFFLOAD_VLAN;
        vf_res->max_vectors = hw->func_caps.num_msix_vectors_vf;
        vf_res->num_queue_pairs = vf->vsi->nb_qps;
        vf_res->num_vsis = I40E_DEFAULT_VF_VSI_NUM;