From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 1FD1A2C8 for ; Wed, 23 May 2018 14:10:58 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id l1-v6so8595788wmb.2 for ; Wed, 23 May 2018 05:10:58 -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=UFbaDhf7xBroTY0aXWEadv33mMRX7tLOJczPACx6Nug=; b=GRod9HDEtgMuXlEuCH/zXFDm787cS5Yq1g6bc9wWwTg2+dB2RrYYRsJKEBaBhgMO4I k4xUYUiA1pCsoDZK0Ja/GFSpjjlIk3nyPxQWuGfF6pX1/Es4b+MbFSLFnqCwTlbo6Z9c eNLLqDPysnqSchKkce+Rfo0Y9l2ygLJjmESdhsHbtBxiFPrvIltLq9k19WpqXOU6Im1K sjT5+1dC9CsvynNLD9U6gToo14h6/484RTMEL4Dt/yl8qiEhUIY8kMFQXJTDH5AmoSzs VbQ7kGtwo2S+Q3wI3iThft/T1QJRKPgHi73ssJXaRTYuvN5ZdLLXuCO7OR7vsqYuDHwg QryQ== 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=UFbaDhf7xBroTY0aXWEadv33mMRX7tLOJczPACx6Nug=; b=dHugh0NRntQV1B/6uYd/kPQr52fAsorYvwlZH80jLB3ddylDVG54ax4Oxz23+cMUP3 iCclk9LubrJUvpchjgm1NOg9NpWyp5Sg64sZKLnmofNoMkb6HPKb8UEAEO0GOu6RYmX6 HRDasMZT3BavxbV+2OYqVAdFprfvyPYvPz9Lyxh23Fb+T52g7DkkdtCGam8xOWtYKGeG O1E1fBifgUWvBFLyGw6UevuA4CKDK+etj6cKXUNix40UdThOOUkJjJcmYC0Le14kX8aw ccC9q6yDzWcYO38ARn0pm4R8sC6VkDzHblmOmli7oKmMO4+oOL1a/TPuSBzG3IlMelyt LLXw== X-Gm-Message-State: ALKqPwdDQ33DcBG+Jduj/ZmGaorQt+3skUl403k+hsPC+7PmP6fsOGIW SsLvGCefU0PXQEz1aCmMLhVtMzp46wA= X-Google-Smtp-Source: AB8JxZqUn+BWBX379oey2h9fMvFNoSmq9UkSaFKFP+KELPk71EvYDeHQ/iVVClda+J4dyBbJnlme0A== X-Received: by 2002:a1c:2856:: with SMTP id o83-v6mr4798526wmo.3.1527077457747; Wed, 23 May 2018 05:10:57 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id q7-v6sm10633119wrf.0.2018.05.23.05.10.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:10:56 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Bruce Richardson , dpdk stable Date: Wed, 23 May 2018 13:09:36 +0100 Message-Id: <20180523121010.8385-25-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 'eal/x86: fix type of variable in memcpy 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:10:58 -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 7facb239731152549cd498980fb34bf61fdf7160 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Tue, 22 May 2018 09:24:12 +0800 Subject: [PATCH] eal/x86: fix type of variable in memcpy function [ upstream commit 14035e5fadff19efb17069c6dc463670a8e8b6c1 ] GCC 8.1 warned: rte_memcpy.h:793:2: note: in expansion of macro 'MOVEUNALIGNED_LEFT47' MOVEUNALIGNED_LEFT47(dst, src, n, srcofs); ^~~~~~~~~~~~~~~~~~~~ rte_memcpy.h:649:51: warning: conversion from 'size_t' {aka 'long unsigned int'} to 'int' may change value [-Wconversion] case 0x0B: MOVEUNALIGNED_LEFT47_IMM(dst, src, n, 0x0B); break; ^ rte_memcpy.h:616:15: note: in definition of macro 'MOVEUNALIGNED_LEFT47_IMM' tmp = len; ^~~ rte_memcpy.h:793:2: note: in expansion of macro 'MOVEUNALIGNED_LEFT47' MOVEUNALIGNED_LEFT47(dst, src, n, srcofs); ^~~~~~~~~~~~~~~~~~~~ rte_memcpy.h:618:13: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] tmp -= len; ^~ rte_memcpy.h:649:16: note: in expansion of macro 'MOVEUNALIGNED_LEFT47_IMM' case 0x0B: MOVEUNALIGNED_LEFT47_IMM(dst, src, n, 0x0B); break; ^~~~~~~~~~~~~~~~~~~~~~~~ rte_memcpy.h:793:2: note: in expansion of macro 'MOVEUNALIGNED_LEFT47' MOVEUNALIGNED_LEFT47(dst, src, n, srcofs); ^~~~~~~~~~~~~~~~~~~~ rte_memcpy.h:618:13: warning: conversion to 'size_t' {aka 'long unsigned int'} from 'int' may change the sign of the result [-Wsign-conversion] tmp -= len; ^~ We can eliminate the problems by setting the type of tmp to size_t in the first place. Fixes: d35cc1fe6a ("eal/x86: revert select optimized memcpy at run-time") Suggested-by: Bruce Richardson Signed-off-by: Andy Green Acked-by: Bruce Richardson --- lib/librte_eal/common/include/arch/x86/rte_memcpy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h index cc140ecca..5f9b1bb3b 100644 --- a/lib/librte_eal/common/include/arch/x86/rte_memcpy.h +++ b/lib/librte_eal/common/include/arch/x86/rte_memcpy.h @@ -574,7 +574,7 @@ rte_mov256(uint8_t *dst, const uint8_t *src) */ #define MOVEUNALIGNED_LEFT47_IMM(dst, src, len, offset) \ __extension__ ({ \ - int tmp; \ + size_t tmp; \ while (len >= 128 + 16 - offset) { \ xmm0 = _mm_loadu_si128((const __m128i *)((const uint8_t *)src - offset + 0 * 16)); \ len -= 128; \ -- 2.14.2