On Wed, Jun 15, 2011 at 11:00:05AM -0700, Jesse Gross wrote:
> The sematics for setting a vlan tag are to modify the existing tag
> if one exists.  This can be expressed as removing the existing tag
> first and then adding a new one.  This simplifies the code by not
> requiring two copies of the logic that manipulates non-accelerated
> vlans and should not make a performance difference because the vlan
> tag is contained in a single cache line.
> 
> Signed-off-by: Jesse Gross <[email protected]>

Acked-by: Ben Pfaff <[email protected]>

But the test for VLAN_ETH_HLEN isn't needed, I think, because
strip_vlan() does the same test.

strip_vlan() checks vlan_eth_hdr(skb)->h_vlan_proto for 802.1Q
whereas modify_vlan_tci() checks skb->protocol.  I don't know if
consistency is important.
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev

Reply via email to