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 5807F1B130 for ; Thu, 3 Jan 2019 09:14:56 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 3 Jan 2019 10:14:54 +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 x038EJfm008603; Thu, 3 Jan 2019 10:14:53 +0200 From: Yongseok Koh To: Andy Green Cc: dpdk stable Date: Thu, 3 Jan 2019 00:13:42 -0800 Message-Id: <20190103081400.14191-19-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 'eal: explicit cast in constant byte swap' 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:14:56 -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 bd017fffea36a2cb4a6322c8d5d911397ec4e776 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 17 May 2018 21:50:37 +0800 Subject: [PATCH] eal: explicit cast in constant byte swap [ upstream commit c7bf8093820b0d740e15f166c3fceb1edb2b2a83 ] GCC 8.1 warns: rte_byteorder.h: In function 'rte_constant_bswap16': rte_byteorder.h:54:45: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] ((((uint16_t)(v) & UINT16_C(0x00ff)) << 8) | \ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ (((uint16_t)(v) & UINT16_C(0xff00)) >> 8)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ rte_byteorder.h:126:9: note: in expansion of macro 'RTE_STATIC_BSWAP16' return RTE_STATIC_BSWAP16(x); ^~~~~~~~~~~~~~~~~~ The other two sizes are going to be afflicted the same, so get the same fix. Fixes: b75667ef9f7e ("eal: add static endianness conversion macros") Signed-off-by: Andy Green --- lib/librte_eal/common/include/generic/rte_byteorder.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/generic/rte_byteorder.h b/lib/librte_eal/common/include/generic/rte_byteorder.h index 29e70c968..3d7ba5ecc 100644 --- a/lib/librte_eal/common/include/generic/rte_byteorder.h +++ b/lib/librte_eal/common/include/generic/rte_byteorder.h @@ -152,7 +152,7 @@ typedef uint64_t rte_le64_t; /**< 64-bit little-endian value. */ static inline uint16_t rte_constant_bswap16(uint16_t x) { - return RTE_STATIC_BSWAP16(x); + return (uint16_t)RTE_STATIC_BSWAP16(x); } /* @@ -164,7 +164,7 @@ rte_constant_bswap16(uint16_t x) static inline uint32_t rte_constant_bswap32(uint32_t x) { - return RTE_STATIC_BSWAP32(x); + return (uint32_t)RTE_STATIC_BSWAP32(x); } /* @@ -176,7 +176,7 @@ rte_constant_bswap32(uint32_t x) static inline uint64_t rte_constant_bswap64(uint64_t x) { - return RTE_STATIC_BSWAP64(x); + return (uint64_t)RTE_STATIC_BSWAP64(x); } -- 2.11.0 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2019-01-02 23:59:13.099927412 -0800 +++ 0019-eal-explicit-cast-in-constant-byte-swap.patch 2019-01-02 23:59:12.068815000 -0800 @@ -1,8 +1,10 @@ -From c7bf8093820b0d740e15f166c3fceb1edb2b2a83 Mon Sep 17 00:00:00 2001 +From bd017fffea36a2cb4a6322c8d5d911397ec4e776 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 17 May 2018 21:50:37 +0800 Subject: [PATCH] eal: explicit cast in constant byte swap +[ upstream commit c7bf8093820b0d740e15f166c3fceb1edb2b2a83 ] + GCC 8.1 warns: rte_byteorder.h: In function 'rte_constant_bswap16': @@ -22,7 +24,6 @@ same, so get the same fix. Fixes: b75667ef9f7e ("eal: add static endianness conversion macros") -Cc: stable@dpdk.org Signed-off-by: Andy Green --- @@ -30,10 +31,10 @@ 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_eal/common/include/generic/rte_byteorder.h b/lib/librte_eal/common/include/generic/rte_byteorder.h -index 9bed85cca..7d9a1463c 100644 +index 29e70c968..3d7ba5ecc 100644 --- a/lib/librte_eal/common/include/generic/rte_byteorder.h +++ b/lib/librte_eal/common/include/generic/rte_byteorder.h -@@ -123,7 +123,7 @@ typedef uint64_t rte_le64_t; /**< 64-bit little-endian value. */ +@@ -152,7 +152,7 @@ typedef uint64_t rte_le64_t; /**< 64-bit little-endian value. */ static inline uint16_t rte_constant_bswap16(uint16_t x) { @@ -42,7 +43,7 @@ } /* -@@ -135,7 +135,7 @@ rte_constant_bswap16(uint16_t x) +@@ -164,7 +164,7 @@ rte_constant_bswap16(uint16_t x) static inline uint32_t rte_constant_bswap32(uint32_t x) { @@ -51,7 +52,7 @@ } /* -@@ -147,7 +147,7 @@ rte_constant_bswap32(uint32_t x) +@@ -176,7 +176,7 @@ rte_constant_bswap32(uint32_t x) static inline uint64_t rte_constant_bswap64(uint64_t x) {