From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A970A0351 for ; Thu, 6 Aug 2020 11:59:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 832F437B4; Thu, 6 Aug 2020 11:59:41 +0200 (CEST) Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by dpdk.org (Postfix) with ESMTP id 338CC1C127 for ; Thu, 6 Aug 2020 11:59:38 +0200 (CEST) Received: by mail-wm1-f68.google.com with SMTP id d190so8278313wmd.4 for ; Thu, 06 Aug 2020 02:59: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 :mime-version:content-transfer-encoding; bh=pYqlu6AjU6TFkrQ/Tkg7GBB2YxT+gqlu9IBoK04HPz0=; b=L5MtEQg6mib7+kBuMk5hNx//oZLMY4moi3t0HQZlmTeuY48/pQUxxVKmBoxWQ3Zf+d rGfTR+4uWpN+QP/z/1Nn5VP0ltaJtLw17nwSLcyaNV2RRkBgriUGBtSC8HSc0UI/ecHy dnwk6GLB65O0cwGo55sjXRexb5qfzQu+jVh1KvWzwyERuclvz2F+tUVA/UAv1i4QTuRb 0TeMoCc9F7avYkduzUklnXTOMeUsvtk+5On2F6OQvxdHL9YSe1EpuhRZ9Ab0H6SVaEk5 hBedNbQdP+i3U2INhtY/3L3uT5CLl0iNov7o7Y/U0YwSGmJCK8MUhOI2lw3vWOm0ITzk BiRQ== 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:mime-version:content-transfer-encoding; bh=pYqlu6AjU6TFkrQ/Tkg7GBB2YxT+gqlu9IBoK04HPz0=; b=KTyHPiAXxif+3sY7plqe9UitMhKoj9Wpo+MPpxgLvi2S/m0+ZP9JTcIMo5zo6M+/pN MRDDDteISn2JcLUWhXECoWxm8egwplVK2CJ7aPO08k4cmsgVWK8OxduUa4+p84SyE71T ZlO+EmhnGv/23gZx6XpuV8VqANZ6BajuSr5NgNL8LE7RG7Ft+jCZ7T7V/LWeBDT/PFgq zmyi+NG+XtIWOBP3yeYpcPOrn1x7tAcHsyCYoGu9jQRgeiMrI5IOw0MZU5q3u0wU4G7f b1oBgDqf+fqpc11DCK9Xl1cvM309CjgzQGTaqP/hSW390mFaqRdzhriHOOlYiw9CHPKR uXCg== X-Gm-Message-State: AOAM533WZ2v4JiV5Clm5+5yPadrKaPRlrtSP52p4XowXSV5Bvm9Ar8sf OCAgm1dQ+sZpyEZqfXorRkc= X-Google-Smtp-Source: ABdhPJziZrygG18l2U5kw15Odtib73fafQoYweqpZVdF/aYcLusLM5N7FqXABH2qvr251uwIp+T05w== X-Received: by 2002:a1c:3b89:: with SMTP id i131mr7184358wma.30.1596707977959; Thu, 06 Aug 2020 02:59:37 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id v12sm5824469wri.47.2020.08.06.02.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Aug 2020 02:59:37 -0700 (PDT) From: luca.boccassi@gmail.com To: Long Li Cc: Stephen Hemminger , dpdk stable Date: Thu, 6 Aug 2020 10:54:08 +0100 Message-Id: <20200806095411.774624-40-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200806095411.774624-1-luca.boccassi@gmail.com> References: <20200724120030.1863487-1-luca.boccassi@gmail.com> <20200806095411.774624-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/netvsc: fix chimney index' has been queued to stable release 19.11.4 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.11.4 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 08/08/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 77ff9d98b4eca9958655699dc016aa53bb746f52 Mon Sep 17 00:00:00 2001 From: Long Li Date: Sat, 1 Aug 2020 23:04:28 -0700 Subject: [PATCH] net/netvsc: fix chimney index [ upstream commit 3eee636809e449b8b4c0cdfaf841f2d0e4a558e8 ] The code should look into "slab" to figure out the index returned from rte_bitmap_scan(). Fixes: cc02518132 ("net/netvsc: split send buffers from Tx descriptors") Signed-off-by: Long Li Acked-by: Stephen Hemminger --- drivers/net/netvsc/hn_rxtx.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index d1f8dfa50..d6e518c88 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -206,11 +206,13 @@ hn_chim_uninit(struct rte_eth_dev *dev) static uint32_t hn_chim_alloc(struct hn_data *hv) { uint32_t index = NVS_CHIM_IDX_INVALID; - uint64_t slab; + uint64_t slab = 0; rte_spinlock_lock(&hv->chim_lock); - if (rte_bitmap_scan(hv->chim_bmap, &index, &slab)) + if (rte_bitmap_scan(hv->chim_bmap, &index, &slab)) { + index += rte_bsf64(slab); rte_bitmap_clear(hv->chim_bmap, index); + } rte_spinlock_unlock(&hv->chim_lock); return index; -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-08-06 10:53:17.334167632 +0100 +++ 0040-net-netvsc-fix-chimney-index.patch 2020-08-06 10:53:15.836598114 +0100 @@ -1,13 +1,14 @@ -From 3eee636809e449b8b4c0cdfaf841f2d0e4a558e8 Mon Sep 17 00:00:00 2001 +From 77ff9d98b4eca9958655699dc016aa53bb746f52 Mon Sep 17 00:00:00 2001 From: Long Li Date: Sat, 1 Aug 2020 23:04:28 -0700 Subject: [PATCH] net/netvsc: fix chimney index +[ upstream commit 3eee636809e449b8b4c0cdfaf841f2d0e4a558e8 ] + The code should look into "slab" to figure out the index returned from rte_bitmap_scan(). Fixes: cc02518132 ("net/netvsc: split send buffers from Tx descriptors") -Cc: stable@dpdk.org Signed-off-by: Long Li Acked-by: Stephen Hemminger @@ -16,7 +17,7 @@ 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c -index 0428c586a..87b1184bc 100644 +index d1f8dfa50..d6e518c88 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -206,11 +206,13 @@ hn_chim_uninit(struct rte_eth_dev *dev)