On 1 nov 2011 12:28 "Simon Goldschmidt" <[email protected]> wrote:

> "[email protected]" <[email protected]> wrote:
> 
> > Since 1.4, lwip supports incomming VLAN tagged frames.
> > Is there any interest in also adding support for VLAN tagging of
> > outgoing frames for QoS purposes?
> 
> I guess it hasn't been added yet since no one knew how outgoing VLAN
> support should look like. for example, I wouldn't have thought that it
> would be useful to support different VLAN tags on the same IP address.
> Instead, I would have added multiple netifs each with their own IP
> address or subnet and assigned a VLAN tag to the netif.
> 
> Honestly, I wouldn't want to add a new argument in all the output
> functions for everybody for such a seldom used feature. Isn't there
> another way to implement this?
> 
> Simon
> 

No, it is not particularly useful to support different VLAN IDs on the
same IP address.
However, the VLAN tags have another purpose as well: They allow QoS
(Quality of Service) in Ethernet networks.
The TOS/DiffServ-field in the IP header allows QoS in routers, but
usually not in Ethernet switches.
By adding a VLAN tag with VLAN ID zero (means no VLAN), the "PCP" field
in the VLAN tag can be used to enable QoS in Ethernet networks.

An IP phone with built in webserver would for example want to assign
higher priority to its voice traffic than to the http traffic, and it is
best if the voice frames can be prioritized in both switches and
routers.


I can think of one alternative to the solution I mentioned before:
A new bit is defined in the socket option field in the PCB. This bit
enables/disables VLAN tagging for the socket.
A new bit is defined in the "flags" field of the pbuf struct. This bit
indicates if the frame shall be sent with a VLAN header. pbuf_alloc must
also allocate room for 4 bytes more in the LINK header when this bit is
set.

The existing "tos" field of the pcb is mapped to the "pcp" field in the
VLAN tag as well as to the TOS field in the IP header.

With this method it could be possible to add support for outgoing VLAN
taggning for QoS purposes, without having to add a new argument to a lot
of internal LwIP functions.

What do you think?

Regards,
Timmy Brolin
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to