[Intel-wired-lan] [PATCH net v7 4/4] ice: skip unnecessary VF reset when setting trust

Romanowski, Rafal rafal.romanowski at intel.com
Thu Jul 30 07:09:48 UTC 2026


> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Jose
> Ignacio Tornos Martinez
> Sent: Tuesday, June 23, 2026 12:18 PM
> To: netdev at vger.kernel.org
> Cc: intel-wired-lan at lists.osuosl.org; Kitszel, Przemyslaw
> <przemyslaw.kitszel at intel.com>; Loktionov, Aleksandr
> <aleksandr.loktionov at intel.com>; Keller, Jacob E <jacob.e.keller at intel.com>;
> horms at kernel.org; Nguyen, Anthony L <anthony.l.nguyen at intel.com>;
> davem at davemloft.net; edumazet at google.com; kuba at kernel.org;
> pabeni at redhat.com; Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
> Subject: [Intel-wired-lan] [PATCH net v7 4/4] ice: skip unnecessary VF reset when
> setting trust
> 
> 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.
> 
> When granting trust, no reset is needed - we can just set the capability flag to
> allow privileged operations.
> 
> When revoking trust, we only need to reset (conservative approach) if the VF has
> actually configured advanced features that require cleanup (MAC LLDP filters,
> promiscuous mode). For VFs in a clean state, we can safely change the trust
> setting without the disruptive reset.
> 
> When we do reset, we maintain the original ice pattern that has been reliable in
> production: cleanup LLDP filters first, then set vf->trusted, then reset. This
> ensures the privilege capability bit is handled correctly during reset rebuild.
> 
> When we don't reset, we manually handle the capability flag via helper function,
> eliminating the delay.
> 
> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm at redhat.com>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
> ---
> v7: Rebase on current net tree (no code changes from v6)
> v6: https://lore.kernel.org/all/20260619061321.8554-5-jtornosm@redhat.com/
> 
>  drivers/net/ethernet/intel/ice/ice_sriov.c | 33 +++++++++++++++++++---
>  1 file changed, 29 insertions(+), 4 deletions(-)
> 
> 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 <rafal.romanowski at intel.com>



More information about the Intel-wired-lan mailing list