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 7312A2C8 for ; Wed, 23 May 2018 14:10:40 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id n10-v6so8549018wmc.1 for ; Wed, 23 May 2018 05:10:40 -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=WkxZFgo4YED0ufqDZiK4ihX1dS48ETsNwnJXsasgyac=; b=kTh9WL9CBD3B1N0Ot9IxwFMwdXd2oMXdzFCbC+mcNW5YbcgzqWj07Rmdb+xcGkZ9IP ATA8pkkTUZ4B0Rfu9q5kxjQrz0Mbv2VZf+owGLkglPgdYskPZ8pJGDZ+wRw8SidLwzhw GoCDNF7fc9OWZyWfAnWdS9bvaF6Kbhi0cLnWbTFjfRZTFPnkHRdufwIQz7fDVm1bJHuW UotDKrnu+sIfH7GPnJtFeK3xHGtS1NHOH1Ia1XXhy87jNB6W506ukw1EimwV/Vh+uHvf 2fwGMC/3e36/Wl/KZU/2+CeL83MhDJqaYO6lu4YYo2Pn7VvJW7yPosY8rQ4YuRrTiIym IHCA== 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=WkxZFgo4YED0ufqDZiK4ihX1dS48ETsNwnJXsasgyac=; b=gPgcyZOO2jCEzwP00nanmpzCpIiLH47KvdjK2YbL2JFVzGmAST5Q4T5ICDUN8n/6Zt L9WaqatXDAeCO/IapEdgDJRgV4bmkmrAd1mnL9MQmR2ZVlx+rhuad3XPajSd99DNpfm5 C5VuQk/FS07gsHLZTADO09+dxoB8sDw5w5Fwi2wyKLhSeiJWIAk7BIdkHvcGYJ8FtOOe Ct8WM9SVpWALOqv01V0uF3DDh4E9dkOW4ISb+kPBRF/0ZvUulTGXavZNCRakg959CrzN +Ka6Axa0sfEibulR4lhUfSDYiK+u/pS0Cb0FqSJi1Byy5jP69ZAAio+7BlRmoIBhy+N7 jv6w== X-Gm-Message-State: ALKqPwelBT8VR0MjgltB3yUvfY0uuFLRYWQS6LOOYF+LTEjMuCa2sirq eceQr8laVf08nY8+LFa4ZdI= X-Google-Smtp-Source: AB8JxZq1/ak+afvEGaqIhdoqn4a9t8oxYrDYEoQJLhgyQ/rYXtvGDxeviyvu0lvVvtxnL2r6/haRtg== X-Received: by 2002:a1c:9186:: with SMTP id t128-v6mr4544944wmd.41.1527077440085; Wed, 23 May 2018 05:10:40 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id y129-v6sm2002899wmg.44.2018.05.23.05.10.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 May 2018 05:10:39 -0700 (PDT) From: luca.boccassi@gmail.com To: Andy Green Cc: Olivier Matz , dpdk stable Date: Wed, 23 May 2018 13:09:25 +0100 Message-Id: <20180523121010.8385-14-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: explicit casts of reference counter' 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:40 -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 d19fd046ebf98168ac12d64227f5dfbac0ae9408 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Thu, 17 May 2018 21:49:32 +0800 Subject: [PATCH] mbuf: explicit casts of reference counter [ upstream commit f6ffdf1c2c1cfbb2a3cbce246b545560609abeb5 ] differences to the atomic16 are signed, but the atomic16 itself is unsigned. It needs to be made explicit with casts. Fixes: af75078fece3 ("first public release") Fixes: a53aa2b9f3be ("mbuf: support attaching external buffer") Signed-off-by: Andy Green Acked-by: Olivier Matz --- lib/librte_mbuf/rte_mbuf.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 5db76e725..a95001b76 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -741,7 +741,7 @@ rte_mbuf_refcnt_read(const struct rte_mbuf *m) static inline void rte_mbuf_refcnt_set(struct rte_mbuf *m, uint16_t new_value) { - rte_atomic16_set(&m->refcnt_atomic, new_value); + rte_atomic16_set(&m->refcnt_atomic, (int16_t)new_value); } /* internal */ @@ -772,8 +772,8 @@ rte_mbuf_refcnt_update(struct rte_mbuf *m, int16_t value) */ if (likely(rte_mbuf_refcnt_read(m) == 1)) { ++value; - rte_mbuf_refcnt_set(m, value); - return value; + rte_mbuf_refcnt_set(m, (uint16_t)value); + return (uint16_t)value; } return __rte_mbuf_refcnt_update(m, value); -- 2.14.2