[dpdk-stable] patch 'net/mlx5: fix multi-process port ID' has been queued to stable release 20.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 5 12:18:47 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/07/21. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/b2d4868e791b586e19507cfc9eea23de0f7fe037

Thanks.

Luca Boccassi

---
>From b2d4868e791b586e19507cfc9eea23de0f7fe037 Mon Sep 17 00:00:00 2001
From: Suanming Mou <suanmingm at nvidia.com>
Date: Sun, 24 Jan 2021 19:02:03 +0800
Subject: [PATCH] net/mlx5: fix multi-process port ID

[ upstream commit 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 ]

The device port_id is used for inter-process communication and must
be the same both for primary and secondary process

This IPC port_id was configured with the invalid temporary value in
port spawn routine. This temporary value was used by the function
rte_eth_dev_get_port_by_name() to check whether the port exists.

This commit corrects the mp port_id with rte_eth_dev port_id.

Fixes: 2eb4d0107acc ("net/mlx5: refactor PCI probing on Linux")

Signed-off-by: Suanming Mou <suanmingm at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/linux/mlx5_os.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c
index 01bbc14ea5..a055a8dd1c 100644
--- a/drivers/net/mlx5/linux/mlx5_os.c
+++ b/drivers/net/mlx5/linux/mlx5_os.c
@@ -924,8 +924,6 @@ err_secondary:
 	priv->dev_port = spawn->phys_port;
 	priv->pci_dev = spawn->pci_dev;
 	priv->mtu = RTE_ETHER_MTU;
-	priv->mp_id.port_id = port_id;
-	strlcpy(priv->mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN);
 	/* Some internal functions rely on Netlink sockets, open them now. */
 	priv->nl_socket_rdma = mlx5_nl_init(NETLINK_RDMA);
 	priv->nl_socket_route =	mlx5_nl_init(NETLINK_ROUTE);
@@ -1341,6 +1339,8 @@ err_secondary:
 		eth_dev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
 		eth_dev->data->representor_id = priv->representor_id;
 	}
+	priv->mp_id.port_id = eth_dev->data->port_id;
+	strlcpy(priv->mp_id.name, MLX5_MP_NAME, RTE_MP_MAX_NAME_LEN);
 	/*
 	 * Store associated network device interface index. This index
 	 * is permanent throughout the lifetime of device. So, we may store
-- 
2.29.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-02-05 11:18:39.799001446 +0000
+++ 0241-net-mlx5-fix-multi-process-port-ID.patch	2021-02-05 11:18:29.242699412 +0000
@@ -1 +1 @@
-From 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 Mon Sep 17 00:00:00 2001
+From b2d4868e791b586e19507cfc9eea23de0f7fe037 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 39ae757770b3fe54fdd3e1e9656aabc72abc1e26 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -25 +26 @@
-index 7efa7c6cd2..a8cc5f3116 100644
+index 01bbc14ea5..a055a8dd1c 100644
@@ -28 +29 @@
-@@ -930,8 +930,6 @@ err_secondary:
+@@ -924,8 +924,6 @@ err_secondary:
@@ -37 +38 @@
-@@ -1347,6 +1345,8 @@ err_secondary:
+@@ -1341,6 +1339,8 @@ err_secondary:


More information about the stable mailing list