[dpdk-stable] patch 'mbuf: fix reference counter integer promotion' has been queued to stable release 18.02.2
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Wed May 23 14:09:24 CEST 2018
Hi,
FYI, your patch has been queued to stable release 18.02.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/25/18. So please
shout if anyone has objections.
Thanks.
Luca Boccassi
---
>From b7cdf92c0f6f5a209582a1a952f9efe56cbaf0d4 Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Thu, 17 May 2018 21:49:27 +0800
Subject: [PATCH] mbuf: fix reference counter integer promotion
[ upstream commit ee07d519ceb05e59dd970c48a42cf2f09b3ac4dc ]
GCC 8.1 warned:
"1 + value", where value is an uint16_t causes promotion
to a signed int. The compiler complained that we are
shoving an int into a uint16_t return type with different
size and sign.
Bumping and returning value directly instead removes the
promotion and the problem.
Fixes: f20b50b946da ("mbuf: optimize refcnt update")
Fixes: a53aa2b9f3be ("mbuf: support attaching external buffer")
Signed-off-by: Andy Green <andy at warmcat.com>
Acked-by: Olivier Matz <olivier.matz at 6wind.com>
---
lib/librte_mbuf/rte_mbuf.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 54a917ba8..5db76e725 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -771,8 +771,9 @@ rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value)
* reference counter can occur.
*/
if (likely(rte_mbuf_refcnt_read(m) == 1)) {
- rte_mbuf_refcnt_set(m, 1 + value);
- return 1 + value;
+ ++value;
+ rte_mbuf_refcnt_set(m, value);
+ return value;
}
return __rte_mbuf_refcnt_update(m, value);
--
2.14.2
More information about the stable
mailing list