Skip to contentSkip to conversation

ice: allow creating VFs for !CONFIG_NET_SWITCHDEV

PATCH In review Maciej Fijalkowski 3 participants 3 messages Apr 1, 2022 – Apr 5, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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.

CC Grzegorz Nitka <[email protected]>
Fixes 1a1c40df2e80 ("ice: set and release switchdev environment")
---
 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
index bd58d9d2e565..6a413331572b 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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 -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.

CC Grzegorz Nitka <[email protected]>
Fixes 1a1c40df2e80 ("ice: set and release switchdev environment")
---
 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
index bd58d9d2e565..6a413331572b 100644
@@ -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

Tested-by on v1 1/1
#2 lore raw
In reply to Maciej Fijalkowski

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_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.

CC Grzegorz Nitka <[email protected]>
Fixes 1a1c40df2e80 ("ice: set and release switchdev environment")
---
 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
index bd58d9d2e565..6a413331572b 100644