From: Li RongQing <roy.qing...@gmail.com>
Date: Tue, 3 Jul 2018 14:21:48 +0800

> On 7/2/18, David Miller <da...@davemloft.net> wrote:
>> From: Li RongQing <lirongq...@baidu.com>
>> Date: Mon,  2 Jul 2018 19:41:43 +0800
>>
>>> After 07d78363dcffd [net: Convert NAPI gro list into a small hash table]
>>> there is 8 hash buckets, which allow more flows to be held for merging.
>>>
>>> keep each as original list length, so increase MAX_GRO_SKBS to 64
>>>
>>> Signed-off-by: Li RongQing <lirongq...@baidu.com>
>>
>> I would like to hear some feedback from Eric, 64 might be too big.
>>
> How about the below change?
> 
> commit 6270b973a973b2944fedb4b5f9926ed3e379d0c2 (HEAD -> master)
> Author: Li RongQing <lirongq...@baidu.com>
> Date:   Mon Jul 2 19:08:37 2018 +0800
> 
>     net: limit each hash list length to MAX_GRO_SKBS

Yes, this is much better.

> @@ -324,6 +324,7 @@ struct napi_struct {
>  #endif
>         struct net_device       *dev;
>         struct list_head        gro_hash[GRO_HASH_BUCKETS];
> +       int             list_len[GRO_HASH_BUCKETS];

For cache locality, it is probably best to make gro_hash an array of structures
whose members are:

        struct list_head        hash_chain;
        int                     list_len;

Reply via email to