[PATCH net-next mlxsw 3/3] mlxsw: spectrum_span: Support VLAN under mirror-to-gretap

Petr Machata petrm at mellanox.com
Tue May 8 21:21:09 AEST 2018

Ido Schimmel <idosch at mellanox.com> writes:

> On Mon, May 07, 2018 at 04:29:39PM +0200, Petr Machata wrote:
>> --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
>> +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c
>> @@ -176,9 +176,9 @@ mlxsw_sp_span_entry_bridge_8021q(const struct net_device *br_dev,
>>  {
>>  	struct bridge_vlan_info vinfo;
>>  	struct net_device *edev;
>> -	u16 pvid;
>> +	u16 pvid = *p_vid;
> IIUC, in case we got here from a VLAN device configured on top of a
> VLAN-aware bridge, then 'p_vid' is actually the VID of the VLAN device.
> If so, then calling it PVID is incorrect. PVID is only used for untagged
> traffic.

Yep, I felt like the meaning is sufficiently close that I can keep the
name, but I'll fix this up.

We have a similar problem with l3_edev, which has become a misnomer
since the bridge patches. I was reluctant to change it, because such
"rename-only" patch seems like it doesn't fit anywhere. But I'll add a
patch for this to v2.

> Also, I'm missing the check where packets with this VLAN are even
> allowed to ingress the bridge through the bridge device.

Good point, I forgot about that.

> Note that we don't get notified about changes to the bridge device's
> VLAN filter, so this is something that needs to be added as well.

Yeah, the same issue as with bridge pvid change notification. I'd like
to fix this separately. I added a scrum task for this, we definitely
need to take care of this in May.


More information about the Linux-mlxsw mailing list