Message ID | 20221013234349.1165689-1-yury.norov@gmail.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp533639wrs; Thu, 13 Oct 2022 16:53:53 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7I4rVbMqOKqaEcv6tERJd6krGWOUXPAHOz20mu5GLmuhYdQOLUU29DzBZKoLp3I1CvArJZ X-Received: by 2002:a17:906:eecb:b0:73c:5c85:142b with SMTP id wu11-20020a170906eecb00b0073c5c85142bmr1541660ejb.433.1665705232928; Thu, 13 Oct 2022 16:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665705232; cv=none; d=google.com; s=arc-20160816; b=fSHGbAxaJxu8XmXkcge7HwsDy9uFqU7lmrprzTkGvYfvo968tcmfIPfKShTiTEFsd6 Chah86SE1Z9ZGs4zK0ge5BaHa7m5Vs1R/8nR5txf7288NSRDGkuh6T64DSBA2ld+H6ow yG0Sab1LSHzvV6m1u/jzUZ6B172Wa/PXYRlhoamMbPO78W5OeYhUj7c1wlTjL1TWpt+W 4P+KLveGxpClEAP5XPSEQylniqjhG11nURt4VUNCr4uNQ3EG+43Id+zZPexWoHmTZyXS 9qG/MpCv8FnK/6j6qTfifrmK5FVHr09Fq4Ipm5vxwtzzAyxOwHBXxYncNFE1Kl7fP+PZ 21Pw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=M3AV7ZQbI7aNl/tYezng4lVshBENwgW5MmDC2ALTMOU=; b=iyK2cAtGvOfiv1ee69lWg7wVSSkTgEkN6DKUN/J6S2YUPxWcrLdZiv+F2W1NLCmLtx vjBsP5xag4z1hoxWPSss4zshI2druJt/AzOU9XoC/DQEkaBGU3+xTw0wkEI29qEnYFil nvgTJjvaPUWJH9Cf716IaIxKzNzl934/IVQu5LzLldfdkdXVFpBcNZZ/tmeyKdNFW5Ub 03lW+HwKsZhksJQncJ6GdbPHZFHZjG1M0BBZWck/muWiknd5nwFN1ioKK9kqeu4Z4GaV iW6J0aPG3iStZp7802Ya3dSGpSIPnUH7dDeROdjAJR0Nle/nDC8Gphig0Tj2NbbvFtj4 5trQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Dgwe+FsB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t18-20020a056402525200b00459ad800c2csi1068953edd.589.2022.10.13.16.53.28; Thu, 13 Oct 2022 16:53:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Dgwe+FsB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229710AbiJMXnz (ORCPT <rfc822;ouuuleilei@gmail.com> + 99 others); Thu, 13 Oct 2022 19:43:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229545AbiJMXnw (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Oct 2022 19:43:52 -0400 Received: from mail-qt1-x831.google.com (mail-qt1-x831.google.com [IPv6:2607:f8b0:4864:20::831]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B59718C420; Thu, 13 Oct 2022 16:43:52 -0700 (PDT) Received: by mail-qt1-x831.google.com with SMTP id w3so2749928qtv.9; Thu, 13 Oct 2022 16:43:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=M3AV7ZQbI7aNl/tYezng4lVshBENwgW5MmDC2ALTMOU=; b=Dgwe+FsBX5p02aA/HrYcjA2hSo4aa6LZcE5tZ5X77GSffPHlEzTNHQFZEo2BuX6rVJ wO1wxGkmxEgyA50nCZ9Zhq3JggNVPlqsnkk1jjIZaWeQydKN2jGhlDSxEJ+tFbT80oFc vQAxt59KcqJbqEl3pfNGjWIKjX0ferW7vq/apXCMdZC20zg50mjj8t9IEKN+Vq44sYy7 eEzlDUH1qhoQeuOdGWuLkCrhR9qEiO+LPQiN+RFKUXtnP/Ul1Akg+GBz6jl+szPt4Ssf f19isGUAYVfEOFlpRUp39I9k5s8IYvC5O1Xw6CEqcMJMpQ8quM0XFkfzp2Icv37BNI1p RPbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=M3AV7ZQbI7aNl/tYezng4lVshBENwgW5MmDC2ALTMOU=; b=sqOQVue5UgV3IKWjrY30kNli4Wz06Joll6hxC2Q2CV30+yGb3y78XLzKBXN33T2Xw6 WM9hrc9SXt2TkD4gg+naZbWXiIilxj0DqaiIltWR6RQK5w9aBbSze0xd4uILTt9aATHn mgo70RkY5W1PGlJ7OTu4sBRT+WZ2XqQua4oHqvgA8S2BwU6BGbvOglFsqTmNxWQY8EBC L/L/T3gC+OpD3aviy1M9xMU07wxdErrmGdjMIt2SwwQJUG5dTt4+8g3xyKot3gN0q0LP 20qcbVkFoTlFUWrdxkN2msryJRBawkmYajCk5HftuN2tmTV/RE1Z6H5RqwswJJfe7w8s +kxA== X-Gm-Message-State: ACrzQf1ljfgOXQECrlew2/d2yU2i9LM33a6LLnaq3WRgNyQlHlXLu0dw blHZq+WamXYUAfFRmfDOV56p3wecqlY= X-Received: by 2002:ac8:594b:0:b0:35c:d0b7:e2f9 with SMTP id 11-20020ac8594b000000b0035cd0b7e2f9mr2099023qtz.483.1665704630995; Thu, 13 Oct 2022 16:43:50 -0700 (PDT) Received: from localhost ([2601:4c1:c100:2270:ec49:7545:4026:a70a]) by smtp.gmail.com with ESMTPSA id d3-20020a37c403000000b006bba46e5eeasm841543qki.37.2022.10.13.16.43.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Oct 2022 16:43:50 -0700 (PDT) From: Yury Norov <yury.norov@gmail.com> To: netdev@vger.kernel.org, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Sebastian Andrzej Siewior <bigeasy@linutronix.de>, Menglong Dong <imagedong@tencent.com>, Kuniyuki Iwashima <kuniyu@amazon.com>, Petr Machata <petrm@nvidia.com>, Guo Ren <guoren@linux.alibaba.com>, "Michael S . Tsirkin" <mst@redhat.com> Cc: Yury Norov <yury.norov@gmail.com>, linux-kernel@vger.kernel.org Subject: [PATCH v2 0/4] net: drop netif_attrmask_next*() Date: Thu, 13 Oct 2022 16:43:44 -0700 Message-Id: <20221013234349.1165689-1-yury.norov@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746618530403538669?= X-GMAIL-MSGID: =?utf-8?q?1746618530403538669?= |
Series |
net: drop netif_attrmask_next*()
|
|
Message
Yury Norov
Oct. 13, 2022, 11:43 p.m. UTC
netif_attrmask_next_and() generates warnings if CONFIG_DEBUG_PER_CPU_MAPS is enabled. It is used in a single place. netif_attrmask_next() is not used at all. With some rework of __netif_set_xps_queue(), we can drop both functions, switch the code to well-tested bitmap API and fix the warning. v1: https://lore.kernel.org/netdev/20221002151702.3932770-1-yury.norov@gmail.com/T/ v2: Fix missed bitmap initialization in patch #3. Yury Norov (4): net: move setup code out of mutex in __netif_set_xps_queue() net: merge XPS_CPU_DEV_MAPS_SIZE and XPS_RXQ_DEV_MAPS_SIZE macros net: initialize online_mask unconditionally in __netif_set_xps_queue() net: fix opencoded for_each_and_bit() in __netif_set_xps_queue() include/linux/netdevice.h | 53 ++------------------------------------- net/core/dev.c | 35 ++++++++++++++------------ 2 files changed, 21 insertions(+), 67 deletions(-)
Comments
On Thu, Oct 13, 2022 at 04:43:44PM -0700, Yury Norov wrote: > netif_attrmask_next_and() generates warnings if CONFIG_DEBUG_PER_CPU_MAPS > is enabled. It is used in a single place. netif_attrmask_next() is not > used at all. With some rework of __netif_set_xps_queue(), we can drop > both functions, switch the code to well-tested bitmap API and fix the > warning. > > v1: https://lore.kernel.org/netdev/20221002151702.3932770-1-yury.norov@gmail.com/T/ > v2: Fix missed bitmap initialization in patch #3. does not seem to fix the warning https://lore.kernel.org/r/0000000000001d91e205eafc3d01%40google.com is it supposed to fix it? > Yury Norov (4): > net: move setup code out of mutex in __netif_set_xps_queue() > net: merge XPS_CPU_DEV_MAPS_SIZE and XPS_RXQ_DEV_MAPS_SIZE macros > net: initialize online_mask unconditionally in __netif_set_xps_queue() > net: fix opencoded for_each_and_bit() in __netif_set_xps_queue() > > include/linux/netdevice.h | 53 ++------------------------------------- > net/core/dev.c | 35 ++++++++++++++------------ > 2 files changed, 21 insertions(+), 67 deletions(-) > > -- > 2.34.1