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] [thread-next>] [day] [month] [year] [list]
Message-ID: <63bd858a-fe07-4eda-9835-d999e2905860@redhat.com>
Date: Wed, 29 Nov 2023 09:38:40 +0100
From: Ivan Vecera <ivecera@...hat.com>
To: Dan Carpenter <dan.carpenter@...aro.org>, oe-kbuild@...ts.linux.dev,
 intel-wired-lan@...ts.osuosl.org
Cc: lkp@...el.com, oe-kbuild-all@...ts.linux.dev,
 Jesse Brandeburg <jesse.brandeburg@...el.com>,
 Tony Nguyen <anthony.l.nguyen@...el.com>,
 "David S . Miller" <davem@...emloft.net>, Eric Dumazet
 <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, linux-kernel@...r.kernel.org,
 Jacob Keller <jacob.e.keller@...el.com>,
 Wojciech Drewek <wojciech.drewek@...el.com>, Simon Horman
 <horms@...nel.org>, mschmidt@...hat.com, netdev@...r.kernel.org
Subject: Re: [PATCH v5 4/5] i40e: Fix broken support for floating VEBs

On 27. 11. 23 9:43, Dan Carpenter wrote:
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14720
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14721  	pf = veb->pf;
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14722
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14723  	/* find the
> remaining VSI and check for extras */
> 0aab77d67d37d09 Ivan Vecera      2023-11-24  14724  	
> i40e_pf_for_each_vsi(pf, i, vsi_it)
> 0aab77d67d37d09 Ivan Vecera      2023-11-24  14725  		if
> (vsi_it->uplink_seid == veb->seid) {
> 93a1bc91a1ccc5a Ivan Vecera      2023-11-24  14726  			if
> (vsi_it->flags & I40E_VSI_FLAG_VEB_OWNER)
> 0aab77d67d37d09 Ivan Vecera      2023-11-24  14727  				vsi = vsi_it;
> 
> Do we always find a vsi?  Presumably, yes, but it's not obvious just
> from reading this function.

Yes, if the VEB has uplink (veb->uplink_seid != 0) then it has to have a 
downlink VSI that owns it (vsi->flags has I40E_VSI_FLAG_VEB_OWNER set)

Ivan

> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14728  			n++;
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14729  		}
> 0aab77d67d37d09 Ivan Vecera      2023-11-24  14730
> 93a1bc91a1ccc5a Ivan Vecera      2023-11-24  14731  	/* Floating VEB has
>   to be empty and regular one must have
> 93a1bc91a1ccc5a Ivan Vecera      2023-11-24  14732  	 * single owner
> VSI.
> 93a1bc91a1ccc5a Ivan Vecera      2023-11-24  14733  	 */
> 93a1bc91a1ccc5a Ivan Vecera      2023-11-24  14734  	if
> ((veb->uplink_seid && n != 1) || (!veb->uplink_seid
> && n != 0)) {
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14735  		
> dev_info(&pf->pdev->dev,
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14736  			 "can't remove
> VEB %d with %d VSIs left\n",
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14737  			 veb->seid,
> n);
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14738  		return;
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14739  	}
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14740
> 93a1bc91a1ccc5a Ivan Vecera      2023-11-24  14741  	/* For regular VEB
> move the owner VSI to uplink VEB */
> 41c445ff0f482bb Jesse Brandeburg 2013-09-11  14742  	if
> (veb->uplink_seid) {
> 93a1bc91a1ccc5a Ivan Vecera      2023-11-24 @14743  		vsi->flags
> &= ~I40E_VSI_FLAG_VEB_OWNER;


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ