> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Loktionov, Aleksandr > Sent: Wednesday, April 29, 2026 11:18 AM > To: Vincent Chen <[email protected]>; Nguyen, Anthony L > <[email protected]>; Kitszel, Przemyslaw > <[email protected]> > Cc: [email protected]; [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected] > Subject: Re: [Intel-wired-lan] [PATCH 2/2] ice: remove redundant switchdev > check in ice_eswitch_attach_vf() > > > > > -----Original Message----- > > From: Intel-wired-lan <[email protected]> On Behalf > > Of Vincent Chen via Intel-wired-lan > > Sent: Wednesday, April 29, 2026 8:51 AM > > To: Nguyen, Anthony L <[email protected]>; Kitszel, > > Przemyslaw <[email protected]> > > Cc: [email protected]; [email protected]; [email protected]; > > [email protected]; [email protected]; [email protected]; > > [email protected]; [email protected] > > Subject: [Intel-wired-lan] [PATCH 2/2] ice: remove redundant switchdev > > check in ice_eswitch_attach_vf() > > > > All callers of ice_eswitch_attach_vf() check the switchdev mode before > > calling the function, the internal switchdev mode check in > > ice_eswitch_attach_vf() is redundant. Remove this check to align with > > the design pattern used for ice_eswitch_attach_sf(), where the caller > > is responsible for checking switchdev mode before attachment. > > > > Signed-off-by: Vincent Chen <[email protected]> > > --- > > drivers/net/ethernet/intel/ice/ice_eswitch.c | 3 --- > > 1 file changed, 3 deletions(-) > > > > diff --git a/drivers/net/ethernet/intel/ice/ice_eswitch.c > > b/drivers/net/ethernet/intel/ice/ice_eswitch.c > > index 2e4f0969035f..c709decb26d5 100644 > > --- a/drivers/net/ethernet/intel/ice/ice_eswitch.c > > +++ b/drivers/net/ethernet/intel/ice/ice_eswitch.c > > @@ -512,9 +512,6 @@ int ice_eswitch_attach_vf(struct ice_pf *pf, > > struct ice_vf *vf) > > struct ice_repr *repr; > > int err; > > > > - if (!ice_is_eswitch_mode_switchdev(pf)) > > - return 0; > > - > > repr = ice_repr_create_vf(vf); > > if (IS_ERR(repr)) > > return PTR_ERR(repr); > > -- > > 2.34.1 > > Reviewed-by: Aleksandr Loktionov <[email protected]>
Tested-by: Rafal Romanowski <[email protected]>
