[dpdk-stable] patch 'net/bonding: fix setting VLAN ID on slave ports' has been queued to LTS release 16.11.7

luca.boccassi at gmail.com luca.boccassi at gmail.com
Tue May 1 12:44:46 CEST 2018


Hi,

FYI, your patch has been queued to LTS release 16.11.7

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/03/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 064d2c44a801a9d0a34a1b3ca498d698dd90596c Mon Sep 17 00:00:00 2001
From: Chas Williams <chas3 at att.com>
Date: Tue, 3 Apr 2018 12:01:22 -0400
Subject: [PATCH] net/bonding: fix setting VLAN ID on slave ports

[ upstream commit 3639903f488976e61752103bed546d5b87147ad0 ]

The pos returned is just the offset of the slab.  You need to use this
to offset the bits in the slab.

Fixes: c771e4ef38 ("net/bonding: enable slave VLAN filter")

Signed-off-by: Chas Williams <chas3 at att.com>
Acked-by: Radu Nicolau <radu.nicolau at intel.com>
---
 drivers/net/bonding/rte_eth_bond_api.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bonding/rte_eth_bond_api.c b/drivers/net/bonding/rte_eth_bond_api.c
index 4b6f1471c..7bb2fe1ec 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -361,9 +361,12 @@ slave_vlan_filter_set(uint8_t bonded_port_id, uint8_t slave_port_id)
 		for (i = 0, mask = 1;
 		     i < RTE_BITMAP_SLAB_BIT_SIZE;
 		     i ++, mask <<= 1) {
-			if (unlikely(slab & mask))
+			if (unlikely(slab & mask)) {
+				uint16_t vlan_id = pos + i;
+
 				res = rte_eth_dev_vlan_filter(slave_port_id,
-							      (uint16_t)pos, 1);
+							      vlan_id, 1);
+			}
 		}
 		found = rte_bitmap_scan(internals->vlan_filter_bmp,
 					&pos, &slab);
-- 
2.14.2



More information about the stable mailing list