Re: [B.A.T.M.A.N.] [PATCHv4 08/13] batman-adv: treat bat0 like yet another VLAN

Antonio Quartulli
2013-06-09T14:20:48Z

[-- Attachment #1: Type: text/plain, Size: 1235 bytes --]

On Sun, Jun 09, 2013 at 10:13:59PM +0800, Marek Lindner wrote:
> On Tuesday, June 04, 2013 18:11:46 Antonio Quartulli wrote:
> > To make the code simpler and easier to extend, treat the
> > normal LAN (bat0) like any other VLAN having vid 0
> > (untagged).
> >
> > This change makes things simpler since bat0 is not a
> > particular case anymore but it is treated like any other
> > VLAN.
>
> What makes you think "vid 0" is not a valid vlan tag ? If this patch is
> applied how can I create a VLAN 0 on top of batX ?

The commit message talks about the value of the vid variable (used to keep the
value of the VID, of course) and as introduced in a previous patch, if the
HAS_TAG bit is not set, then we don't consider the this variable to represent a
real VID.

VLAN 0 on top of batX will generate vid = (HAS_TAG | 0), while in this case I am
talking about vid = 0.

This is implicit in the vid variables semantic previously introduced and this
is what I meant with that "untagged" at the end of the sentence.

Maybe we should substitute "having vid 0" with "having vid with no HAS_TAG bit
set" ?

Cheers,

--
Antonio Quartulli

..each of us alone is worth nothing..
Ernesto "Che" Guevara

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]