Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2236629pxf; Sat, 13 Mar 2021 12:34:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJzo/4U0eXVYL2YUkg3gbnLaGpKo+WlP/UF7t9uqnST59cheOiKRH78SkN+Gpxm3mzHlgdUk X-Received: by 2002:a05:6402:1350:: with SMTP id y16mr21559061edw.309.1615667687648; Sat, 13 Mar 2021 12:34:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615667687; cv=none; d=google.com; s=arc-20160816; b=JgdjWpddjkdQ8+q2RBm+04NZ2u47zv13qh4z47ZadUY5k6x3rcFDHW+BAE/IcaU8l0 3vi0xgkRRhyZQkOpeQgw//sySsZi4su1CVfTqVgQW5R13A9S3vz8EOQpnl9Nnxo7gLQW DERQBlSnkvYqCYhLSz3RQvzg1KQbRtwy7Fbf4Mcc+S2e1UMc3uZO7C8irARvLJmdDCF3 KsDAVkAOPSSZDvWTKP55gLHyhtqYlnXLV8EoXjQBCv//U12Xk2il3F7mciqP27ssRtqv UtRMT+YzNjYAB5OQzw4XTih1N66+bv7tvnGgD7nlBMEzRaFG8iCobzAJhWnxaHDEPlZ2 0iVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:reply-to:cc:from:to :dkim-signature:date; bh=h8AxKy9QmCvHGWAs8euuTGEWJfSRa96KUPzMBTCT3Bs=; b=u/7uKGRhUqk/fTYZF2adadMU/QrmZ03GiULjOR4RON7DipVnN4FzG0enK/fi2Q4Gu4 8PNJi4aJU833MbGTyVvFLFNeI4LpZcT4AliM7mHjXRxJwRPslbOfvixn6eqSzlxnf++z zneWzy2rosEeNIHyh4fVndDjlWjgL5gt0ntVZG8Asl3m5WlfRXsels+4QLPOdq7IJmex PkYbH4rMzPoqCROFouWXXq1hUqtWpkRIkMoqeNlmb+i8uz6EXIiJLs46ktLqw3x411zq 17cNEzUPVyn3SdY9Yi0N1H0DsEFxJg2YRjCNDBFDIJGnBB0OjSfvJGwzupBLHMxp9I46 2sLw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=h3JPpOw+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id rp14si7442404ejb.435.2021.03.13.12.34.25; Sat, 13 Mar 2021 12:34:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@pm.me header.s=protonmail header.b=h3JPpOw+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=pm.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234674AbhCMUay (ORCPT + 99 others); Sat, 13 Mar 2021 15:30:54 -0500 Received: from mail-40131.protonmail.ch ([185.70.40.131]:24355 "EHLO mail-40131.protonmail.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234451AbhCMUaV (ORCPT ); Sat, 13 Mar 2021 15:30:21 -0500 Date: Sat, 13 Mar 2021 20:30:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail; t=1615667419; bh=h8AxKy9QmCvHGWAs8euuTGEWJfSRa96KUPzMBTCT3Bs=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=h3JPpOw+8WBMl4rj82j7AX9N7ZOtXgJ5vj21dlyj+DDHkvRWQ8qHHJGxDS8ZiXxzr qpbX63vj6ImP5t2h/5GbON5g2TkGc737ft5Sfo/mKihjSn0OHB1JVgCuhykpULm0Hc PyiMCbgZVBKbYS5atvIgKvmqgG1VSEL6Des9BRPP97y+TxVCUW/HGK2AousZqOfn7W ZRptEqAhTpyLczMeNThcUwCyRmn+kZeOManx75uLN8xFo9Nlcyzfc3RrhAv8ZDnBSV EdKVulCqWAsDcwKgDhhg6DcqvzBPLE5bDnE7FZgwh+Ei9hs5QBW1ADOcA03HMgpHId fZC+8Zv+O6y8A== To: "David S. Miller" , Jakub Kicinski From: Alexander Lobakin Cc: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Alexander Lobakin , Eric Dumazet , Wei Wang , Cong Wang , Taehee Yoo , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Reply-To: Alexander Lobakin Subject: [PATCH v2 net-next 3/3] gro: give 'hash' variable in dev_gro_receive() a less confusing name Message-ID: <20210313202946.59729-4-alobakin@pm.me> In-Reply-To: <20210313202946.59729-1-alobakin@pm.me> References: <20210313202946.59729-1-alobakin@pm.me> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 'hash' stores not the flow hash, but the index of the GRO bucket corresponding to it. Change its name to 'bucket' to avoid confusion while reading lines like '__set_bit(hash, &napi->gro_bitmask)'. Signed-off-by: Alexander Lobakin --- net/core/dev.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index b635467087f3..5a2847a19cf2 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -5952,8 +5952,8 @@ static void gro_flush_oldest(struct napi_struct *napi= , struct list_head *head) static enum gro_result dev_gro_receive(struct napi_struct *napi, struct sk= _buff *skb) { -=09u32 hash =3D skb_get_hash_raw(skb) & (GRO_HASH_BUCKETS - 1); -=09struct gro_list *gro_list =3D &napi->gro_hash[hash]; +=09u32 bucket =3D skb_get_hash_raw(skb) & (GRO_HASH_BUCKETS - 1); +=09struct gro_list *gro_list =3D &napi->gro_hash[bucket]; =09struct list_head *head =3D &offload_base; =09struct packet_offload *ptype; =09__be16 type =3D skb->protocol; @@ -6047,10 +6047,10 @@ static enum gro_result dev_gro_receive(struct napi_= struct *napi, struct sk_buff =09=09gro_pull_from_frag0(skb, grow); ok: =09if (gro_list->count) { -=09=09if (!test_bit(hash, &napi->gro_bitmask)) -=09=09=09__set_bit(hash, &napi->gro_bitmask); -=09} else if (test_bit(hash, &napi->gro_bitmask)) { -=09=09__clear_bit(hash, &napi->gro_bitmask); +=09=09if (!test_bit(bucket, &napi->gro_bitmask)) +=09=09=09__set_bit(bucket, &napi->gro_bitmask); +=09} else if (test_bit(bucket, &napi->gro_bitmask)) { +=09=09__clear_bit(bucket, &napi->gro_bitmask); =09} =09return ret; -- 2.30.2