ice: allow creating VFs for !CONFIG_NET_SWITCHDEV
Subsystems (3)
PATCH 1/1 ice: allow creating VFs for !CONFIG_NET_SWITCHDEV
Currently for !CONFIG_NET_SWITCHDEV kernel builds it is not possible to create VFs properly as call to ice_eswitch_configure() returns -EOPNOTSUPP for us. This is because CONFIG_ICE_SWITCHDEV depends on CONFIG_NET_SWITCHDEV.
Change the ice_eswitch_configure() implementation for !CONFIG_ICE_SWITCHDEV to return 0 instead -EOPNOTSUPP and let ice_ena_vfs() finish its work properly.
--- drivers/net/ethernet/intel/ice/ice_eswitch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_eswitch.h +1 -1
@@ -52,7 +52,7 @@ static inline void ice_eswitch_update_repr(struct ice_vsi *vsi) { }static inline int ice_eswitch_configure (struct ice_pf *pf) { -return -EOPNOTSUPP ; +return 0 ; }static inline int ice_eswitch_rebuild (struct ice_pf *pf)
Signature · 1 line
2.27.0
Quoted 33 lines · Maciej Fijalkowski
Currently for !CONFIG_NET_SWITCHDEV kernel builds it is not possible to create VFs properly as call to
ice_eswitch_configure()returns-EOPNOTSUPPfor us. This is becauseCONFIG_ICE_SWITCHDEVdepends onCONFIG_NET_SWITCHDEV.Change the
ice_eswitch_configure()implementation for !CONFIG_ICE_SWITCHDEV to return 0 instead-EOPNOTSUPPand letice_ena_vfs()finish its work properly.CC Grzegorz Nitka <[email protected]>Fixes 1a1c40df2e80 ("ice: set and release switchdev environment")Signed-off-by Maciej Fijalkowski <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>--- drivers/net/ethernet/intel/ice/ice_eswitch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/ice/ice_eswitch.h +1
-1@@ -52,7 +52,7 @@ static inline void ice_eswitch_update_repr(struct ice_vsi *vsi) { }static inline int ice_eswitch_configure (struct ice_pf *pf) { -return -EOPNOTSUPP ; +return 0 ; }static inline int ice_eswitch_rebuild (struct ice_pf *pf)Signature · 1 line
2.27.0
Thanks for this fix!
Quoted 4 lines
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan at osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
drivers/net/ethernet/intel/ice/ice_eswitch.h
Quoted 35 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Maciej Fijalkowski
Sent: Friday, April 1, 2022 2:55 PM
To: intel-wired-lan at lists.osuosl.org
Cc: Swiatkowski, Michal <[email protected]>; netdev at vger.kernel.org; kuba at kernel.org; davem at davemloft.net; Karlsson, Magnus <[email protected]>
Subject: [Intel-wired-lan] [PATCH intel-net] ice: allow creating VFs for !CONFIG_NET_SWITCHDEVCurrently for !CONFIG_NET_SWITCHDEV kernel builds it is not possible to create VFs properly as call to
ice_eswitch_configure()returns-EOPNOTSUPPfor us. This is becauseCONFIG_ICE_SWITCHDEVdepends onCONFIG_NET_SWITCHDEV.Change the
ice_eswitch_configure()implementation for !CONFIG_ICE_SWITCHDEV to return 0 instead-EOPNOTSUPPand letice_ena_vfs()finish its work properly.CC Grzegorz Nitka <[email protected]>Fixes 1a1c40df2e80 ("ice: set and release switchdev environment")Signed-off-by Maciej Fijalkowski <[email protected]>Signed-off-by Michal Swiatkowski <[email protected]>--- drivers/net/ethernet/intel/ice/ice_eswitch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ethernet/intel/ice/ice_eswitch.h +0
-0