From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by dpdk.org (Postfix) with ESMTP id 08DAA2BBD for ; Wed, 23 May 2018 14:10:47 +0200 (CEST) Received: by mail-wm0-f68.google.com with SMTP id f8-v6so8535443wmc.4 for ; Wed, 23 May 2018 05:10:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lLQ1HHPx5nr/Pxg0FasjiFF14UHWo2x+vPHfPU1eY3E=; b=Qf1+Hgmx6NtvJ2WyIonH/tzIOhVeh8BP5I6YLHYYUiwZzEzcXAEz8Lz9HV+qP1axGF u1lWLvCqBlzftxcaxxZY3QOigyHp27c2ASXFG/MswaMhBiyWoULZ3HWCeEubQrj+aOQX kCf+tRsZKWdevqqHPcX7oHGs7eUPdVvoUpz81heBSXJcUt9W861q1Ip6N8ll3RVGNgMs h85LLvPsIR5xreoin6msaF1koHfMsuHvvVOQ7H2eX+qTa9PSORDSRzw2JEgRxweZAFwH /LSf6phcfvybmbl3EntLXzf6bAheeUKEc/KpqKW8GeggnL4CnIV+ypctI3Rjc/RdEz4W MuEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lLQ1HHPx5nr/Pxg0FasjiFF14UHWo2x+vPHfPU1eY3E=; b=YjpFw2hao0vHwzfasDGP1JikeMSwMLKyF4RQgCM3tdcIsL+UiLlDCAhVJj6x8VjPLR zDWRNaVe+KIzoyXWqVqS4Jru2FFZqA7PsNMHxO95Dze+yjTujVyOvZcSVlRxmsjBAceR UNYTZupp3gfcOOH4/vAf2mrs9sxVVWVo+MWAEzx9C5vROaBnOEKc7o5J0vNXFVeCO5Wo CdV2buGNJf80UcPT9IjHUgdD70KYMhVZEwza5R2aqX5lKgdwyydeL6q2vwD9nYlT6XWY 4Po33IV6m6e4msXftbETuTTB71qMXDfxCzyFplbJU1CW2GHkzfYEZ3G5Sen7+E3bpZAr BToQ== X-Gm-Message-State: ALKqPwdma7uZNX2rKcTtNb+qmPNxMrLz0Mrm7tiJU2vJ1XT55GXL5XU7 BSHCyDudgtLoDVKrKA825Lw= X-Google-Smtp-Source: AB8JxZozuwiqp0pgb7HIgFMgYvxSXYhiwNBtlmHXdFHgZCXZG+G02pj5rdvgX0s9+/+QI90iILq2AQ== X-Received: by 2002:a1c:c86:: with SMTP id 128-v6mr3728427wmm.18.1527077446706; Wed, 23 May 2018 05:10:46 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id 72-v6sm3797170wrb.22.2018.05.23.05.10.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:10:45 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: dpdk stable Date: Wed, 23 May 2018 13:09:29 +0100 Message-Id: <20180523121010.8385-18-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180523121010.8385-1-luca.boccassi@gmail.com> References: <20180516101323.2234-2-luca.boccassi@gmail.com> <20180523121010.8385-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net: explicit cast of IP checksum to 16-bit' has been queued to stable release 18.02.2 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: Wed, 23 May 2018 12:10:47 -0000 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 ba4ef407c811f10fb52dba749ed1a95c651bb438 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 17 May 2018 21:49:57 +0800 Subject: [PATCH] net: explicit cast of IP checksum to 16-bit [ upstream commit 466de6d5d8648f6a2c6cfc90c2d1bf217dd06e90 ] GCC 8.1 warned: In function 'rte_raw_cksum_mbuf': rte_ip.h:225:22: warning: conversion from 'uint32_t' {aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] tmp = rte_bswap16(tmp); ^~~ In function 'rte_ipv4_cksum': rte_ip.h:256:35: warning: conversion from 'int' to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] return (cksum == 0xffff) ? cksum : ~cksum; ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ rte_ip.h:332:9: warning: conversion from 'uint32_t' {aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] return cksum; ^~~~~ In function 'rte_ipv6_udptcp_cksum': rte_ip.h:421:9: warning: conversion from 'uint32_t' {aka 'unsigned int'} to 'uint16_t' {aka 'short unsigned int'} may change value [-Wconversion] return cksum; ^~~~~ Fixes: 6006818cfb26 ("net: new checksum functions") Fixes: 4199fdea60c3 ("mbuf: generic support for TCP segmentation offload") Signed-off-by: Andy Green --- lib/librte_net/rte_ip.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_net/rte_ip.h b/lib/librte_net/rte_ip.h index f32684c66..edbe4335c 100644 --- a/lib/librte_net/rte_ip.h +++ b/lib/librte_net/rte_ip.h @@ -222,7 +222,7 @@ rte_raw_cksum_mbuf(const struct rte_mbuf *m, uint32_t off, uint32_t len, for (;;) { tmp = __rte_raw_cksum(buf, seglen, 0); if (done & 1) - tmp = rte_bswap16(tmp); + tmp = rte_bswap16((uint16_t)tmp); sum += tmp; done += seglen; if (done == len) @@ -253,7 +253,7 @@ rte_ipv4_cksum(const struct ipv4_hdr *ipv4_hdr) { uint16_t cksum; cksum = rte_raw_cksum(ipv4_hdr, sizeof(struct ipv4_hdr)); - return (cksum == 0xffff) ? cksum : ~cksum; + return (cksum == 0xffff) ? cksum : (uint16_t)~cksum; } /** @@ -329,7 +329,7 @@ rte_ipv4_udptcp_cksum(const struct ipv4_hdr *ipv4_hdr, const void *l4_hdr) if (cksum == 0) cksum = 0xffff; - return cksum; + return (uint16_t)cksum; } /** @@ -418,7 +418,7 @@ rte_ipv6_udptcp_cksum(const struct ipv6_hdr *ipv6_hdr, const void *l4_hdr) if (cksum == 0) cksum = 0xffff; - return cksum; + return (uint16_t)cksum; } #ifdef __cplusplus -- 2.14.2