From: David Miller <davem@davemloft.net>
To: lirongqing@baidu.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH][net-next] net: limit each hash list length to MAX_GRO_SKBS
Date: Thu, 05 Jul 2018 10:04:49 +0900 (KST) [thread overview]
Message-ID: <20180705.100449.331964278763183582.davem@davemloft.net> (raw)
In-Reply-To: <1530693768-26845-1-git-send-email-lirongqing@baidu.com>
From: Li RongQing <lirongqing@baidu.com>
Date: Wed, 4 Jul 2018 16:42:48 +0800
> @@ -4989,10 +4988,11 @@ static int napi_gro_complete(struct sk_buff *skb)
> return netif_receive_skb_internal(skb);
> }
>
> -static void __napi_gro_flush_chain(struct napi_struct *napi, struct list_head *head,
> +static void __napi_gro_flush_chain(struct napi_struct *napi, int index,
> bool flush_old)
Hash is usually u32, so please lets make the type consistent. Make index here
a 'u32' and also make 'i' in napi_gro_flush() a 'u32' too.
> @@ -5138,6 +5122,7 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff
> enum gro_result ret;
> int same_flow;
> int grow;
> + u32 hash = skb_get_hash_raw(skb) & (GRO_HASH_BUCKETS - 1);
Please preserve reverse christmas tree local variable ordering.
Otherwise this looks great.
Thank you.
prev parent reply other threads:[~2018-07-05 1:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-04 8:42 [PATCH][net-next] net: limit each hash list length to MAX_GRO_SKBS Li RongQing
2018-07-05 1:04 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180705.100449.331964278763183582.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=lirongqing@baidu.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).