From patchwork Wed Oct 13 10:37:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 12555443 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03F9DC433F5 for ; Wed, 13 Oct 2021 10:38:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D72046109E for ; Wed, 13 Oct 2021 10:38:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229526AbhJMKkW (ORCPT ); Wed, 13 Oct 2021 06:40:22 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:60969 "EHLO out2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229524AbhJMKkV (ORCPT ); Wed, 13 Oct 2021 06:40:21 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 3C05C5C018D; Wed, 13 Oct 2021 06:38:18 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Wed, 13 Oct 2021 06:38:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=uboDZAdUflxodDKfv 1im+GJQXdE6mF2I0591siJEA7Q=; b=lnJP9RnA5jS4hmmEK6f6WRsYR4hW+D8C0 G5UmY26TKsTw2DEEV9W5CbyHNki5nwRt360wezUeB6qBztIIuyyHwMJ5uvDMMQqd Dijwpd4V41l3TGX/K8zzBeA5qf7fhm9kC7Xspq5yiQDyUAZmEvN/Um/QIoVnUAdd bxUhgrLh/EZbMnd2kFR+6q6jn9LZw6EzEzqkE+sAxzqS9vNgxyn45oaQmUlJIHAC wHMn1DWYRCS7P2B/6y97DbtvbDFk3q4MgcgcLL057cOXmNGBl+L6c5PHIYFcSi0t GvVKYmcrreyS2Qe4P3RX8GZ0hJMHsvlgpwfLraZKEhmsWNcHhJaXw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvddutddgvdekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecuggftrfgrthhtvghrnhepteevgefhvefggfffkeeuffeuvdfhueehhe etffeikeegheevfedvgeelvdffudfhnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepihguohhstghhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 13 Oct 2021 06:38:15 -0400 (EDT) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, jiri@nvidia.com, petrm@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [PATCH net-next 0/5] mlxsw: Show per-band ECN-marked counter on qdisc Date: Wed, 13 Oct 2021 13:37:43 +0300 Message-Id: <20211013103748.492531-1-idosch@idosch.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Ido Schimmel Petr says: The RED qdisc can expose number of packets that it has marked through the prob_marked counter (shown in iproute2 as "marked"). This counter currently just shows number of packets marked in the SW datapath, which in a switch deployment likely means zero. Spectrum-3 does support per-TC counters, and in this patchset, mlxsw supports this RED statistic properly. Patches #1 and #2 fix typos. Patch #3 adds a field ecn_marked_tc to the PPCNT register. Patch #4 adds the support to publish the value of ecn_marked_tc through the prob_marked RED qdisc counter. Patch #5 adds selftests. Petr Machata (5): mlxsw: reg: Fix a typo in a group heading mlxsw: reg: Rename MLXSW_REG_PPCNT_TC_CONG_TC to _CNT mlxsw: reg: Add ecn_marked_tc to Per-TC Congestion Counters mlxsw: spectrum_qdisc: Introduce per-TC ECN counters selftests: mlxsw: RED: Test per-TC ECN counters drivers/net/ethernet/mellanox/mlxsw/reg.h | 10 +++- .../net/ethernet/mellanox/mlxsw/spectrum.c | 12 +++-- .../net/ethernet/mellanox/mlxsw/spectrum.h | 1 + .../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 9 +++- .../drivers/net/mlxsw/sch_red_core.sh | 51 +++++++++++++++---- .../drivers/net/mlxsw/sch_red_ets.sh | 11 ++++ .../drivers/net/mlxsw/sch_red_root.sh | 8 +++ 7 files changed, 84 insertions(+), 18 deletions(-)