From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio Subject: Re: [PATCH] net: convert gro_count to bitmask Date: Wed, 11 Jul 2018 12:51:33 +0200 Message-ID: <20180711125133.60528540@epycfail> References: <1531300553-21413-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, Eric Dumazet To: Li RongQing Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34290 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726487AbeGKKzZ (ORCPT ); Wed, 11 Jul 2018 06:55:25 -0400 In-Reply-To: <1531300553-21413-1-git-send-email-lirongqing@baidu.com> Sender: netdev-owner@vger.kernel.org List-ID: On Wed, 11 Jul 2018 17:15:53 +0800 Li RongQing wrote: > @@ -5380,6 +5382,12 @@ static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk_buff > if (grow > 0) > gro_pull_from_frag0(skb, grow); > ok: > + if (napi->gro_hash[hash].count) > + if (!test_bit(hash, &napi->gro_bitmask)) > + set_bit(hash, &napi->gro_bitmask); > + else if (test_bit(hash, &napi->gro_bitmask)) > + clear_bit(hash, &napi->gro_bitmask); This might not do what you want. -- Stefano