* [dpdk-dev] [PATCH] net/bonding: fix setting VLAN ID on slave ports
@ 2018-04-03 16:01 Chas Williams
2018-04-05 11:06 ` Radu Nicolau
0 siblings, 1 reply; 3+ messages in thread
From: Chas Williams @ 2018-04-03 16:01 UTC (permalink / raw)
To: dev; +Cc: declan.doherty, Chas Williams, stable
From: Chas Williams <chas3@att.com>
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")
Cc: stable@dpdk.org
Signed-off-by: Chas Williams <chas3@att.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 f854b7375..d5b7260e4 100644
--- a/drivers/net/bonding/rte_eth_bond_api.c
+++ b/drivers/net/bonding/rte_eth_bond_api.c
@@ -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);
--
2.13.6
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/bonding: fix setting VLAN ID on slave ports
2018-04-03 16:01 [dpdk-dev] [PATCH] net/bonding: fix setting VLAN ID on slave ports Chas Williams
@ 2018-04-05 11:06 ` Radu Nicolau
2018-04-06 9:57 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Radu Nicolau @ 2018-04-05 11:06 UTC (permalink / raw)
To: Chas Williams, dev; +Cc: declan.doherty, Chas Williams, stable
On 4/3/2018 5:01 PM, Chas Williams wrote:
> From: Chas Williams<chas3@att.com>
>
> 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")
> Cc:stable@dpdk.org
>
> Signed-off-by: Chas Williams<chas3@att.com>
> ---
>
Acked-by: Radu Nicolau <radu.nicolau@intel.com>
<mailto:radu.nicolau@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/bonding: fix setting VLAN ID on slave ports
2018-04-05 11:06 ` Radu Nicolau
@ 2018-04-06 9:57 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-04-06 9:57 UTC (permalink / raw)
To: Radu Nicolau, Chas Williams, dev; +Cc: declan.doherty, Chas Williams, stable
On 4/5/2018 12:06 PM, Radu Nicolau wrote:
>
> On 4/3/2018 5:01 PM, Chas Williams wrote:
>> From: Chas Williams<chas3@att.com>
>>
>> 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")
>> Cc:stable@dpdk.org
>>
>> Signed-off-by: Chas Williams<chas3@att.com>
>> ---
>>
> Acked-by: Radu Nicolau <radu.nicolau@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-06 9:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-03 16:01 [dpdk-dev] [PATCH] net/bonding: fix setting VLAN ID on slave ports Chas Williams
2018-04-05 11:06 ` Radu Nicolau
2018-04-06 9:57 ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).