Subject: Re: [PATCH net-next V4 02/13] bridge: Add vlan filtering infrastructure

From: Vlad Yasevich <[email-masked]>
Date: Thu, 20 Dec 2012 10:31:14 -0500

On 12/20/2012 08:39 AM, Shmulik Ladkani wrote:
> Hi Vlad,
>
> On Wed, 19 Dec 2012 12:48:13 -0500 Vlad Yasevich <[email-masked]> wrote:
>> +static void nbp_vlan_flush(struct net_bridge_port *p)
>> +{
>> +	struct net_port_vlan *pve;
>> +	struct net_port_vlan *tmp;
>> +
>> +	ASSERT_RTNL();
>> +
>> +	list_for_each_entry_safe(pve, tmp, &p->vlan_list, list)
>> +		nbp_vlan_delete(p, pve->vid, BRIDGE_FLAGS_SELF);
>
> Why would you want to clear "bridge master port" association from this
> vlan, in the event of NBP destruction?
> The "bridge port" may still be a member of this vlan, doesn't it?
> Seems flags argument should be 0.

This ends up getting fixed later, but you are right.  This should be 0.

>
>> +#define BR_VID_HASH_SIZE (1<<6)
>> +#define br_vlan_hash(vid) ((vid) % (BR_VID_HASH_SIZE - 1))
>
> Did you mean:                       & (BR_VID_HASH_SIZE - 1)

yes.

thanks
-vlad

> Regards,
> Shmulik