From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f193.google.com (mail-wr0-f193.google.com [209.85.128.193]) by dpdk.org (Postfix) with ESMTP id 188E22BF4 for ; Wed, 23 May 2018 14:11:04 +0200 (CEST) Received: by mail-wr0-f193.google.com with SMTP id u12-v6so7036993wrn.8 for ; Wed, 23 May 2018 05:11:04 -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=OhMtJYTYyGZiLSF1quKv3yvpF5TOwxldievgrT3ikO4=; b=o1YWs/9a6BrWyH8BC7fdHQdUlMFieAyrY+Kgxa9Ad02Tii7txGWizKfpJUNNcFtVi1 keD1NnncY4v7MqjlKyRUJoSU+HxaSCOGwdMoW4tI2MiiRsgvzuelM6P22MsqRs2JOHA+ M/bnKyz+aYmCPuJghQn3lG9TAJwU0/mkZEL+1PsmRbw4e/dN/MFoHaBPKlmIbmJ7qqjT k35zSlPHPeN6wGIu6Q+rtHEqT5nLj2euhrzYw0BDHDOeGwe+TodhImeJIEFVfn+46biZ SkLt2hCO6rTv7x9zYMvxiRp3utk7ZiVzgUmfwav0xHgCh8u3xUYtAy6qZSRHybQ51cVV hbVg== 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=OhMtJYTYyGZiLSF1quKv3yvpF5TOwxldievgrT3ikO4=; b=ng+PguOnGb2gJk55Fkozj+xcra1/ooZ2rPz29ndbhsqhEYqjJYuftMDORLcMy2ht+p XPJXjGnek/lQvx3bjJK4O/9AswijHWO77sxk/ykzFgn97eYHoqvoh7DOFf/MwHS+6iaY moH9pRr2gD3SVE+UrlCbJqvFkjAzWUZQPuoOPu6j6WwOM6i5iYngFuL1p1RWL98Q2z5S LW5I0jso9XZ9WqpbvglHysrDl7UIOvSIIf4LqGRDJicygihakWhCwyoFbTDZPrW+6FUw moJAlbtUlOvuoyfUCHklPfPV5YXNsVhSYKmqOe6k3GS+VajucES4lVSHERff4CUOeVg6 SU1g== X-Gm-Message-State: ALKqPweT03oVabzg9ZiEUzEguUoaLMn8nfnqN/mOtqEesUIUsAwSEbpf EnSma/L4nUafiBKTfHS6+U1htdDzvVQ= X-Google-Smtp-Source: AB8JxZqt1vNU7A84dQ+EiGbTI1GFCIIVOLFiOtBEb51yi7wOk0Mz2S5DabpRdTcrEoZU4+njl1a4jA== X-Received: by 2002:adf:9b86:: with SMTP id d6-v6mr759264wrc.240.1527077463824; Wed, 23 May 2018 05:11:03 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id 123-v6sm4041760wmt.19.2018.05.23.05.11.02 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:11:03 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Bruce Richardson , dpdk stable Date: Wed, 23 May 2018 13:09:40 +0100 Message-Id: <20180523121010.8385-29-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 'mbuf: fix type of variables in linearize function' 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:11:04 -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 a099e527773f7c849edeb165b18f6f4528552178 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 198ba8e22..741204193 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1935,7 +1935,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.14.2