From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH][net-next] net: increase MAX_GRO_SKBS to 64 Date: Wed, 04 Jul 2018 14:01:28 +0900 (KST) Message-ID: <20180704.140128.479892744399401580.davem@davemloft.net> References: <1530531703-11368-1-git-send-email-lirongqing@baidu.com> <20180702.204428.903903223700362229.davem@davemloft.net> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: lirongqing@baidu.com, netdev@vger.kernel.org, eric.dumazet@gmail.com To: roy.qing.li@gmail.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:57132 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932252AbeGDFFF (ORCPT ); Wed, 4 Jul 2018 01:05:05 -0400 In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: From: Li RongQing Date: Tue, 3 Jul 2018 14:21:48 +0800 > On 7/2/18, David Miller wrote: >> From: Li RongQing >> 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 >> >> 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 > 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;