diff options
author | Eric Dumazet <edumazet@google.com> | 2013-01-07 09:28:21 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-08 17:51:54 -0800 |
commit | fda55eca5a33f33ffcd4192c6b2d75179714a52c (patch) | |
tree | 54b8e755273ab37fa54cfdd0867b2e7631eb4b10 /net/core/dev.c | |
parent | 0edb7ede7d524377afbaf48a35654baa52368f4b (diff) |
net: introduce skb_transport_header_was_set()
We have skb_mac_header_was_set() helper to tell if mac_header
was set on a skb. We would like the same for transport_header.
__netif_receive_skb() doesn't reset the transport header if already
set by GRO layer.
Note that network stacks usually reset the transport header anyway,
after pulling the network header, so this change only allows
a followup patch to have more precise qdisc pkt_len computation
for GSO packets at ingress side.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index a51ccf46e8b..2e2448201a7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3352,7 +3352,8 @@ static int __netif_receive_skb(struct sk_buff *skb) orig_dev = skb->dev; skb_reset_network_header(skb); - skb_reset_transport_header(skb); + if (!skb_transport_header_was_set(skb)) + skb_reset_transport_header(skb); skb_reset_mac_len(skb); pt_prev = NULL; |