DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	Stephen Hemminger <sthemmin@microsoft.com>
Subject: [dpdk-dev] [PATCH v3 3/3] mlx4,5: handle 32 bit PCI domain
Date: Wed,  5 Jul 2017 09:55:33 -0700	[thread overview]
Message-ID: <20170705165533.20581-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20170705165533.20581-1-stephen@networkplumber.org>

The PCI domain in Azure maybe 32 bits. When device is passed through
the domain is synthesize from the internal GUID. The code that
parses for PCI address in Mellanox drivers needs to use wider
scanf format.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
---
v3 - add MLX4

 drivers/net/mlx4/mlx4.c        | 2 +-
 drivers/net/mlx5/mlx5_ethdev.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index 16cafae7d741..902a669c923a 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -5239,7 +5239,7 @@ mlx4_ibv_device_to_pci_addr(const struct ibv_device *device,
 		/* Extract information. */
 		if (sscanf(line,
 			   "PCI_SLOT_NAME="
-			   "%" SCNx16 ":%" SCNx8 ":%" SCNx8 ".%" SCNx8 "\n",
+			   "%" SCNx32 ":%" SCNx8 ":%" SCNx8 ".%" SCNx8 "\n",
 			   &pci_addr->domain,
 			   &pci_addr->bus,
 			   &pci_addr->devid,
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index 96bccd5fd201..039335e2e470 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -1185,7 +1185,7 @@ mlx5_ibv_device_to_pci_addr(const struct ibv_device *device,
 		/* Extract information. */
 		if (sscanf(line,
 			   "PCI_SLOT_NAME="
-			   "%" SCNx16 ":%" SCNx8 ":%" SCNx8 ".%" SCNx8 "\n",
+			   "%" SCNx32 ":%" SCNx8 ":%" SCNx8 ".%" SCNx8 "\n",
 			   &pci_addr->domain,
 			   &pci_addr->bus,
 			   &pci_addr->devid,
-- 
2.11.0

  parent reply	other threads:[~2017-07-05 16:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-05 16:55 [dpdk-dev] [PATCH v3 0/3] pci: handle 32 bit domain values Stephen Hemminger
2017-07-05 16:55 ` [dpdk-dev] [PATCH v3 1/3] pci: remove unnecessary casts from strtoul Stephen Hemminger
2017-07-05 16:55 ` [dpdk-dev] [PATCH v3 2/3] eal: PCI domain should be 32 bits Stephen Hemminger
2017-07-05 16:55 ` Stephen Hemminger [this message]
2017-07-05 23:19 ` [dpdk-dev] [PATCH v3 0/3] pci: handle 32 bit domain values Thomas Monjalon

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=20170705165533.20581-4-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    --cc=sthemmin@microsoft.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).