patch 'common/mlx5: fix extraction of auxiliary device name' has been queued to stable release 22.11.9

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jun 30 14:25:31 CEST 2025


Hi,

FYI, your patch has been queued to stable release 22.11.9

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/02/25. 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/019e410754f9ca15a1cddd44e0865b1af1f3f0fe

Thanks.

Luca Boccassi

---
>From 019e410754f9ca15a1cddd44e0865b1af1f3f0fe Mon Sep 17 00:00:00 2001
From: Gregory Etelson <getelson at nvidia.com>
Date: Sun, 15 Jun 2025 10:41:29 +0300
Subject: [PATCH] common/mlx5: fix extraction of auxiliary device name

[ upstream commit a60378a398fd95e6de69401e8ed06fcc3f4a3929 ]

The PMD reads auxiliary network device name from the Linux sysfs.

The current implementation closed directory context before it copied
a file name from that directory into internal buffer.
The result was uncertain.

This change closes sysfs directory after file name was copied.

Fixes: 777b72a9339c ("common/mlx5: support auxiliary bus")

Signed-off-by: Gregory Etelson <getelson at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
---
 drivers/common/mlx5/linux/mlx5_common_auxiliary.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/common/mlx5/linux/mlx5_common_auxiliary.c b/drivers/common/mlx5/linux/mlx5_common_auxiliary.c
index 33479ffd68..60ea67049d 100644
--- a/drivers/common/mlx5/linux/mlx5_common_auxiliary.c
+++ b/drivers/common/mlx5/linux/mlx5_common_auxiliary.c
@@ -36,14 +36,17 @@ mlx5_auxiliary_get_child_name(const char *dev, const char *node,
 		if (dent->d_name[0] != '.')
 			break;
 	}
-	closedir(dir);
 	if (dent == NULL) {
 		rte_errno = ENOENT;
-		return -rte_errno;
+		goto end;
 	}
 	if (rte_strscpy(child, dent->d_name, size) < 0)
-		return -rte_errno;
-	return 0;
+		goto end;
+	rte_errno = 0;
+
+end:
+	closedir(dir);
+	return -rte_errno;
 }
 
 static int
-- 
2.47.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2025-06-30 13:21:21.813699223 +0100
+++ 0001-common-mlx5-fix-extraction-of-auxiliary-device-name.patch	2025-06-30 13:21:21.727056912 +0100
@@ -1 +1 @@
-From a60378a398fd95e6de69401e8ed06fcc3f4a3929 Mon Sep 17 00:00:00 2001
+From 019e410754f9ca15a1cddd44e0865b1af1f3f0fe Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit a60378a398fd95e6de69401e8ed06fcc3f4a3929 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index b4ea604820..3ee2f4638a 100644
+index 33479ffd68..60ea67049d 100644
@@ -27 +28 @@
-@@ -38,14 +38,17 @@ mlx5_auxiliary_get_child_name(const char *dev, const char *node,
+@@ -36,14 +36,17 @@ mlx5_auxiliary_get_child_name(const char *dev, const char *node,


More information about the stable mailing list