|Subject:||Re: [lwip-users] Add support for outgoing VLAN tags?|
|Date:||Wed, 02 Nov 2011 10:58:12 +0100|
|On 1 nov 2011 12:28 "Simon Goldschmidt" <address@hidden> wrote:|
"address@hidden" <address@hidden> wrote:Since 1.4, lwip supports incomming VLAN tagged frames.
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?
|[Prev in Thread]||Current Thread||[Next in Thread]|