Subject: Re: network interface cards native vlans support in linux kernel?

From: Rask Ingemann Lambertsen <[email-masked]>
Date: Wed, 12 Nov 2003 20:48:04 +0100

On Wed, Oct 22, 2003 at 10:01:49AM -0700, Ben Greear wrote:
> Rask Ingemann Lambertsen wrote:
> > 
> > What does a driver need to do to make sure it can handle vlan frames? Is it
> > enought to be prepared to handle frames of size dev->mtu+4? How do I know 4
> > bytes will be enough tomorrow when someone introduces VLAN2 with a 64-bit tag?
> > Checking for CONFIG_VLAN is of no use, right?
> 
> It needs to be able to handle 1518 bytes (+crc), send and receive.  I'd
> suggest using the Intel e100 or e1000, as they both support VLANs just fine.
> Most other GigE nics work too.

I was thinking about what to do as a driver *writer* rather than as a driver
*user*.

#include <linux/if_vlan.h>

and allocating buffers of (dev->mtu + VLAN_ETH_HLEN) bytes. Some chips, such
as the Tulip series, need an extra 4 bytes for the CRC when receiving.

-- 
Regards,
Rask Ingemann Lambertsen