[dpdk-stable] patch 'mbuf: fix error code in dynamic field/flag registration' has been queued to stable release 19.11.4
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Jul 24 13:58:11 CEST 2020
Hi,
FYI, your patch has been queued to stable release 19.11.4
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/26/20. 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.
Luca Boccassi
---
>From 862946d7be44ce2760558b274e90281363ab76dd Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye at intel.com>
Date: Sat, 13 Jun 2020 23:49:18 +0800
Subject: [PATCH] mbuf: fix error code in dynamic field/flag registration
[ upstream commit 359386e15b4778e5924dcb90d5d686a1c865436f ]
Set rte_errno as ENOMEM when allocation failure.
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
Signed-off-by: Xiaolong Ye <xiaolong.ye at intel.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
---
lib/librte_mbuf/rte_mbuf_dyn.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf_dyn.c b/lib/librte_mbuf/rte_mbuf_dyn.c
index 13d6da6d1..de7d2eb9a 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.c
+++ b/lib/librte_mbuf/rte_mbuf_dyn.c
@@ -278,12 +278,15 @@ __rte_mbuf_dynfield_register_offset(const struct rte_mbuf_dynfield *params,
mbuf_dynfield_tailq.head, mbuf_dynfield_list);
te = rte_zmalloc("MBUF_DYNFIELD_TAILQ_ENTRY", sizeof(*te), 0);
- if (te == NULL)
+ if (te == NULL) {
+ rte_errno = ENOMEM;
return -1;
+ }
mbuf_dynfield = rte_zmalloc("mbuf_dynfield", sizeof(*mbuf_dynfield), 0);
if (mbuf_dynfield == NULL) {
rte_free(te);
+ rte_errno = ENOMEM;
return -1;
}
@@ -456,12 +459,15 @@ __rte_mbuf_dynflag_register_bitnum(const struct rte_mbuf_dynflag *params,
mbuf_dynflag_tailq.head, mbuf_dynflag_list);
te = rte_zmalloc("MBUF_DYNFLAG_TAILQ_ENTRY", sizeof(*te), 0);
- if (te == NULL)
+ if (te == NULL) {
+ rte_errno = ENOMEM;
return -1;
+ }
mbuf_dynflag = rte_zmalloc("mbuf_dynflag", sizeof(*mbuf_dynflag), 0);
if (mbuf_dynflag == NULL) {
rte_free(te);
+ rte_errno = ENOMEM;
return -1;
}
--
2.20.1
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2020-07-24 12:53:50.649103082 +0100
+++ 0053-mbuf-fix-error-code-in-dynamic-field-flag-registrati.patch 2020-07-24 12:53:48.275006236 +0100
@@ -1,12 +1,13 @@
-From 359386e15b4778e5924dcb90d5d686a1c865436f Mon Sep 17 00:00:00 2001
+From 862946d7be44ce2760558b274e90281363ab76dd Mon Sep 17 00:00:00 2001
From: Xiaolong Ye <xiaolong.ye at intel.com>
Date: Sat, 13 Jun 2020 23:49:18 +0800
Subject: [PATCH] mbuf: fix error code in dynamic field/flag registration
+[ upstream commit 359386e15b4778e5924dcb90d5d686a1c865436f ]
+
Set rte_errno as ENOMEM when allocation failure.
Fixes: 4958ca3a443a ("mbuf: support dynamic fields and flags")
-Cc: stable at dpdk.org
Signed-off-by: Xiaolong Ye <xiaolong.ye at intel.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
More information about the stable
mailing list