On Wed, Dec 11, 2013 at 09:31:49AM -0800, Ben Pfaff wrote: > On Wed, Dec 11, 2013 at 11:24:14AM +0900, Simon Horman wrote: > > If VLAN acceleration is used when the kernel receives a packet > > then the outer-most VLAN tag will not be present in the packet > > when it is received by netdev-linux. Rather, it will be present > > in auxdata. > > > > This patch uses recvmsg() instead of recv() to read auxdata for > > each packet and if the vlan_tid is set then it is added to the packet. > > > > Adding the vlan_tid to the packet involves copying most of the packet > > and may be rather expensive. There is ample scope to avoid this by > > passing the vlan_tid back to the caller separately to the packet itself > > or providing access headroom in the packet. This would most likely > > involve updating the netdev-class API. > > > > Signed-off-by: Simon Horman <ho...@verge.net.au> > > Thanks for doing this. > > I think that we should change netdev_class to pass an ofpbuf into > rx_recv. Then we can just ofpbuf_reserve() VLAN_HEADER_LEN bytes > before doing the receive, and just use eth_push_vlan() to insert the > VLAN header.
Thanks, I was entirely unsure about how you would want the API changed. I'll see about implementing your idea. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev