aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2018-07-05 14:34:32 +0800
committerDavid S. Miller <davem@davemloft.net>2018-07-05 19:20:16 +0900
commit6312fe77751f57d4fa2b28abeef84c6a95c28136 (patch)
treebc8b1e2befbb98f1015785646f48e5f4172caebe /include
parentr8169: fix runtime suspend (diff)
downloadlinux-dev-6312fe77751f57d4fa2b28abeef84c6a95c28136.tar.xz
linux-dev-6312fe77751f57d4fa2b28abeef84c6a95c28136.zip
net: limit each hash list length to MAX_GRO_SKBS
After commit 07d78363dcff ("net: Convert NAPI gro list into a small hash table.")' there is 8 hash buckets, which allows more flows to be held for merging. but MAX_GRO_SKBS, the total held skb for merging, is 8 skb still, limit the hash table performance. keep MAX_GRO_SKBS as 8 skb, but limit each hash list length to 8 skb, not the total 8 skb Signed-off-by: Li RongQing <lirongqing@baidu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index f06ee8f91e74..b683971e500d 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -302,6 +302,11 @@ struct netdev_boot_setup {
int __init netdev_boot_setup(char *str);
+struct gro_list {
+ struct list_head list;
+ int count;
+};
+
/*
* Structure for NAPI scheduling similar to tasklet but with weighting
*/
@@ -323,7 +328,7 @@ struct napi_struct {
int poll_owner;
#endif
struct net_device *dev;
- struct list_head gro_hash[GRO_HASH_BUCKETS];
+ struct gro_list gro_hash[GRO_HASH_BUCKETS];
struct sk_buff *skb;
struct hrtimer timer;
struct list_head dev_list;