[dpdk-stable] patch 'net/netvsc: fix chimney index' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Aug 6 11:54:08 CEST 2020


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 <longli at microsoft.com>
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 <longli at microsoft.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
 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 <longli at microsoft.com>
 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 at dpdk.org
 
 Signed-off-by: Long Li <longli at microsoft.com>
 Acked-by: Stephen Hemminger <stephen at networkplumber.org>
@@ -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)


More information about the stable mailing list