Re: [Intel-wired-lan] [PATCH net v7 4/4] ice: skip unnecessary VF reset when setting trust
"Romanowski, Rafal" <[email protected]> Thu, 30 Jul 2026 07:09:48 +0000
| Newsgroups | org.osuosl.intel-wired-lan,org.kernel.vger.netdev |
|---|---|
| Message-ID | <IA3PR11MB89856B526E0F6417B566DB788FC92@IA3PR11MB8985.namprd11.prod.outlook.com> |
> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of J= ose > Ignacio Tornos Martinez > Sent: Tuesday, June 23, 2026 12:18 PM > To: [email protected] > Cc: [email protected]; Kitszel, Przemyslaw > <[email protected]>; Loktionov, Aleksandr > <[email protected]>; Keller, Jacob E <[email protected]= m>; > [email protected]; Nguyen, Anthony L <[email protected]>; > [email protected]; [email protected]; [email protected]; > [email protected]; Jose Ignacio Tornos Martinez <[email protected]> > Subject: [Intel-wired-lan] [PATCH net v7 4/4] ice: skip unnecessary VF re= set when > setting trust >=20 > Similar to the i40e fix, ice_set_vf_trust() unconditionally calls > ice_reset_vf() when the trust setting changes. While the delay is smaller= than > i40e, this reset is still unnecessary in most cases. >=20 > When granting trust, no reset is needed - we can just set the capability = flag to > allow privileged operations. >=20 > When revoking trust, we only need to reset (conservative approach) if the= VF has > actually configured advanced features that require cleanup (MAC LLDP filt= ers, > promiscuous mode). For VFs in a clean state, we can safely change the tru= st > setting without the disruptive reset. >=20 > When we do reset, we maintain the original ice pattern that has been reli= able in > production: cleanup LLDP filters first, then set vf->trusted, then reset.= This > ensures the privilege capability bit is handled correctly during reset re= build. >=20 > When we don't reset, we manually handle the capability flag via helper fu= nction, > eliminating the delay. >=20 > Signed-off-by: Jose Ignacio Tornos Martinez <[email protected]> > Reviewed-by: Aleksandr Loktionov <[email protected]> > --- > v7: Rebase on current net tree (no code changes from v6) > v6: https://lore.kernel.org/all/[email protected]= / >=20 > drivers/net/ethernet/intel/ice/ice_sriov.c | 33 +++++++++++++++++++--- > 1 file changed, 29 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c > b/drivers/net/ethernet/intel/ice/ice_sriov.c > index 7e00e091756d..XXXXXXXXXXXXXXXX 100644 > --- a/drivers/net/ethernet/intel/ice/ice_sriov.c > +++ b/drivers/net/ethernet/intel/ice/ice_sriov.c > @@ -1364,6 +1364,23 @@ int ice_set_vf_mac(struct net_device *netdev, int Tested-by: Rafal Romanowski <[email protected]>