From patchwork Sun Jan 17 08:02:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ido Schimmel X-Patchwork-Id: 12025281 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=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,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 61922C433E0 for ; Sun, 17 Jan 2021 09:11:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 235362158C for ; Sun, 17 Jan 2021 09:11:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728082AbhAQJLb (ORCPT ); Sun, 17 Jan 2021 04:11:31 -0500 Received: from wout1-smtp.messagingengine.com ([64.147.123.24]:52761 "EHLO wout1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726298AbhAQIEA (ORCPT ); Sun, 17 Jan 2021 03:04:00 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 64B45F92; Sun, 17 Jan 2021 03:02:50 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 17 Jan 2021 03:02:50 -0500 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=uFKIjpmRG+5KV7nkW CyVaUerYQ5AP8aXf5Izor5NEbk=; b=H/FsINAHBVpOJaA/k55P6JhEB8wZktme2 Cv8dAC+in4T4bcYdfcWhYotJaNhwBjk/U0uJLAOnHXYrDvCqkTCFGMj4JkPHhEGY n+TixGnvLI7DYaaxgh8Ap6Dibjxq39MqQhk0RvExbRH18mFLB+nQPzFtCfWVTkCi 7sq+okCGOHF+hdkm4bjMjKF9gvKqzclC+KFl9JfzKVJ5n73YRs47qBddm9yRnjun SJbeB/2vIbAdIx7+wlN2JFZWQeVmKXZUU6kreh10BI69znO1b88GX2I5dio8LWrv FtWjZlidvCMipKm6mvNC7MDzZK2OZHdgUZcuYkgDcWRi3XC4QCd5A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrtdehgdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomhepkfguohcuufgthhhimhhmvghluceoihguohhstghhsehiughoshgt hhdrohhrgheqnecuggftrfgrthhtvghrnhepteevgefhvefggfffkeeuffeuvdfhueehhe etffeikeegheevfedvgeelvdffudfhnecukfhppeekgedrvddvledrudehfedrgeegnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepihguohhstg hhsehiughoshgthhdrohhrgh X-ME-Proxy: Received: from shredder.mellanox.com (igld-84-229-153-44.inter.net.il [84.229.153.44]) by mail.messagingengine.com (Postfix) with ESMTPA id B5F8C24005B; Sun, 17 Jan 2021 03:02:47 -0500 (EST) From: Ido Schimmel To: netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, petrm@nvidia.com, jiri@nvidia.com, amcohen@nvidia.com, mlxsw@nvidia.com, Ido Schimmel Subject: [PATCH net-next 0/5] mlxsw: Add support for RED qevent "mark" Date: Sun, 17 Jan 2021 10:02:18 +0200 Message-Id: <20210117080223.2107288-1-idosch@idosch.org> X-Mailer: git-send-email 2.29.2 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 currently supports two qevents: "early_drop" and "mark". The filters added to the block bound to the "early_drop" qevent are executed on packets for which the RED algorithm decides that they should be early-dropped. The "mark" filters are similarly executed on ECT packets that are marked as ECN-CE (Congestion Encountered). A previous patchset has offloaded "early_drop" filters on Spectrum-2 and later, provided that the classifier used is "matchall", that the action used is either "trap" or "mirred", and a handful or further limitations. This patchset similarly offloads "mark" filters. Patch set overview: Patches #1 and #2 add the trap, under which packets will be reported to the CPU, if the qevent filter uses the action "trap". Patch #3 then recognizes FLOW_BLOCK_BINDER_TYPE_RED_MARK as a binder type, and offloads the attached filters similarly to _EARLY_DROP. Patch #4 cleans up some unused variables in a selftest, and patch #5 adds a new selftest for the RED "mark" qevent offload. Petr Machata (5): devlink: Add ecn_mark trap mlxsw: spectrum_trap: Add ecn_mark trap mlxsw: spectrum_qdisc: Offload RED qevent mark selftests: mlxsw: sch_red_core: Drop two unused variables selftests: mlxsw: RED: Add selftests for the mark qevent .../networking/devlink/devlink-trap.rst | 4 + .../net/ethernet/mellanox/mlxsw/spectrum.c | 2 + .../net/ethernet/mellanox/mlxsw/spectrum.h | 2 + .../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 14 +++- .../ethernet/mellanox/mlxsw/spectrum_span.c | 16 ++++ .../ethernet/mellanox/mlxsw/spectrum_span.h | 1 + .../ethernet/mellanox/mlxsw/spectrum_trap.c | 9 ++ include/net/devlink.h | 3 + net/core/devlink.c | 1 + .../drivers/net/mlxsw/sch_red_core.sh | 84 ++++++++++++++++++- .../drivers/net/mlxsw/sch_red_ets.sh | 74 ++++++++++++++-- 11 files changed, 200 insertions(+), 10 deletions(-)