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 E6AF82BF2 for ; Wed, 23 May 2018 14:10:38 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id m129-v6so8492760wmb.3 for ; Wed, 23 May 2018 05:10:38 -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=U59JvRqxKeRapgbOt8nwlfhPMN2GoInlgOigFRZPCBs=; b=EHxB9WY8cYri2SiTphWQmVVnJDMSr7Hn3hiBaTFCb4qlUt/vKyaGND0a4awBu3b09X NgRw04ld5HCtlrgpXtPSHxPGSzyCYxjJr6XAZIhxS9+9rS7izuR+W5xF97PzhJ0LuiUY geiOra/OEHZtNAaU3kJJ3a2ulgpWoidQzjCg8BKcUGMAjTSyN3GPpT7doyIWSdNiIEgy MVMyVp3Y2FU3mpCqACLTat3UV+r3pcbBrbg0qP9dGzuK78kYZ6Thkq+wYpV4r0uWjSKo jj8xOfXOVHd1VszL7RDOxW64cuwal/y+5nrYfW0t913GFABrqepYU1sf7fzABoMPDGu3 lZ+Q== 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=U59JvRqxKeRapgbOt8nwlfhPMN2GoInlgOigFRZPCBs=; b=cf0L8W65tvZNqV0gRROlw9Vp71dSylqdvK35D1JwsgLoiAxHfNL+Bdit7537k5C4MA Hdv7EjZe6ZrmH0mwhZWINYWLN6mQLtglf0QUZhre6PNN0Ejhl8CltbrCSHt4zxtphsJl q3wlKTMQVPvo3laFUlcI9Wg93FhECGpxmpwvuNvyLAUD40Y4Oq9ZHBcJIusBHm6Dc7P3 zsbK4Jfj3dXvurmtG1ehO8OMbWDmJmuVqrng8Pl2riSIHNbSy6w+gWcja49g/ifBllYg tFpX4IPscPZWYeZlcwx3/VO7V3Xho1mtutuqeIRnryi0Yl1CO+iXFbskN8fx7ofv2esQ ASvQ== X-Gm-Message-State: ALKqPwftpqK3uohTOkqwhC+/Sf6qCKJE5FSs7f7eSe1LHVdI1RmbMz9L cWFJ/rjAmu8JDu3HvnxOUBs= X-Google-Smtp-Source: AB8JxZoUgOZ4y69FMdOH7NXrjUYpvAUkSb6b7TXNT6ED3lY84fZurER5DppPJdFLcXIgN5iSX6qI5g== X-Received: by 2002:a1c:1d02:: with SMTP id d2-v6mr3936225wmd.44.1527077438490; Wed, 23 May 2018 05:10:38 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id 141-v6sm4168414wmf.35.2018.05.23.05.10.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:10:37 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Olivier Matz , dpdk stable Date: Wed, 23 May 2018 13:09:24 +0100 Message-Id: <20180523121010.8385-13-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 reference counter integer promotion' 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:39 -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 b7cdf92c0f6f5a209582a1a952f9efe56cbaf0d4 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 17 May 2018 21:49:27 +0800 Subject: [PATCH] mbuf: fix reference counter integer promotion [ upstream commit ee07d519ceb05e59dd970c48a42cf2f09b3ac4dc ] GCC 8.1 warned: "1 + value", where value is an uint16_t causes promotion to a signed int. The compiler complained that we are shoving an int into a uint16_t return type with different size and sign. Bumping and returning value directly instead removes the promotion and the problem. Fixes: f20b50b946da ("mbuf: optimize refcnt update") Fixes: a53aa2b9f3be ("mbuf: support attaching external buffer") Signed-off-by: Andy Green Acked-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 54a917ba8..5db76e725 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -771,8 +771,9 @@ rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value) * reference counter can occur. */ if (likely(rte_mbuf_refcnt_read(m) == 1)) { - rte_mbuf_refcnt_set(m, 1 + value); - return 1 + value; + ++value; + rte_mbuf_refcnt_set(m, value); + return value; } return __rte_mbuf_refcnt_update(m, value); -- 2.14.2