net/bonding: fix setting VLAN ID on slave ports
Subsystems (2)
PATCH 1/1 net/bonding: fix setting VLAN ID on slave ports
From: Chas Williams <[email protected]>
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 <[email protected]>
--- drivers/net/bonding/rte_eth_bond_api.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/net/bonding/rte_eth_bond_api.c +5 -2
@@ -211,9 +211,12 @@ slave_vlan_filter_set(uint16_t bonded_port_id, uint16_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);
Signature · 1 line
2.13.6
Quoted 11 lines · Chas Williams
From: Chas Williams<[email protected]>
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<[email protected]>---
Ferruh Yigit
AppliedQuoted 7 lines · Radu Nicolau
Quoted 5 lines · Chas Williams
From: Chas Williams<[email protected]>
The pos returned is just the offset of the slab. You need to use this to offset the bits in the slab.
Quoted 7 lines
Quoted 6 lines
Fixes c771e4ef38 ("net/bonding: enable slave VLAN filter")Signed-off-by Chas Williams<[email protected]>---
Acked-by Radu Nicolau <[email protected]>
Applied to dpdk-next-net/master, thanks.