From patchwork Thu Sep 9 23:10:01 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 509097 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F7A1C433F5 for ; Thu, 9 Sep 2021 23:10:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0675A611C3 for ; Thu, 9 Sep 2021 23:10:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348324AbhIIXL1 (ORCPT ); Thu, 9 Sep 2021 19:11:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:50236 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231814AbhIIXL0 (ORCPT ); Thu, 9 Sep 2021 19:11:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id DCEC960ED8; Thu, 9 Sep 2021 23:10:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1631229016; bh=02hu4KDDSgHjtU1tc6qac55eEQesJbg4qVB0se5ZHjg=; h=From:To:Cc:Subject:Date:From; b=K2RFWchWSmg98eAbcVnXUJJ9ytZpEJi93mHAMkoaTA7GzkBOT+M2e5ac98y0MixP9 ngXHedbTBjmybIbeoziCWdoAv0/Rn1grN5M7LdHLE0EHgPyCqT0nruRFacjZ1dPWSG HkdNXFp6DPXTR6cwVT1Kw+JHc+xSBHC+GhxSYFBkm80QlfjkKoCL2naobew8ky4/Ci vgKAErOHq/Dw0F3NsiAnxLMlw5h/dKOuUKwQLmhZEhvGhcgtE9bXJf+t5WjJMWibnX zxC7qSRGxe62EoQHKArDGT0d6ISDF3F6LlZp1XikVhZN6qpN3S90sbPbc66iLmFvou wZHJDGYDFNC0Q== From: Jakub Kicinski To: davem@davemloft.net Cc: netdev@vger.kernel.org, jhs@mojatatu.com, jiri@resnulli.us, xiyou.wangcong@gmail.com, edumazet@google.com, Jakub Kicinski Subject: [PATCH net 0/3] net: sched: update default qdisc visibility after Tx queue cnt changes Date: Thu, 9 Sep 2021 16:10:01 -0700 Message-Id: <20210909231004.196905-1-kuba@kernel.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Matthew noticed that number of children reported by mq does not match number of queues on reconfigured interfaces. # ethtool -L eth0 combined 8 # tc qdisc replace dev eth0 root handle 100: mq # tc qdisc show dev eth0 qdisc mq 100: root qdisc pfifo_fast 0: parent 100:8 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:7 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:6 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:5 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:4 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:3 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:2 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:1 bands 3 priomap 1 2 ... # ethtool -L eth0 combined 1 # tc qdisc show dev eth0 qdisc mq 100: root qdisc pfifo_fast 0: parent 100:8 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:7 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:6 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:5 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:4 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:3 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:2 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:1 bands 3 priomap 1 2 ... # ethtool -L eth0 combined 32 # tc qdisc show dev eth0 qdisc mq 100: root qdisc pfifo_fast 0: parent 100:8 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:7 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:6 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:5 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:4 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:3 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:2 bands 3 priomap 1 2 ... qdisc pfifo_fast 0: parent 100:1 bands 3 priomap 1 2 ... This patchset fixes this by hashing and unhasing the default child qdiscs as number of queues gets adjusted. This is long standing behavior so may as well go into net-next. Jakub Kicinski (3): net: sched: update default qdisc visibility after Tx queue cnt changes netdevsim: add ability to change channel count selftests: net: test ethtool -L vs mq drivers/net/netdevsim/ethtool.c | 28 +++++++ drivers/net/netdevsim/netdevsim.h | 1 + include/net/sch_generic.h | 4 + net/core/dev.c | 2 + net/sched/sch_generic.c | 9 +++ net/sched/sch_mq.c | 24 ++++++ net/sched/sch_mqprio.c | 23 ++++++ .../drivers/net/netdevsim/ethtool-common.sh | 2 +- .../drivers/net/netdevsim/tc-mq-visibility.sh | 77 +++++++++++++++++++ 9 files changed, 169 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/drivers/net/netdevsim/tc-mq-visibility.sh