Received: by 2002:a05:6a10:a841:0:0:0:0 with SMTP id d1csp216133pxy; Wed, 21 Apr 2021 00:58:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzL0FLlhwGl+L0GSlbJAicNEknCie58hG3RunU0/fgFxV3s6Lj3mNPoC+ZbwnjyjgmSRVkf X-Received: by 2002:a17:90a:6285:: with SMTP id d5mr9787824pjj.136.1618991912819; Wed, 21 Apr 2021 00:58:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618991912; cv=none; d=google.com; s=arc-20160816; b=fewnE5boUFu+FXyzE4iRQIeHBX8z7St9JDrdMbP6Zj7UA8IEzl6+C9/ytytuRnLY5s /AN8yk2vFlhvKpgbZezAHs61xiHNb7h4ySgwrsmyMbdfd1W+ZR7vB5KGqMjNmt9WOMVi DHrPlDrxIxPjVMiwLHmi2ei3TebhlgMRrywTdyJB4O+YbL6vtO9nzNIvMZSiQcWh1mwq WXdLtTg2TyLmYunDr+3vqlU917PpE2N1jOGWX5Exx7MjsCkHv55qAlHasPe0X+2fVSdi eCfhUgua4xr9fucjzNFmm3DYvvSDpvYwlOM2S6AR/U4MMSop1hjTej/mNHP/tL/CGGG7 bVLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=vi6JLft4hlUsupG+hsf70suBzfd4ECi6YrtBrb+GIj8=; b=mriN/vP5zTw1wRljZpWrR8wy+CFccsZX56Pq7I0HC9czoSdQ5VtbGDCTW9hEw8vXAW oYormVU9jz/C5U+XPYKgIcm99+zGcu5CsOkwYSG80401F4DopjJO0KwrnTUh007PeAYW MXfmkurF5aEUA4RwsglQgik4jvSUCsmmO7BHSc1KZdFbWsm8wtLCfgMVsDnXNFWuIRjN v+TZPXXt/UVHf83npBWS3M3+IiBYRoQwIAyQ2xDQaiOrSQXgefRLD2hmmJ8EcFmsG9z5 ZM6Q/jtJqhOgNW8j6nbgY2hb5dwKUPYYJnbrZ20XfRibm2pDC/eDKSzi74r7mG5RKgzn TtMw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d13si1560647pfq.20.2021.04.21.00.58.20; Wed, 21 Apr 2021 00:58:32 -0700 (PDT) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237037AbhDUHmO (ORCPT + 99 others); Wed, 21 Apr 2021 03:42:14 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:3405 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235209AbhDUHmN (ORCPT ); Wed, 21 Apr 2021 03:42:13 -0400 Received: from dggeml406-hub.china.huawei.com (unknown [172.30.72.54]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4FQC8k4991z5sHp; Wed, 21 Apr 2021 15:38:30 +0800 (CST) Received: from dggpeml100022.china.huawei.com (7.185.36.176) by dggeml406-hub.china.huawei.com (10.3.17.50) with Microsoft SMTP Server (TLS) id 14.3.498.0; Wed, 21 Apr 2021 15:41:16 +0800 Received: from lhreml703-chm.china.huawei.com (10.201.108.52) by dggpeml100022.china.huawei.com (7.185.36.176) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Wed, 21 Apr 2021 15:41:15 +0800 Received: from lhreml703-chm.china.huawei.com ([10.201.68.198]) by lhreml703-chm.china.huawei.com ([10.201.68.198]) with mapi id 15.01.2176.012; Wed, 21 Apr 2021 08:41:13 +0100 From: Salil Mehta To: Paul Menzel CC: "linuxarm@openeuler.org" , "netdev@vger.kernel.org" , Linuxarm , "linux-kernel@vger.kernel.org" , Jeff Kirsher , "intel-wired-lan@lists.osuosl.org" , "David S. Miller" , Jakub Kicinski Subject: RE: [Intel-wired-lan] [PATCH V2 net] ice: Re-organizes reqstd/avail {R, T}XQ check/code for efficiency+readability Thread-Topic: [Intel-wired-lan] [PATCH V2 net] ice: Re-organizes reqstd/avail {R, T}XQ check/code for efficiency+readability Thread-Index: AQHXNnA44ik22M7HZEWiZd3JF/ZDoKq+hESg Date: Wed, 21 Apr 2021 07:41:13 +0000 Message-ID: <418702bdb5244eb4811a2a1a536c55c0@huawei.com> References: <20210413224446.16612-1-salil.mehta@huawei.com> <7974e665-73bd-401c-f023-9da568e1dffc@molgen.mpg.de> In-Reply-To: <7974e665-73bd-401c-f023-9da568e1dffc@molgen.mpg.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.47.66.69] Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org PiBGcm9tOiBQYXVsIE1lbnplbCBbbWFpbHRvOnBtZW56ZWxAbW9sZ2VuLm1wZy5kZV0NCj4gU2Vu dDogV2VkbmVzZGF5LCBBcHJpbCAyMSwgMjAyMSA2OjM2IEFNDQo+IFRvOiBTYWxpbCBNZWh0YSA8 c2FsaWwubWVodGFAaHVhd2VpLmNvbT4NCj4gQ2M6IGxpbnV4YXJtQG9wZW5ldWxlci5vcmc7IG5l dGRldkB2Z2VyLmtlcm5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