[dpdk-stable] patch 'mbuf: fix type of variables in linearize function' has been queued to LTS release 17.11.5
Yongseok Koh
yskoh at mellanox.com
Thu Jan 3 09:13:57 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 783f21125c8e89d7f7bea896686662398beb8a63 Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Tue, 22 May 2018 09:24:37 +0800
Subject: [PATCH] mbuf: fix type of variables in linearize function
[ upstream commit 50f239c9087df9b1a3c14e77f4279c7d5f523138 ]
GCC 8.1 warned:
In function 'rte_pktmbuf_linearize':
rte_mbuf.h:1873:32: warning: conversion to 'int' from 'uint32_t'
{aka 'unsigned int'} may change the sign of the result [-Wsign-conversion]
rte_mbuf.h:2166:13: note: in expansion of macro 'rte_pktmbuf_pkt_len'
copy_len = rte_pktmbuf_pkt_len(mbuf) - rte_pktmbuf_data_len(mbuf);
rte_mbuf.h:2180:51: warning: conversion to 'size_t'
{aka 'long unsigned int'} from 'int' may change the
sign of the result [-Wsign-conversion]
rte_memcpy(buffer, rte_pktmbuf_mtod(m, char *), seg_len);
^~~~~~~
The temp is consumed as a size_t. So let's make it
a size_t in the first place.
Fixes: 1feda4d8fc ("mbuf: add a function to linearize a packet")
Signed-off-by: Andy Green <andy at warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
lib/librte_mbuf/rte_mbuf.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
index 9dab1d1a8..ee94ec6b2 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
@@ -1915,7 +1915,7 @@ rte_validate_tx_offload(const struct rte_mbuf *m)
static inline int
rte_pktmbuf_linearize(struct rte_mbuf *mbuf)
{
- int seg_len, copy_len;
+ size_t seg_len, copy_len;
struct rte_mbuf *m;
struct rte_mbuf *m_next;
char *buffer;
--
2.11.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2019-01-02 23:59:13.872665213 -0800
+++ 0034-mbuf-fix-type-of-variables-in-linearize-function.patch 2019-01-02 23:59:12.101817000 -0800
@@ -1,8 +1,10 @@
-From 50f239c9087df9b1a3c14e77f4279c7d5f523138 Mon Sep 17 00:00:00 2001
+From 783f21125c8e89d7f7bea896686662398beb8a63 Mon Sep 17 00:00:00 2001
From: Andy Green <andy at warmcat.com>
Date: Tue, 22 May 2018 09:24:37 +0800
Subject: [PATCH] mbuf: fix type of variables in linearize function
+[ upstream commit 50f239c9087df9b1a3c14e77f4279c7d5f523138 ]
+
GCC 8.1 warned:
In function 'rte_pktmbuf_linearize':
@@ -20,7 +22,6 @@
a size_t in the first place.
Fixes: 1feda4d8fc ("mbuf: add a function to linearize a packet")
-Cc: stable at dpdk.org
Signed-off-by: Andy Green <andy at warmcat.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
@@ -29,10 +30,10 @@
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
-index 76e37a2f8..715f90ea0 100644
+index 9dab1d1a8..ee94ec6b2 100644
--- a/lib/librte_mbuf/rte_mbuf.h
+++ b/lib/librte_mbuf/rte_mbuf.h
-@@ -2157,7 +2157,7 @@ rte_validate_tx_offload(const struct rte_mbuf *m)
+@@ -1915,7 +1915,7 @@ rte_validate_tx_offload(const struct rte_mbuf *m)
static inline int
rte_pktmbuf_linearize(struct rte_mbuf *mbuf)
{
More information about the stable
mailing list