tunneling: Avoid extra copying if expanding headroom.
authorJesse Gross <jesse@nicira.com>
Wed, 8 Jun 2011 00:09:35 +0000 (17:09 -0700)
committerJesse Gross <jesse@nicira.com>
Thu, 16 Jun 2011 21:41:15 +0000 (14:41 -0700)
commitbf16ba4a9b1b4a38c867349e70e39d551b406b32
treefe9e3f995004621b6b4026e89153beb601354916
parent10db8b20d2ed55417f625a3212db3b5cef0331d2
tunneling: Avoid extra copying if expanding headroom.

Currently if we need additional headroom before encapsulating a
packet a clone is made before expanding headroom or if we are
just trying to make the headroom writable then we copy both
the struct sk_buff and the paged data.  Both of these are unnecessary
and we end up freeing the original copy.  We can remove these copies
and simplify the code by just expanding the linear data area.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
datapath/tunnel.c