From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jankowski, Konrad0 Date: Wed, 8 Dec 2021 08:08:06 +0000 Subject: [Intel-wired-lan] [PATCH net-next v2 1/6] virtchnl: Add support for new VLAN capabilities In-Reply-To: <20211130001604.22112-2-anthony.l.nguyen@intel.com> References: <20211130001604.22112-1-anthony.l.nguyen@intel.com> <20211130001604.22112-2-anthony.l.nguyen@intel.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: > -----Original Message----- > From: Intel-wired-lan On Behalf Of > Tony Nguyen > Sent: wtorek, 30 listopada 2021 01:16 > To: intel-wired-lan at lists.osuosl.org > Subject: [Intel-wired-lan] [PATCH net-next v2 1/6] virtchnl: Add support for > new VLAN capabilities > > From: Brett Creeley > > 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. > > Signed-off-by: Brett Creeley > --- > include/linux/avf/virtchnl.h | 377 > +++++++++++++++++++++++++++++++++++ > 1 file changed, 377 insertions(+) > > diff --git a/include/linux/avf/virtchnl.h b/include/linux/avf/virtchnl.h index > b30a1bc74fc7..2ce27e8e4f19 100644 > --- a/include/linux/avf/virtchnl.h > +++ b/include/linux/avf/virtchnl.h > @@ -141,6 +141,13 @@ enum virtchnl_ops { Tested-by: Konrad Jankowski