[dpdk-dev] [PATCH v3 3/3] mlx4,5: handle 32 bit PCI domain
Stephen Hemminger
stephen at networkplumber.org
Wed Jul 5 18:55:33 CEST 2017
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 at 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
More information about the dev
mailing list