macvtap: set transport header before passing skb to lower device
authorJason Wang <jasowang@redhat.com>
Mon, 25 Mar 2013 20:19:55 +0000 (20:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Mar 2013 16:44:43 +0000 (12:44 -0400)
commit9b4d669bc06c215d64f56f1eb0d4eb96e14d689d
tree8fdb362eba001a0d55077b812345aedde53131e9
parenta88b9ce5ad4fc633b159b37d3ed8af60a4008fbc
macvtap: set transport header before passing skb to lower device

Set the transport header for 1) some drivers (e.g ixgbe) needs l4 header 2)
precise packet length estimation (introduced in 1def9238) needs l4 header to
compute header length.

For the packets with partial checksum, the patch just set the transport header
to csum_start. Otherwise tries to use skb_flow_dissect() to get l4 offset, if it
fails, just pretend no l4 header.

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvtap.c