Subject: Re: Problem with VLANs and via-velocity driver

From: Patrick McHardy <[email-masked]>
Date: Fri, 13 Nov 2009 12:11:18 +0100

Séguier Régis wrote:
> Patrick McHardy a écrit :
>> Kevin Shanahan wrote:
>>  
>>> I've had some problems with getting a fairly simple (I thought) VLAN
>>> configuration working with the on board Via NICs on my Via M700
>>> board. Looks like as soon as a tagged VLAN interface is added, the
>>> underlying "raw" (untagged) interface stops responding.
>>>
>>>
>> There's some special-casing for VID 0 in velocity_init_cam_filter().
>> Does "ip link add link eth0 type vlan id 0" make any difference?
>> If not, does "ip link set eth0 promisc on"?
>>   
> When we patch the driver to support multiple vlan, we decide to use the
> vlan 0 to desactivate the vlan filtering.

Why? The usual behaviour is to receive both tagged and untagged
frames.

> via-velocity: fix vlan receipt
> 
> - vlans were using a single CAM register (see mac_set_vlan_cam)
> - setting the address filtering registers for vlans is not
>  needed when there is no vlan
> 
> The non-tagged interface is filtered out as soon as a tagged
> (!= 0) interface is created. Its traffic appears again when an
> zero-tagged interface is created.

VID 0 doesn't mean untagged, it means the tag contains only a priority
value.