[dpdk-stable] patch 'mbuf: fix type of private size in detach' has been queued to LTS release 17.11.5
Yongseok Koh
yskoh at mellanox.com
Thu Jan 3 09:13:56 CET 2019
Hi,
FYI, your patch has been queued to LTS release 17.11.5
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/04/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. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.
Thanks.
Yongseok
---
>From d8f4cfc14f2f7b1b0159d1aaa1b5ee46c8a51045 Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Tue, 22 May 2018 09:24:27 +0800
Subject: [PATCH] mbuf: fix type of private size in detach
[ upstream commit ad3781066261848c163e700c3c5baa16fecc2247 ]
GCC 8.1 warned:
In function 'rte_pktmbuf_detach':
rte_mbuf.h:1583:17: warning: conversion from 'uint32_t'
{aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'}
may change value [-Wconversion]
m->priv_size = priv_size;
^~~~~~~~~
The temp priv_size is declared as a uint32_t. But it
only deals in uint16_t. m->priv_size is a uint16_t.
Change it to a uint16_t.
Fixes: 355e6735b3 ("mbuf: fix cloning with private mbuf data")
Signed-off-by: Andy Green <andy at warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
lib/librte_mbuf/rte_mbuf.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 07687c39b..9dab1d1a8 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1325,7 +1325,8 @@ static inline void rte_pktmbuf_detach(struct rte_mbuf *m)
{
struct rte_mbuf *md = rte_mbuf_from_indirect(m);
struct rte_mempool *mp = m->pool;
- uint32_t mbuf_size, buf_len, priv_size;
+ uint32_t mbuf_size, buf_len;
+ uint16_t priv_size;
priv_size = rte_pktmbuf_priv_size(mp);
mbuf_size = (uint32_t)(sizeof(struct rte_mbuf) + priv_size);
--
2.11.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-01-02 23:59:13.821551653 -0800
+++ 0033-mbuf-fix-type-of-private-size-in-detach.patch 2019-01-02 23:59:12.099818000 -0800
@@ -1,8 +1,10 @@
-From ad3781066261848c163e700c3c5baa16fecc2247 Mon Sep 17 00:00:00 2001
+From d8f4cfc14f2f7b1b0159d1aaa1b5ee46c8a51045 Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Tue, 22 May 2018 09:24:27 +0800
Subject: [PATCH] mbuf: fix type of private size in detach
+[ upstream commit ad3781066261848c163e700c3c5baa16fecc2247 ]
+
GCC 8.1 warned:
In function 'rte_pktmbuf_detach':
@@ -17,7 +19,6 @@
Change it to a uint16_t.
Fixes: 355e6735b3 ("mbuf: fix cloning with private mbuf data")
-Cc: stable at dpdk.org
Signed-off-by: Andy Green <andy at warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
@@ -26,19 +27,19 @@
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
-index 28fd4ad52..76e37a2f8 100644
+index 07687c39b..9dab1d1a8 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
-@@ -1571,7 +1571,8 @@ __rte_pktmbuf_free_direct(struct rte_mbuf *m)
- static inline void rte_pktmbuf_detach(struct rte_mbuf *m)
+@@ -1325,7 +1325,8 @@ static inline void rte_pktmbuf_detach(struct rte_mbuf *m)
{
+ struct rte_mbuf *md = rte_mbuf_from_indirect(m);
struct rte_mempool *mp = m->pool;
- uint32_t mbuf_size, buf_len, priv_size;
+ uint32_t mbuf_size, buf_len;
+ uint16_t priv_size;
- if (RTE_MBUF_HAS_EXTBUF(m))
- __rte_pktmbuf_free_extbuf(m);
+ priv_size = rte_pktmbuf_priv_size(mp);
+ mbuf_size = (uint32_t)(sizeof(struct rte_mbuf) + priv_size);
--
2.11.0
More information about the stable
mailing list