]> git.baikalelectronics.ru Git - kernel.git/commit
vlan: avoid header copying and linearisation where possible
authorPatrick McHardy <kaber@trash.net>
Tue, 8 Jul 2008 22:36:57 +0000 (15:36 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 8 Jul 2008 22:36:57 +0000 (15:36 -0700)
commitc41b2444cd6d397d7b773ea26058e5c3bd1f992b
tree9dd9f8578727783dc1d321a822402ee6ca83cd10
parent4b5da8d16ce4c81afbae1169d9fad00d29879ef5
vlan: avoid header copying and linearisation where possible

- vlan_dev_reorder_header() is only called on the receive path after
  calling skb_share_check(). This means we can use skb_cow() since
  all we need is a writable header.

- vlan_dev_hard_header() includes a work-around for some apparently
  broken out of tree MPLS code. The hard_header functions can expect
  to always have a headroom of at least there own hard_header_len
  available, so the reallocation check is unnecessary.

- __vlan_put_tag() can use skb_cow_head() to avoid the skb_unshare()
  copy when the header is writable.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/if_vlan.h
net/8021q/vlan_dev.c