From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id E9AEF1B113 for ; Thu, 3 Jan 2019 09:15:26 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 3 Jan 2019 10:15:23 +0200 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x038EJg3008603; Thu, 3 Jan 2019 10:15:21 +0200 From: Yongseok Koh To: Andy Green Cc: Bruce Richardson , dpdk stable Date: Thu, 3 Jan 2019 00:13:57 -0800 Message-Id: <20190103081400.14191-34-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190103081400.14191-1-yskoh@mellanox.com> References: <20190103081400.14191-1-yskoh@mellanox.com> Subject: [dpdk-stable] patch 'mbuf: fix type of variables in linearize function' has been queued to LTS release 17.11.5 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jan 2019 08:15:27 -0000 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 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 Acked-by: Bruce Richardson --- 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 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@dpdk.org Signed-off-by: Andy Green Acked-by: Bruce Richardson @@ -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) {