From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller 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) Message-ID: <20180705.100449.331964278763183582.davem@davemloft.net> References: <1530693768-26845-1-git-send-email-lirongqing@baidu.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org To: lirongqing@baidu.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:47310 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752960AbeGEBEv (ORCPT ); Wed, 4 Jul 2018 21:04:51 -0400 In-Reply-To: <1530693768-26845-1-git-send-email-lirongqing@baidu.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Li RongQing 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.