lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <BL0PR11MB35210D095CD20FD123F915FD8FF6A@BL0PR11MB3521.namprd11.prod.outlook.com>
Date: Fri, 15 Sep 2023 08:42:24 +0000
From: "Romanowski, Rafal" <rafal.romanowski@...el.com>
To: "Brandeburg, Jesse" <jesse.brandeburg@...el.com>, ivecera
	<ivecera@...hat.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC: Catherine Sullivan <catherine.sullivan@...el.com>, "moderated list:INTEL
 ETHERNET DRIVERS" <intel-wired-lan@...ts.osuosl.org>, open list
	<linux-kernel@...r.kernel.org>, Greg Rose <gregory.v.rose@...el.com>, "Eric
 Dumazet" <edumazet@...gle.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, Jeff Kirsher <jeffrey.t.kirsher@...el.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "David S.
 Miller" <davem@...emloft.net>
Subject: RE: [Intel-wired-lan] [PATCH net] i40e: Fix VF VLAN offloading when
 port VLAN is configured

> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of
> Jesse Brandeburg
> Sent: Thursday, September 7, 2023 8:53 PM
> To: ivecera <ivecera@...hat.com>; netdev@...r.kernel.org
> Cc: Catherine Sullivan <catherine.sullivan@...el.com>; moderated list:INTEL
> ETHERNET DRIVERS <intel-wired-lan@...ts.osuosl.org>; open list <linux-
> kernel@...r.kernel.org>; Greg Rose <gregory.v.rose@...el.com>; Eric Dumazet
> <edumazet@...gle.com>; Nguyen, Anthony L
> <anthony.l.nguyen@...el.com>; Jeff Kirsher <jeffrey.t.kirsher@...el.com>;
> Jakub Kicinski <kuba@...nel.org>; Paolo Abeni <pabeni@...hat.com>; David
> S. Miller <davem@...emloft.net>
> Subject: Re: [Intel-wired-lan] [PATCH net] i40e: Fix VF VLAN offloading when
> port VLAN is configured
> 
> On 9/7/2023 8:44 AM, Ivan Vecera wrote:
> > If port VLAN is configured on a VF then any other VLANs on top of this
> > VF are broken.
> >
> > During i40e_ndo_set_vf_port_vlan() call the i40e driver reset the VF
> > and iavf driver asks PF (using VIRTCHNL_OP_GET_VF_RESOURCES) for VF
> > capabilities but this reset occurs too early, prior setting of
> > vf->info.pvid field and because this field can be zero during
> > i40e_vc_get_vf_resources_msg() then VIRTCHNL_VF_OFFLOAD_VLAN
> capability is reported to iavf driver.
> >
> > This is wrong because iavf driver should not report VLAN offloading
> > capability when port VLAN is configured as i40e does not support QinQ
> > offloading.
> >
> > Fix the issue by moving VF reset after setting of vf->port_vlan_id
> > field.
> >
> > Without this patch:
> > $ echo 1 > /sys/class/net/enp2s0f0/device/sriov_numvfs
> > $ ip link set enp2s0f0 vf 0 vlan 3
> > $ ip link set enp2s0f0v0 up
> > $ ip link add link enp2s0f0v0 name vlan4 type vlan id 4 $ ip link set
> > vlan4 up ...
> > $ ethtool -k enp2s0f0v0 | grep vlan-offload
> > rx-vlan-offload: on
> > tx-vlan-offload: on
> > $ dmesg -l err | grep iavf
> > [1292500.742914] iavf 0000:02:02.0: Failed to add VLAN filter, error
> > IAVF_ERR_INVALID_QP_ID
> >
> > With this patch:
> > $ echo 1 > /sys/class/net/enp2s0f0/device/sriov_numvfs
> > $ ip link set enp2s0f0 vf 0 vlan 3
> > $ ip link set enp2s0f0v0 up
> > $ ip link add link enp2s0f0v0 name vlan4 type vlan id 4 $ ip link set
> > vlan4 up ...
> > $ ethtool -k enp2s0f0v0 | grep vlan-offload
> > rx-vlan-offload: off [requested on]
> > tx-vlan-offload: off [requested on]
> > $ dmesg -l err | grep iavf
> >
> > Fixes: f9b4b6278d51ff ("i40e: Reset the VF upon conflicting VLAN
> > configuration")
> > Signed-off-by: Ivan Vecera <ivecera@...hat.com>
> 
> Change looks reasonable to me and since it fixes your reproducer above, then
> excellent! Thank you!
> 
> Reviewed-by: Jesse Brandeburg <jesse.brandeburg@...el.com>
> 
> _______________________________________________
> Intel-wired-lan mailing list
> Intel-wired-lan@...osl.org
> https://lists.osuosl.org/mailman/listinfo/intel-wired-lan


Tested-by: Rafal Romanowski <rafal.romanowski@...el.com>



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ