iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 offload enable/disable
authorBrett Creeley <brett.creeley@intel.com>
Tue, 30 Nov 2021 00:16:03 +0000 (16:16 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Fri, 17 Dec 2021 20:37:19 +0000 (12:37 -0800)
commit8afadd1cd8ba1df757011eb58c471eca0ac81872
tree4077e247404c5a5e6bbb4ac3b69fe21fecefc420
parentccd219d2ea13a69881012569ea6ea33f46d684de
iavf: Add support for VIRTCHNL_VF_OFFLOAD_VLAN_V2 offload enable/disable

The new VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability added support that allows
the VF to support 802.1Q and 802.1ad VLAN insertion and stripping if
successfully negotiated via VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS.
Multiple changes were needed to support this new functionality.

1. Added new aq_required flags to support any kind of VLAN stripping and
   insertion offload requests via virtchnl.

2. Added the new method iavf_set_vlan_offload_features() that's
   used during VF initialization, VF reset, and iavf_set_features() to
   set the aq_required bits based on the current VLAN offload
   configuration of the VF's netdev.

3. Added virtchnl handling for VIRTCHNL_OP_ENABLE_STRIPPING_V2,
   VIRTCHNL_OP_DISABLE_STRIPPING_V2, VIRTCHNL_OP_ENABLE_INSERTION_V2,
   and VIRTCHNL_OP_ENABLE_INSERTION_V2.

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/iavf/iavf.h
drivers/net/ethernet/intel/iavf/iavf_main.c
drivers/net/ethernet/intel/iavf/iavf_virtchnl.c