Skip to contentSkip to conversation

ice: Fix VF Reset when interface in a failed over aggregate

PATCH In review Dave Ertman 2 participants 2 messages Oct 24, 2023 – Oct 30, 2023

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

PATCH 1/1 ice: Fix VF Reset when interface in a failed over aggregate

There is an error interface has the following conditions:
- PF is in an aggregate (bond)
- PF has VFs created on it
- bond is in a state where it is failed-over to the secondary interface
- A VF reset is issued on one or more of those VFs

The issue is generated by the originating PF trying to tear down the VF resources and recreate them for the reset. Since the bond is failed over to the secondary interface the queue contexts are in a modified state.

To fix this issue, have the originating interface reclaim its resources prior to the tear-down and rebuild for the reset. Then after the reset is complete, move the resources back to the active interface.

---
 drivers/net/ethernet/intel/ice/ice_lag.c    |  2 +-
 drivers/net/ethernet/intel/ice/ice_lag.h    |  1 +
 drivers/net/ethernet/intel/ice/ice_vf_lib.c | 47 +++++++++++++++++++++
 3 files changed, 49 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/ice/ice_lag.c +1 -1
index b980f89dc892..9b915c0da06a 100644
@@ -664,7 +664,7 @@ void ice_lag_move_new_vf_nodes(struct ice_vf *vf)
  * @oldport: lport of previous interface
  * @newport: lport of destination interface
  */
-static void ice_lag_move_vf_nodes(struct ice_lag *lag, u8 oldport, u8 newport)
+void ice_lag_move_vf_nodes(struct ice_lag *lag, u8 oldport, u8 newport)
 {
 	struct ice_pf *pf;
 	int i;
drivers/net/ethernet/intel/ice/ice_lag.h +1 -0
index 9557e8605a07..b5e920c03ceb 100644
@@ -65,4 +65,5 @@ int ice_init_lag(struct ice_pf *pf);
 void ice_deinit_lag(struct ice_pf *pf);
 void ice_lag_rebuild(struct ice_pf *pf);
 bool ice_lag_is_switchdev_running(struct ice_pf *pf);
+void ice_lag_move_vf_nodes(struct ice_lag *lag, u8 oldport, u8 newport);
 #endif /* _ICE_LAG_H_ */
drivers/net/ethernet/intel/ice/ice_vf_lib.c +47 -0

72 lines not on this page · raw message

Signature · 6 lines
2.40.1

_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
#1 lore raw
Quoted 22 lines

-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Dave Ertman
Sent: Wednesday, October 25, 2023 12:07 AM
To: [email protected]
Subject: [Intel-wired-lan] [PATCH iwl-next] ice: Fix VF Reset when interface in a failed over aggregate

There is an error interface has the following conditions:
- PF is in an aggregate (bond)
- PF has VFs created on it
- bond is in a state where it is failed-over to the secondary interface
- A VF reset is issued on one or more of those VFs

The issue is generated by the originating PF trying to tear down the VF resources and recreate them for the reset. Since the bond is failed over to the secondary interface the queue contexts are in a modified state.

To fix this issue, have the originating interface reclaim its resources prior to the tear-down and rebuild for the reset. Then after the reset is complete, move the resources back to the active interface.

Quoted 7 lines
---
 drivers/net/ethernet/intel/ice/ice_lag.c    |  2 +-
 drivers/net/ethernet/intel/ice/ice_lag.h    |  1 +
 drivers/net/ethernet/intel/ice/ice_vf_lib.c | 47 +++++++++++++++++++++
 3 files changed, 49 insertions(+), 1 deletion(-)

We are observing traffic failure while testing this patch. VF to client and VF-VF ping stops working when VF reset is done using below command after LAG failover.

echo 1 > /sys/bus/pci/devices/0000\:0a\:01.0/reset
_______________________________________________
Intel-wired-lan mailing list [email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan