Re: vlan Q in Q - [WAS Re: Using a switch fabric to emulate multiple NICs]

Ben Greear <[email protected]>
Newsgroups gmane.linux.drivers.vlan
Organization Candela Technologies
Message-ID <[email protected]>
Alex Zeffertt wrote:
> O
> 
>>>I'd appreciate any comments regarding how this should be done properly.
>>
>> From a brief glance at the code, I bet that a program opening a raw socket and passing
>>a pre-constructed VLAN packet to the VLAN device will cause double encapsulation, which
>>is not what I would want to happen.  If we do not add the additional 4 byte header when
>>the VIDs are the same, I believe that would fix that problem.  It would create a small
>>problem for your device in that the users could not use the VLANs that your
>>box uses internally.
>>
> 
> 
> 
> Thanks for having a look Ben.
> 
> I think I am missing something though.  Why would a program ever want to pass a "pre-constructed
> VLAN packet" to the VLAN device.  I assumed that the whole idea was to make vlan devices look like
> traditional ethernet devices to the rest of the kernel.

Well, on a regular ethernet device, you can open a raw packet socket and pass a
pre-constructed frame.  My original thought was to allow the same thing on
VLANs.  However, I can understand arguments for your approach.

I guess we could just let application writers know to pass a pre-constructed *ethernet*
frame instead of a VLAN frame.  It is likely that this is how folks use it anyway...

Ben

> 
> Alex
> 


-- 
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.