|
From: | web |
Subject: | Re: [lwip-users] Add support for outgoing VLAN tags? |
Date: | Wed, 09 Nov 2011 18:05:03 +0100 |
On 9 nov 2011 16:28 "Simon Goldschmidt" <address@hidden> wrote:Mason <address@hidden> wrote:Nice document you found Mason! It really sums it up.SO_PRIORITY (and setsockopt) might be useful? With that solution it looks like TOS and PCP can be set independently and per socket, which is what we need. Simon: Good idea about the addr_hint mechanism you mentioned earlier. Communicating information from socket layer to netif layer by setting/resetting an essentially global variable per frame may perhaps not be the most elegant solution, but since it is already in place... (Adding too many arguments to functions is not very nice either..) A couple of ideas: Instead of netif->addr_hint pointing to the pcb.addr_hint, how about replacing netif->addr_hint with a netif->pcb? That way it could be used to access both addr_hint and QoS information in the pcb. The disadvantage is that it would take perhaps one more instruction to access the addr_hint. Another option could be to change all the places in lwip where the netif->addr_hint is set/reset today, to a function macro which takes a netif and a pcb as arguments. That way the function macro can be redefined to copy any necessary variables from pcb to netif, without ever having to change all the set/reset locations in lwip again. These are just a few ideas, I have not tried them out in code. Regards, Timmy Brolin |
[Prev in Thread] | Current Thread | [Next in Thread] |