aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2018-06-24 14:14:02 +0900
committerDavid S. Miller <davem@davemloft.net>2018-06-26 11:33:04 +0900
commit07d78363dcffd9cb1bf6f06a6cac0e0847f3c1de (patch)
tree641f6811f085e35b7f876685e0dbc506defce983 /include/linux
parentnet: Convert GRO SKB handling to list_head. (diff)
downloadlinux-dev-07d78363dcffd9cb1bf6f06a6cac0e0847f3c1de.tar.xz
linux-dev-07d78363dcffd9cb1bf6f06a6cac0e0847f3c1de.zip
net: Convert NAPI gro list into a small hash table.
Improve the performance of GRO receive by splitting flows into multiple hash chains. Suggested-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f176d9873910..c6b377a15869 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -305,6 +305,7 @@ int __init netdev_boot_setup(char *str);
/*
* Structure for NAPI scheduling similar to tasklet but with weighting
*/
+#define GRO_HASH_BUCKETS 8
struct napi_struct {
/* The poll_list must only be managed by the entity which
* changes the state of the NAPI_STATE_SCHED bit. This means
@@ -322,7 +323,7 @@ struct napi_struct {
int poll_owner;
#endif
struct net_device *dev;
- struct list_head gro_list;
+ struct list_head gro_hash[GRO_HASH_BUCKETS];
struct sk_buff *skb;
struct hrtimer timer;
struct list_head dev_list;