* [PATCH 0/5] Add initial support for NFP PMD
@ 2023-02-08 16:46 Niklas Söderlund
2023-02-08 16:46 ` [PATCH 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address Niklas Söderlund
` (5 more replies)
0 siblings, 6 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-08 16:46 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund
Hello,
This patch series aims to add support for the NFP PMD driver to DTS. The
DTS framework lacks support in some ares around support for dual-port
NICs with a single PCI address, which NFP is.
Patches 1-3 add support for dual-port NIC with single PCI address in
restoring interfaces, rescanning ports, mapping ports and getting second
interface.
Patch 4 extends the timeout when binding the kernel driver as NFP can
take some time to load its firmware. Finally patch 5 adds the Netronome
and Corigine PCI IDs to allow DTS to recognise the devices.
Qin Ke (5):
framework/dut: add support for restoring dual-port NIC with single PCI
address
framework/dut: only map ports not already matched
nics/net_device: add support for dual-port nfp NIC with single PCI
address
framework/dut: add longer timeout for loading driver and firmware
framework/setting: enable Corigine and Netronome NIC for dts
framework/dut.py | 30 +++++++++++++++++++++---------
framework/settings.py | 20 ++++++++++++++++++++
framework/tester.py | 3 ++-
nics/net_device.py | 4 ++--
4 files changed, 45 insertions(+), 12 deletions(-)
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address
2023-02-08 16:46 [PATCH 0/5] Add initial support for NFP PMD Niklas Söderlund
@ 2023-02-08 16:46 ` Niklas Söderlund
2023-02-08 16:46 ` [PATCH 2/5] framework/dut: only map ports not already matched Niklas Söderlund
` (4 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-08 16:46 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
The functions of restore_interfaces and rescan_ports get the incorrect
interface and mac for the second port of the NIC which has two ports but
single PCI address.
Add support for it by adding the filed of port_id for port_info, then it
can get correct interface and mac by distinguishing port_id.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
framework/dut.py | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/framework/dut.py b/framework/dut.py
index 481c0cb6abe8..eb988ac3e265 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -402,9 +402,9 @@ class Dut(Crb):
"""
Restore Linux interfaces.
"""
- for port in self.ports_info:
- pci_bus = port["pci"]
- pci_id = port["type"]
+ for port_info in self.ports_info:
+ pci_bus = port_info["pci"]
+ pci_id = port_info["type"]
# get device driver
driver = settings.get_nic_driver(pci_id)
if driver is not None:
@@ -431,7 +431,10 @@ class Dut(Crb):
pull_retries = 5
itf = "N/A"
while pull_retries > 0:
- itf = port.get_interface_name()
+ if port_info["port_id"] == 1:
+ itf = port.get_interface_name()
+ else:
+ itf = port.get_interface2_name()
if not itf or itf == "N/A":
time.sleep(1)
pull_retries -= 1
@@ -865,13 +868,19 @@ class Dut(Crb):
for port_info in self.ports_info:
port = port_info["port"]
- intf = port.get_interface_name()
+ if port_info["port_id"] == 1:
+ intf = port.get_interface_name()
+ else:
+ intf = port.get_interface2_name()
port_info["intf"] = intf
out = self.send_expect("ip link show %s" % intf, "# ")
if "DOWN" in out:
self.send_expect("ip link set %s up" % intf, "# ")
time.sleep(5)
- port_info["mac"] = port.get_mac_addr()
+ if port_info["port_id"] == 1:
+ port_info["mac"] = port.get_mac_addr()
+ else:
+ port_info["mac"] = port.get_intf2_mac_addr()
out = self.send_expect(
"ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'"
% intf,
@@ -1017,6 +1026,7 @@ class Dut(Crb):
"type": pci_id,
"numa": numa,
"intf": intf,
+ "port_id": 1,
"mac": macaddr,
}
)
@@ -1035,6 +1045,7 @@ class Dut(Crb):
"type": pci_id,
"numa": numa,
"intf": intf,
+ "port_id": 2,
"mac": macaddr,
}
)
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 2/5] framework/dut: only map ports not already matched
2023-02-08 16:46 [PATCH 0/5] Add initial support for NFP PMD Niklas Söderlund
2023-02-08 16:46 ` [PATCH 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address Niklas Söderlund
@ 2023-02-08 16:46 ` Niklas Söderlund
2023-02-08 16:46 ` [PATCH 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address Niklas Söderlund
` (3 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-08 16:46 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
When NIC has two ports but single PCI address, the function of
map_available_ports_uncached will match both the two dut ports
with the first tester port beacause the two tester ports have the
same PCI address as the only matching condition.
Add support for it by only mapping ports not already matched. It
ignores the tester port which has been matched and added to dut
ports map, then the second tester port can be matched correctly.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
framework/dut.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/framework/dut.py b/framework/dut.py
index eb988ac3e265..df6986ed450c 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -1249,7 +1249,7 @@ class Dut(Crb):
break
elif (
self.tester.ports_info[remotePort]["pci"].lower()
- == peer.lower()
+ == peer.lower() and hits[remotePort] == False
):
hits[remotePort] = True
self.ports_map[dutPort] = remotePort
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address
2023-02-08 16:46 [PATCH 0/5] Add initial support for NFP PMD Niklas Söderlund
2023-02-08 16:46 ` [PATCH 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address Niklas Söderlund
2023-02-08 16:46 ` [PATCH 2/5] framework/dut: only map ports not already matched Niklas Söderlund
@ 2023-02-08 16:46 ` Niklas Söderlund
2023-02-08 16:46 ` [PATCH 4/5] framework/dut: add longer timeout for loading driver and firmware Niklas Söderlund
` (2 subsequent siblings)
5 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-08 16:46 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@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@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@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
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 4/5] framework/dut: add longer timeout for loading driver and firmware
2023-02-08 16:46 [PATCH 0/5] Add initial support for NFP PMD Niklas Söderlund
` (2 preceding siblings ...)
2023-02-08 16:46 ` [PATCH 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address Niklas Söderlund
@ 2023-02-08 16:46 ` Niklas Söderlund
2023-02-08 16:46 ` [PATCH 5/5] framework/setting: enable Corigine and Netronome NIC for dts Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
5 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-08 16:46 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
Nfp NIC may take a long time whiling loading its driver and firmware
at probe time. Add longer timeout to ensure that these operations can
excutes successfully and stably for all NIC.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
framework/dut.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/framework/dut.py b/framework/dut.py
index df6986ed450c..ed69046db6a5 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -424,9 +424,10 @@ class Dut(Crb):
)
# bind to linux kernel driver
if not self.is_container:
- self.send_expect("modprobe %s" % driver, "# ")
+ self.send_expect("modprobe %s" % driver, "# ", timeout=30)
self.send_expect(
- "echo %s > /sys/bus/pci/drivers/%s/bind" % (pci_bus, driver), "# "
+ "echo %s > /sys/bus/pci/drivers/%s/bind" % (pci_bus, driver), "# ",
+ timeout=30,
)
pull_retries = 5
itf = "N/A"
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 5/5] framework/setting: enable Corigine and Netronome NIC for dts
2023-02-08 16:46 [PATCH 0/5] Add initial support for NFP PMD Niklas Söderlund
` (3 preceding siblings ...)
2023-02-08 16:46 ` [PATCH 4/5] framework/dut: add longer timeout for loading driver and firmware Niklas Söderlund
@ 2023-02-08 16:46 ` Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
5 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-08 16:46 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
Add the vendor id, device id and driver of Corigine and Netronome
NIC to the support list of dts.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
framework/settings.py | 20 ++++++++++++++++++++
framework/tester.py | 1 +
2 files changed, 21 insertions(+)
diff --git a/framework/settings.py b/framework/settings.py
index 48e6d4430937..5c8db15355fb 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -87,6 +87,16 @@ NICS = {
"IGC-I226_LM": "8086:125b",
"brcm_57414": "14e4:16d7",
"brcm_P2100G": "14e4:1750",
+ "netronome_3800_pf": "19ee:3800",
+ "netronome_3800_vf": "19ee:3803",
+ "netronome_4000_pf": "19ee:4000",
+ "netronome_6000_pf": "19ee:6000",
+ "netronome_6000_vf": "19ee:6003",
+ "corigine_3800_pf": "1da8:3800",
+ "corigine_3800_vf": "1da8:3803",
+ "corigine_4000_pf": "1da8:4000",
+ "corigine_6000_pf": "1da8:6000",
+ "corigine_6000_vf": "1da8:6003",
}
ETH_700_SERIES = (
@@ -171,6 +181,16 @@ DRIVERS = {
"IGC-I226_LM": "igc",
"brcm_57414": "bnxt_en",
"brcm_P2100G": "bnxt_en",
+ "netronome_3800_pf": "nfp",
+ "netronome_3800_vf": "nfp_vf",
+ "netronome_4000_pf": "nfp",
+ "netronome_6000_pf": "nfp",
+ "netronome_6000_vf": "nfp_vf",
+ "corigine_3800_pf": "nfp",
+ "corigine_3800_vf": "nfp_vf",
+ "corigine_4000_pf": "nfp",
+ "corigine_6000_pf": "nfp",
+ "corigine_6000_vf": "nfp_vf",
}
"""
diff --git a/framework/tester.py b/framework/tester.py
index a8342a2f36c9..5e6c72ad5d98 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -317,6 +317,7 @@ class Tester(Crb):
self.send_expect("modprobe ixgbe", "# ", 20)
self.send_expect("modprobe e1000e", "# ", 20)
self.send_expect("modprobe e1000", "# ", 20)
+ self.send_expect("modprobe nfp", "# ", 20)
try:
for (pci_bus, pci_id) in self.pci_devices_info:
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 0/5] Add initial support for NFP PMD
2023-02-08 16:46 [PATCH 0/5] Add initial support for NFP PMD Niklas Söderlund
` (4 preceding siblings ...)
2023-02-08 16:46 ` [PATCH 5/5] framework/setting: enable Corigine and Netronome NIC for dts Niklas Söderlund
@ 2023-02-09 15:27 ` Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address Niklas Söderlund
` (6 more replies)
5 siblings, 7 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-09 15:27 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund
Hello,
This patch series aims to add support for the NFP PMD driver to DTS. The
DTS framework lacks support in some ares around support for dual-port
NICs with a single PCI address, which NFP is.
Patches 1-3 add support for dual-port NIC with single PCI address in
restoring interfaces, rescanning ports, mapping ports and getting second
interface.
Patch 4 extends the timeout when binding the kernel driver as NFP can
take some time to load its firmware. Finally patch 5 adds the Netronome
and Corigine PCI IDs to allow DTS to recognise the devices.
* Changes since v1
- Fix format.sh warnings
Qin Ke (5):
framework/dut: add support for restoring dual-port NIC with single PCI
address
framework/dut: only map ports not already matched
nics/net_device: add support for dual-port nfp NIC with single PCI
address
framework/dut: add longer timeout for loading driver and firmware
framework/setting: enable Corigine and Netronome NIC for dts
framework/dut.py | 30 ++++++++++++++++++++++--------
framework/settings.py | 20 ++++++++++++++++++++
framework/tester.py | 3 ++-
nics/net_device.py | 4 ++--
4 files changed, 46 insertions(+), 11 deletions(-)
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
@ 2023-02-09 15:27 ` Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 2/5] framework/dut: only map ports not already matched Niklas Söderlund
` (5 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-09 15:27 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
The functions of restore_interfaces and rescan_ports get the incorrect
interface and mac for the second port of the NIC which has two ports but
single PCI address.
Add support for it by adding the filed of port_id for port_info, then it
can get correct interface and mac by distinguishing port_id.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
framework/dut.py | 23 +++++++++++++++++------
1 file changed, 17 insertions(+), 6 deletions(-)
diff --git a/framework/dut.py b/framework/dut.py
index 481c0cb6abe8..eb988ac3e265 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -402,9 +402,9 @@ class Dut(Crb):
"""
Restore Linux interfaces.
"""
- for port in self.ports_info:
- pci_bus = port["pci"]
- pci_id = port["type"]
+ for port_info in self.ports_info:
+ pci_bus = port_info["pci"]
+ pci_id = port_info["type"]
# get device driver
driver = settings.get_nic_driver(pci_id)
if driver is not None:
@@ -431,7 +431,10 @@ class Dut(Crb):
pull_retries = 5
itf = "N/A"
while pull_retries > 0:
- itf = port.get_interface_name()
+ if port_info["port_id"] == 1:
+ itf = port.get_interface_name()
+ else:
+ itf = port.get_interface2_name()
if not itf or itf == "N/A":
time.sleep(1)
pull_retries -= 1
@@ -865,13 +868,19 @@ class Dut(Crb):
for port_info in self.ports_info:
port = port_info["port"]
- intf = port.get_interface_name()
+ if port_info["port_id"] == 1:
+ intf = port.get_interface_name()
+ else:
+ intf = port.get_interface2_name()
port_info["intf"] = intf
out = self.send_expect("ip link show %s" % intf, "# ")
if "DOWN" in out:
self.send_expect("ip link set %s up" % intf, "# ")
time.sleep(5)
- port_info["mac"] = port.get_mac_addr()
+ if port_info["port_id"] == 1:
+ port_info["mac"] = port.get_mac_addr()
+ else:
+ port_info["mac"] = port.get_intf2_mac_addr()
out = self.send_expect(
"ip -family inet6 address show dev %s | awk '/inet6/ { print $2 }'"
% intf,
@@ -1017,6 +1026,7 @@ class Dut(Crb):
"type": pci_id,
"numa": numa,
"intf": intf,
+ "port_id": 1,
"mac": macaddr,
}
)
@@ -1035,6 +1045,7 @@ class Dut(Crb):
"type": pci_id,
"numa": numa,
"intf": intf,
+ "port_id": 2,
"mac": macaddr,
}
)
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 2/5] framework/dut: only map ports not already matched
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address Niklas Söderlund
@ 2023-02-09 15:27 ` Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address Niklas Söderlund
` (4 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-09 15:27 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
When NIC has two ports but single PCI address, the function of
map_available_ports_uncached will match both the two dut ports
with the first tester port beacause the two tester ports have the
same PCI address as the only matching condition.
Add support for it by only mapping ports not already matched. It
ignores the tester port which has been matched and added to dut
ports map, then the second tester port can be matched correctly.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
framework/dut.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/framework/dut.py b/framework/dut.py
index eb988ac3e265..64de28a5fdd8 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -1250,6 +1250,7 @@ class Dut(Crb):
elif (
self.tester.ports_info[remotePort]["pci"].lower()
== peer.lower()
+ and hits[remotePort] == False
):
hits[remotePort] = True
self.ports_map[dutPort] = remotePort
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 2/5] framework/dut: only map ports not already matched Niklas Söderlund
@ 2023-02-09 15:27 ` Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 4/5] framework/dut: add longer timeout for loading driver and firmware Niklas Söderlund
` (3 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-09 15:27 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@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@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@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..0f9c1af46a77 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
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 4/5] framework/dut: add longer timeout for loading driver and firmware
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
` (2 preceding siblings ...)
2023-02-09 15:27 ` [PATCH v2 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address Niklas Söderlund
@ 2023-02-09 15:27 ` Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 5/5] framework/setting: enable Corigine and Netronome NIC for dts Niklas Söderlund
` (2 subsequent siblings)
6 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-09 15:27 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
Nfp NIC may take a long time whiling loading its driver and firmware
at probe time. Add longer timeout to ensure that these operations can
excutes successfully and stably for all NIC.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
framework/dut.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/framework/dut.py b/framework/dut.py
index 64de28a5fdd8..31c04e4a8044 100644
--- a/framework/dut.py
+++ b/framework/dut.py
@@ -424,9 +424,11 @@ class Dut(Crb):
)
# bind to linux kernel driver
if not self.is_container:
- self.send_expect("modprobe %s" % driver, "# ")
+ self.send_expect("modprobe %s" % driver, "# ", timeout=30)
self.send_expect(
- "echo %s > /sys/bus/pci/drivers/%s/bind" % (pci_bus, driver), "# "
+ "echo %s > /sys/bus/pci/drivers/%s/bind" % (pci_bus, driver),
+ "# ",
+ timeout=30,
)
pull_retries = 5
itf = "N/A"
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v2 5/5] framework/setting: enable Corigine and Netronome NIC for dts
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
` (3 preceding siblings ...)
2023-02-09 15:27 ` [PATCH v2 4/5] framework/dut: add longer timeout for loading driver and firmware Niklas Söderlund
@ 2023-02-09 15:27 ` Niklas Söderlund
2023-03-06 13:06 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
2023-03-07 3:35 ` Tu, Lijuan
6 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-02-09 15:27 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke, Niklas Söderlund, Chaoyong He
From: Qin Ke <qin.ke@corigine.com>
Add the vendor id, device id and driver of Corigine and Netronome
NIC to the support list of dts.
Signed-off-by: Qin Ke <qin.ke@corigine.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@corigine.com>
Reviewed-by: Chaoyong He <chaoyong.he@corigine.com>
Signed-off-by: Niklas Söderlund <niklas.soderlund@corigine.com>
---
framework/settings.py | 20 ++++++++++++++++++++
framework/tester.py | 1 +
2 files changed, 21 insertions(+)
diff --git a/framework/settings.py b/framework/settings.py
index 48e6d4430937..5c8db15355fb 100644
--- a/framework/settings.py
+++ b/framework/settings.py
@@ -87,6 +87,16 @@ NICS = {
"IGC-I226_LM": "8086:125b",
"brcm_57414": "14e4:16d7",
"brcm_P2100G": "14e4:1750",
+ "netronome_3800_pf": "19ee:3800",
+ "netronome_3800_vf": "19ee:3803",
+ "netronome_4000_pf": "19ee:4000",
+ "netronome_6000_pf": "19ee:6000",
+ "netronome_6000_vf": "19ee:6003",
+ "corigine_3800_pf": "1da8:3800",
+ "corigine_3800_vf": "1da8:3803",
+ "corigine_4000_pf": "1da8:4000",
+ "corigine_6000_pf": "1da8:6000",
+ "corigine_6000_vf": "1da8:6003",
}
ETH_700_SERIES = (
@@ -171,6 +181,16 @@ DRIVERS = {
"IGC-I226_LM": "igc",
"brcm_57414": "bnxt_en",
"brcm_P2100G": "bnxt_en",
+ "netronome_3800_pf": "nfp",
+ "netronome_3800_vf": "nfp_vf",
+ "netronome_4000_pf": "nfp",
+ "netronome_6000_pf": "nfp",
+ "netronome_6000_vf": "nfp_vf",
+ "corigine_3800_pf": "nfp",
+ "corigine_3800_vf": "nfp_vf",
+ "corigine_4000_pf": "nfp",
+ "corigine_6000_pf": "nfp",
+ "corigine_6000_vf": "nfp_vf",
}
"""
diff --git a/framework/tester.py b/framework/tester.py
index a8342a2f36c9..5e6c72ad5d98 100644
--- a/framework/tester.py
+++ b/framework/tester.py
@@ -317,6 +317,7 @@ class Tester(Crb):
self.send_expect("modprobe ixgbe", "# ", 20)
self.send_expect("modprobe e1000e", "# ", 20)
self.send_expect("modprobe e1000", "# ", 20)
+ self.send_expect("modprobe nfp", "# ", 20)
try:
for (pci_bus, pci_id) in self.pci_devices_info:
--
2.39.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v2 0/5] Add initial support for NFP PMD
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
` (4 preceding siblings ...)
2023-02-09 15:27 ` [PATCH v2 5/5] framework/setting: enable Corigine and Netronome NIC for dts Niklas Söderlund
@ 2023-03-06 13:06 ` Niklas Söderlund
2023-03-07 3:35 ` Tu, Lijuan
6 siblings, 0 replies; 14+ messages in thread
From: Niklas Söderlund @ 2023-03-06 13:06 UTC (permalink / raw)
To: dts; +Cc: oss-drivers, Qin Ke
Hi all,
A small ping on this series.
On 2023-02-09 16:27:12 +0100, Niklas Söderlund wrote:
> Hello,
>
> This patch series aims to add support for the NFP PMD driver to DTS. The
> DTS framework lacks support in some ares around support for dual-port
> NICs with a single PCI address, which NFP is.
>
> Patches 1-3 add support for dual-port NIC with single PCI address in
> restoring interfaces, rescanning ports, mapping ports and getting second
> interface.
>
> Patch 4 extends the timeout when binding the kernel driver as NFP can
> take some time to load its firmware. Finally patch 5 adds the Netronome
> and Corigine PCI IDs to allow DTS to recognise the devices.
>
> * Changes since v1
> - Fix format.sh warnings
>
> Qin Ke (5):
> framework/dut: add support for restoring dual-port NIC with single PCI
> address
> framework/dut: only map ports not already matched
> nics/net_device: add support for dual-port nfp NIC with single PCI
> address
> framework/dut: add longer timeout for loading driver and firmware
> framework/setting: enable Corigine and Netronome NIC for dts
>
> framework/dut.py | 30 ++++++++++++++++++++++--------
> framework/settings.py | 20 ++++++++++++++++++++
> framework/tester.py | 3 ++-
> nics/net_device.py | 4 ++--
> 4 files changed, 46 insertions(+), 11 deletions(-)
>
> --
> 2.39.1
>
--
Kind Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [PATCH v2 0/5] Add initial support for NFP PMD
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
` (5 preceding siblings ...)
2023-03-06 13:06 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
@ 2023-03-07 3:35 ` Tu, Lijuan
6 siblings, 0 replies; 14+ messages in thread
From: Tu, Lijuan @ 2023-03-07 3:35 UTC (permalink / raw)
To: Niklas Söderlund, dts; +Cc: oss-drivers, Qin Ke
> -----Original Message-----
> From: Niklas Söderlund <niklas.soderlund@corigine.com>
> Sent: Thursday, February 9, 2023 11:27 PM
> To: dts@dpdk.org
> Cc: oss-drivers@corigine.com; Qin Ke <qin.ke@corigine.com>; Niklas Söderlund
> <niklas.soderlund@corigine.com>
> Subject: [PATCH v2 0/5] Add initial support for NFP PMD
>
> Hello,
>
> This patch series aims to add support for the NFP PMD driver to DTS. The DTS
> framework lacks support in some ares around support for dual-port NICs with a
> single PCI address, which NFP is.
>
> Patches 1-3 add support for dual-port NIC with single PCI address in restoring
> interfaces, rescanning ports, mapping ports and getting second interface.
>
> Patch 4 extends the timeout when binding the kernel driver as NFP can take
> some time to load its firmware. Finally patch 5 adds the Netronome and
> Corigine PCI IDs to allow DTS to recognise the devices.
>
> * Changes since v1
> - Fix format.sh warnings
>
> Qin Ke (5):
> framework/dut: add support for restoring dual-port NIC with single PCI
> address
> framework/dut: only map ports not already matched
> nics/net_device: add support for dual-port nfp NIC with single PCI
> address
> framework/dut: add longer timeout for loading driver and firmware
> framework/setting: enable Corigine and Netronome NIC for dts
>
> framework/dut.py | 30 ++++++++++++++++++++++--------
> framework/settings.py | 20 ++++++++++++++++++++
> framework/tester.py | 3 ++-
> nics/net_device.py | 4 ++--
> 4 files changed, 46 insertions(+), 11 deletions(-)
Applied the series, thanks
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2023-03-07 3:35 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-08 16:46 [PATCH 0/5] Add initial support for NFP PMD Niklas Söderlund
2023-02-08 16:46 ` [PATCH 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address Niklas Söderlund
2023-02-08 16:46 ` [PATCH 2/5] framework/dut: only map ports not already matched Niklas Söderlund
2023-02-08 16:46 ` [PATCH 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address Niklas Söderlund
2023-02-08 16:46 ` [PATCH 4/5] framework/dut: add longer timeout for loading driver and firmware Niklas Söderlund
2023-02-08 16:46 ` [PATCH 5/5] framework/setting: enable Corigine and Netronome NIC for dts Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 1/5] framework/dut: add support for restoring dual-port NIC with single PCI address Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 2/5] framework/dut: only map ports not already matched Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 4/5] framework/dut: add longer timeout for loading driver and firmware Niklas Söderlund
2023-02-09 15:27 ` [PATCH v2 5/5] framework/setting: enable Corigine and Netronome NIC for dts Niklas Söderlund
2023-03-06 13:06 ` [PATCH v2 0/5] Add initial support for NFP PMD Niklas Söderlund
2023-03-07 3:35 ` Tu, Lijuan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).