Files
Linux/include/linux
Eric Dumazet a50e233c50 net-gro: restore frag0 optimization
Main difference between napi_frags_skb() and napi_gro_receive() is that
the later is called while ethernet header was already pulled by the NIC
driver (eth_type_trans() was called before napi_gro_receive())

Jerry Chu in commit 299603e837 ("net-gro: Prepare GRO stack for the
upcoming tunneling support") tried to remove this difference by calling
eth_type_trans() from napi_frags_skb() instead of doing this later from
napi_frags_finish()

Goal was that napi_gro_complete() could call
ptype->callbacks.gro_complete(skb, 0)  (offset of first network header =
0)

Also, xxx_gro_receive() handlers all use off = skb_gro_offset(skb) to
point to their own header, for the current skb and ones held in gro_list

Problem is this cleanup work defeated the frag0 optimization:
It turns out the consecutive pskb_may_pull() calls are too expensive.

This patch brings back the frag0 stuff in napi_frags_skb().

As all skb have their mac header in skb head, we no longer need
skb_gro_mac_header()

Reported-by: Michal Schmidt <[email protected]>
Fixes: 299603e837 ("net-gro: Prepare GRO stack for the upcoming tunneling support")
Signed-off-by: Eric Dumazet <[email protected]>
Cc: Jerry Chu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2014-03-31 16:26:40 -04:00
..
…
…
…
…
2014-03-28 16:29:35 -04:00
2014-01-20 11:55:23 -08:00
…
…
…
2014-01-24 22:39:54 +01:00
…
…
…
2014-01-17 01:59:38 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-02-13 10:08:52 +05:30
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-01-16 10:23:02 +10:30
…
…
…
…
…
…
…
…
2014-03-10 11:44:42 -04:00
…
…
…
…
…
…
2014-03-10 11:44:42 -04:00
…
…
…
…
…
2014-03-10 17:26:19 -07:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-03-04 07:55:47 -08:00
…
…
…
2014-01-16 11:15:50 +01:00
…
2014-01-26 22:48:35 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2013-12-29 16:34:25 -05:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-02-25 07:37:52 -08:00
…
…
2014-01-25 08:55:09 +01:00
…
…
…
…
…
…
…
…
…
2014-01-08 19:03:00 -02:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2013-12-26 13:29:35 -05:00
…
…
…
…
…
…
2014-01-16 10:23:03 +10:30
…
…
…
2014-03-04 13:51:06 -05:00
…
…
2014-01-27 21:02:39 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
2014-01-25 03:14:05 -05:00
…
…
…
…
…
…
2014-01-27 19:27:53 -05:00
…
…
…
…
…
2014-01-13 14:29:49 -08:00
2014-01-03 11:22:21 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-01-22 19:36:57 +01:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-01-28 13:20:09 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-01-27 21:02:39 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-02-14 13:39:29 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2014-01-30 16:56:55 -08:00
…