[PATCH 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address
Niklas Söderlund
niklas.soderlund at corigine.com
Wed Feb 8 17:46:22 CET 2023
From: Qin Ke <qin.ke at corigine.com>
Corigine and Netronome physical dual-port adapter which use driver of nfp
share single PCI adress. This limits the dts framework to use both the two
physical ports of nfp for testing
Add support for it by utilizing both the fields of intf_name and intf2_name
Signed-off-by: Qin Ke <qin.ke at corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund at corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he at corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund at corigine.com>
---
framework/tester.py | 2 +-
nics/net_device.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/framework/tester.py b/framework/tester.py
index 89f654d4019c..a8342a2f36c9 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -518,7 +518,7 @@ class Tester(Crb):
}
)
- # return if port is not connect x3
+ # return if port does not have two interface
if not port.get_interface2_name():
continue
diff --git a/nics/net_device.py b/nics/net_device.py
index 85245d2917db..3eec5c7f2f3d 100644
--- a/nics/net_device.py
+++ b/nics/net_device.py
@@ -194,8 +194,8 @@ class NetDevice(object):
else:
self.intf_name = out
- # not a complete fix for CX3.
- if len(out.split()) > 1 and self.default_driver == "mlx4_core":
+ # Incomplete fix for dual-ports adapters (CX3, NFP) which present both interfaces on a single PCI location
+ if len(out.split()) > 1 and self.default_driver in ['mlx4_core', 'nfp']:
self.intf_name = out.split()[0]
self.intf2_name = out.split()[1]
--
2.39.1
More information about the dts
mailing list