[dpdk-stable] patch 'mem: fix segment fd API error code for external segment' has been queued to LTS release 18.11.1

Kevin Traynor ktraynor at redhat.com
Fri Jan 4 14:24:16 CET 2019


Hi,

FYI, your patch has been queued to LTS release 18.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 01/11/19. 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.

Thanks.

Kevin Traynor

---
>From 0cd9579b47cf06a7f3cccb346e4243d4c5973cf6 Mon Sep 17 00:00:00 2001
From: Anatoly Burakov <anatoly.burakov at intel.com>
Date: Thu, 13 Dec 2018 11:43:15 +0000
Subject: [PATCH] mem: fix segment fd API error code for external segment

[ upstream commit 525670756a566b3efa88eeae53755a770f0c14fe ]

Segment fd API does not support getting segment fd's from
externally allocated memory, so return proper error code
on any attempts to do so. This changes API behavior, so
document the change as well.

Fixes: 5282bb1c3695 ("mem: allow memseg lists to be marked as external")

Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
Acked-by: Tiwei Bie <tiwei.bie at intel.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
---
 lib/librte_eal/common/eal_common_memory.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
index d47ea4938..999ba24b4 100644
--- a/lib/librte_eal/common/eal_common_memory.c
+++ b/lib/librte_eal/common/eal_common_memory.c
@@ -705,4 +705,10 @@ rte_memseg_get_fd_thread_unsafe(const struct rte_memseg *ms)
 	}
 
+	/* segment fd API is not supported for external segments */
+	if (msl->external) {
+		rte_errno = ENOTSUP;
+		return -1;
+	}
+
 	ret = eal_memalloc_get_seg_fd(msl_idx, seg_idx);
 	if (ret < 0) {
@@ -755,4 +761,10 @@ rte_memseg_get_fd_offset_thread_unsafe(const struct rte_memseg *ms,
 	}
 
+	/* segment fd API is not supported for external segments */
+	if (msl->external) {
+		rte_errno = ENOTSUP;
+		return -1;
+	}
+
 	ret = eal_memalloc_get_seg_fd_offset(msl_idx, seg_idx, offset);
 	if (ret < 0) {
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-01-04 13:23:08.256571309 +0000
+++ 0034-mem-fix-segment-fd-API-error-code-for-external-segme.patch	2019-01-04 13:23:07.000000000 +0000
@@ -1,43 +1,29 @@
-From 525670756a566b3efa88eeae53755a770f0c14fe Mon Sep 17 00:00:00 2001
+From 0cd9579b47cf06a7f3cccb346e4243d4c5973cf6 Mon Sep 17 00:00:00 2001
 From: Anatoly Burakov <anatoly.burakov at intel.com>
 Date: Thu, 13 Dec 2018 11:43:15 +0000
 Subject: [PATCH] mem: fix segment fd API error code for external segment
 
+[ upstream commit 525670756a566b3efa88eeae53755a770f0c14fe ]
+
 Segment fd API does not support getting segment fd's from
 externally allocated memory, so return proper error code
 on any attempts to do so. This changes API behavior, so
 document the change as well.
 
 Fixes: 5282bb1c3695 ("mem: allow memseg lists to be marked as external")
-Cc: stable at dpdk.org
 
 Signed-off-by: Anatoly Burakov <anatoly.burakov at intel.com>
 Acked-by: Tiwei Bie <tiwei.bie at intel.com>
 Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>
 ---
- doc/guides/rel_notes/release_19_02.rst    |  5 +++++
  lib/librte_eal/common/eal_common_memory.c | 12 ++++++++++++
- 2 files changed, 17 insertions(+)
+ 1 file changed, 12 insertions(+)
 
-diff --git a/doc/guides/rel_notes/release_19_02.rst b/doc/guides/rel_notes/release_19_02.rst
-index c1fa8843e..63e84fef7 100644
---- a/doc/guides/rel_notes/release_19_02.rst
-+++ b/doc/guides/rel_notes/release_19_02.rst
-@@ -110,4 +110,9 @@ API Changes
-    =========================================================
- 
-+* eal: Segment fd API on Linux now sets error code to ``ENOTSUP`` in more cases
-+  where segment fd API is not expected to be supported:
-+
-+  - On attempt to get segment fd for an externally allocated memory segment
-+
- * pdump: The ``rte_pdump_set_socket_dir()``, the parameter ``path`` of
-   ``rte_pdump_init()`` and enum ``rte_pdump_socktype`` were deprecated
 diff --git a/lib/librte_eal/common/eal_common_memory.c b/lib/librte_eal/common/eal_common_memory.c
-index 051159f80..c9da69b16 100644
+index d47ea4938..999ba24b4 100644
 --- a/lib/librte_eal/common/eal_common_memory.c
 +++ b/lib/librte_eal/common/eal_common_memory.c
-@@ -706,4 +706,10 @@ rte_memseg_get_fd_thread_unsafe(const struct rte_memseg *ms)
+@@ -705,4 +705,10 @@ rte_memseg_get_fd_thread_unsafe(const struct rte_memseg *ms)
  	}
  
 +	/* segment fd API is not supported for external segments */
@@ -48,7 +34,7 @@
 +
  	ret = eal_memalloc_get_seg_fd(msl_idx, seg_idx);
  	if (ret < 0) {
-@@ -756,4 +762,10 @@ rte_memseg_get_fd_offset_thread_unsafe(const struct rte_memseg *ms,
+@@ -755,4 +761,10 @@ rte_memseg_get_fd_offset_thread_unsafe(const struct rte_memseg *ms,
  	}
  
 +	/* segment fd API is not supported for external segments */


More information about the stable mailing list