test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Niklas Söderlund" <niklas.soderlund@corigine.com>
To: dts@dpdk.org
Cc: oss-drivers@corigine.com, "Qin Ke" <qin.ke@corigine.com>,
	"Niklas Söderlund" <niklas.soderlund@corigine.com>,
	"Chaoyong He" <chaoyong.he@corigine.com>
Subject: [PATCH v2 3/5] nics/net_device: add support for dual-port nfp NIC with single PCI address
Date: Thu,  9 Feb 2023 16:27:15 +0100	[thread overview]
Message-ID: <20230209152717.4057220-4-niklas.soderlund@corigine.com> (raw)
In-Reply-To: <20230209152717.4057220-1-niklas.soderlund@corigine.com>

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


  parent reply	other threads:[~2023-02-09 15:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Niklas Söderlund [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230209152717.4057220-4-niklas.soderlund@corigine.com \
    --to=niklas.soderlund@corigine.com \
    --cc=chaoyong.he@corigine.com \
    --cc=dts@dpdk.org \
    --cc=oss-drivers@corigine.com \
    --cc=qin.ke@corigine.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).