]> git.baikalelectronics.ru Git - kernel.git/commit
net: use listified RX for handling GRO_NORMAL skbs
authorEdward Cree <ecree@solarflare.com>
Tue, 6 Aug 2019 13:53:55 +0000 (14:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Aug 2019 01:22:29 +0000 (18:22 -0700)
commit96a297e84dfde198a81fe1b8481c5160fa66fef2
tree8a644610f9b44ed5ebf658bf23c7745b66c015a7
parenta7b42465cf0773c796430272996e95b318b8893d
net: use listified RX for handling GRO_NORMAL skbs

When GRO decides not to coalesce a packet, in napi_frags_finish(), instead
 of passing it to the stack immediately, place it on a list in the napi
 struct.  Then, at flush time (napi_complete_done(), napi_poll(), or
 napi_busy_loop()), call netif_receive_skb_list_internal() on the list.
We'd like to do that in napi_gro_flush(), but it's not called if
 !napi->gro_bitmask, so we have to do it in the callers instead.  (There are
 a handful of drivers that call napi_gro_flush() themselves, but it's not
 clear why, or whether this will affect them.)
Because a full 64 packets is an inefficiently large batch, also consume the
 list whenever it exceeds gro_normal_batch, a new net/core sysctl that
 defaults to 8.

Signed-off-by: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h
net/core/dev.c
net/core/sysctl_net_core.c