numam-dpdk/drivers/common
Qi Zhang 86edb0bd75 common/iavf: support new VLAN capabilities
Currently VIRTCHNL only allows for VLAN filtering and offloads to happen
on a single 802.1Q VLAN. Add support to filter and offload on inner,
outer, and/or inner + outer VLANs.

This is done by introducing the new capability
VIRTCHNL_VF_OFFLOAD_VLAN_V2. The flow to negotiate this new capability
is shown below.

1. VF - sets the VIRTCHNL_VF_OFFLOAD_VLAN_V2 bit in the
   virtchnl_vf_resource.vf_caps_flags during the
   VIRTCHNL_OP_GET_VF_RESOURCES request message. The VF should also set
   the VIRTCHNL_VF_OFFLOAD_VLAN bit in case the PF driver doesn't
   support the new capability.

2. PF - sets the VLAN capability bit it supports in the
   VIRTCHNL_OP_GET_VF_RESOURCES response message. This will either be
   VIRTCHNL_VF_OFFLOAD_VLAN_V2, VIRTCHNL_VF_OFFLOAD_VLAN, or none.

3. VF - If the VIRTCHNL_VF_OFFLOAD_VLAN_V2 capability was ACK'd by the
   PF, then the VF needs to request the VLAN capabilities of the
   PF/Device by issuing a VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS request.
   If the VIRTCHNL_VF_OFFLOAD_VLAN capability was ACK'd then the VF
   knows only single 802.1Q VLAN filtering/offloads are supported. If no
   VLAN capability is ACK'd then the PF/Device doesn't support hardware
   VLAN filtering/offloads for this VF.

4. PF - Populates the virtchnl_vlan_caps structure based on what it
   allows/supports for that VF and sends that response via
   VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS.

After VIRTCHNL_OP_GET_OFFLOAD_VLAN_V2_CAPS is successfully negotiated
the VF driver needs to interpret the capabilities supported by the
underlying PF/Device. The VF will be allowed to filter/offload the
inner 802.1Q, outer (various ethertype), inner 802.1Q + outer
(various ethertypes), or none based on which fields are set.

The VF will also need to interpret where the VLAN tag should be inserted
and/or stripped based on the negotiated capabilities.

Also, update the virtchnl_op_str() function to support the added opcodes.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2021-01-13 18:51:58 +01:00
..
cpt common/cpt: remove redundant structure 2020-11-12 21:47:42 +01:00
dpaax build: align wording of non-support reasons 2020-11-20 16:05:35 +01:00
iavf common/iavf: support new VLAN capabilities 2021-01-13 18:51:58 +01:00
mlx5 common/mlx5: support vDPA completion queue moderation 2021-01-08 18:07:56 +01:00
mvep build: update meson for Marvell Armada drivers 2021-01-08 16:03:05 +01:00
octeontx build: remove library name from version map file name 2020-10-19 22:13:59 +02:00
octeontx2 common/octeontx2: fix build with SVE 2021-01-14 16:42:25 +01:00
qat common/qat: add missing kmod dependency info 2020-11-02 09:24:41 +01:00
sfc_efx common/sfc_efx/base: check for MAE privilege 2021-01-08 16:03:05 +01:00
meson.build build: standardize component names and defines 2020-10-19 22:15:34 +02:00