[ovs-git] Open vSwitch: gre: Improve headroom calculation to reducing copying. (master)

dev at openvswitch.org dev at openvswitch.org
Fri Jun 11 22:58:11 UTC 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, master has been updated
       via  7e7d587d68a22aa47745d5acadd9790d1a34934f (commit)
      from  26bb189de27c51a210d64ddace8669cef50c0f9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7e7d587d68a22aa47745d5acadd9790d1a34934f
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7e7d587d68a22aa47745d5acadd9790d1a34934f
Author: Jesse Gross <jesse at nicira.com>
		
gre: Improve headroom calculation to reducing copying.
		
The first change is use skb_header_cloned() instead of (skb_cloned()
 && skb_clone_writable()).  While these are effectively the same
checks, skb_clone_writable() does not exist until 2.6.23 and relies
on information not available in earlier kernels and therefore the
compat version always returns false.  Since GRE only adds data to
the front of the packet and this is on the transmit path (meaning
there is no important data in the SKB head) it is safe to use
skb_header_cloned().  This avoids a copy for locally generated
TCP packets on the affected kernels.

The second change is to always allocate 64 bytes of headroom when
a copy needs to be made.  There is no cost to allocating extra
space once we have decided to make a copy and can avoid another
copy later if we need to add a VLAN tag.


-----------------------------------------------------------------------

Summary of changes:
 datapath/vport-gre.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Open vSwitch




More information about the git mailing list