ice: Advertise virtchnl UDP segmentation offload capability
authorBrett Creeley <brett.creeley@intel.com>
Tue, 2 Mar 2021 18:12:12 +0000 (10:12 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Thu, 22 Apr 2021 16:26:22 +0000 (09:26 -0700)
As the hardware is capable of supporting UDP segmentation offload, add a
capability bit to virtchnl.h to communicate this and have the driver
advertise its support.

Suggested-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c
include/linux/avf/virtchnl.h

index ccd6b3e8a5a9cb35ffe2f6cbddf748917dae04dd..1292a0b06eb5f1595a7be1fdd83a80c10af08606 100644 (file)
@@ -2118,6 +2118,9 @@ static int ice_vc_get_vf_res_msg(struct ice_vf *vf, u8 *msg)
        if (vf->driver_caps & VIRTCHNL_VF_CAP_ADV_LINK_SPEED)
                vfres->vf_cap_flags |= VIRTCHNL_VF_CAP_ADV_LINK_SPEED;
 
+       if (vf->driver_caps & VIRTCHNL_VF_OFFLOAD_USO)
+               vfres->vf_cap_flags |= VIRTCHNL_VF_OFFLOAD_USO;
+
        vfres->num_vsis = 1;
        /* Tx and Rx queue are equal for VF */
        vfres->num_queue_pairs = vsi->num_txq;
index debdd196773bf210e303ef18844ae5fa07579c5d..9e0341cf2c367155b91e34d83d7ffd831230a8cf 100644 (file)
@@ -251,6 +251,7 @@ VIRTCHNL_CHECK_STRUCT_LEN(16, virtchnl_vsi_resource);
 #define VIRTCHNL_VF_OFFLOAD_ENCAP_CSUM         0X00200000
 #define VIRTCHNL_VF_OFFLOAD_RX_ENCAP_CSUM      0X00400000
 #define VIRTCHNL_VF_OFFLOAD_ADQ                        0X00800000
+#define VIRTCHNL_VF_OFFLOAD_USO                        0X02000000
 #define VIRTCHNL_VF_OFFLOAD_FDIR_PF            0X10000000
 
 /* Define below the capability flags that are not offloads */