Message ID | 20240418-port-mirroring-v2-0-20642868b386@microchip.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 333FAC4345F for <linux-arm-kernel@archiver.kernel.org>; Thu, 18 Apr 2024 16:57:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:CC:To:MIME-Version:Message-ID:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=zZa+QWTVBJiZ8ilC23LYFt9y+wT2d/ASDHH7DBrh4ak=; b=nhsIdIv23iBX3w jM71szNFqS3ABKok4lZfmXS0CMOuNt9SAx7M8bA9A5Hi0KTo0wCgxQJtLKPgCN9c8xzbFeWTyHrs/ KrmNSjHCid9ywxPVgeOCjrfA0r0Pb/H/3vZUIwotp4mnP5jsm+AbO9pmHiWD67OIVjUR/ALaoN+m3 XDevB1tHHFPml551TGGZT3wwyPv+NKg1xABUegA2sioAE8veiuA1E47tBO6O55Y6MCiZDT0bvMKJt dM/nTeMLK2Khy+U2184ZE0szgXojvpB0wvTwUUaWfUvU/rg+BN/fofH3A/6bzm97MwjoMBjrdnH27 o0yD1y+62kmxu2cfFSeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxV4d-000000036Ut-0KWf; Thu, 18 Apr 2024 16:57:23 +0000 Received: from esa.microchip.iphmx.com ([68.232.154.123]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxV4Z-000000036Sg-1NNS for linux-arm-kernel@lists.infradead.org; Thu, 18 Apr 2024 16:57:20 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1713459439; x=1744995439; h=from:subject:date:message-id:mime-version: content-transfer-encoding:to:cc; bh=9eMjiokD/unT75ZDmsitpJbieeh9fuX4Z9ShVHTY3Hs=; b=dNkMDnUX8rxF4qE/R4AUfIInrcZsB6iT+RMbFEsFVryRh5A1EQCW/Rn5 lHO0apoAvxxcv3tuuAf2PyN+55zKSX6SqZmypsAtriRykHJwvvDnB8yQd kA24EITDCqv/xaGP87LHtg30cRZUjEnJld3BCaYuhc95oKXsOyiPiyg+W DtbF1x5/3Qf9l4lhArNA9vgWd8EtKBNx0ZWTu4jNB0VI9zpyfyI7PqC00 bJkPDb8tqkKMnIDRKiHwvUM9F4ecDL4JvpHIypcgBQwE1Kfvy7NR3Jk/j NSh9fsjxpfoQruzhi+lR2yGCwJVreItngMj1vwZ0xJh7eZgrI8oUvGC06 w==; X-CSE-ConnectionGUID: IpAKQTwwQLuvUOb4hfuiSQ== X-CSE-MsgGUID: s4iptT2aS+S3Z8646Ze55g== X-IronPort-AV: E=Sophos;i="6.07,212,1708412400"; d="scan'208";a="188927079" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 18 Apr 2024 09:57:18 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Thu, 18 Apr 2024 09:56:43 -0700 Received: from DEN-DL-M70577.microchip.com (10.10.85.11) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Thu, 18 Apr 2024 09:56:40 -0700 From: Daniel Machon <daniel.machon@microchip.com> Subject: [PATCH net-next v2 0/5] net: sparx5: add support for port mirroring Date: Thu, 18 Apr 2024 18:56:33 +0200 Message-ID: <20240418-port-mirroring-v2-0-20642868b386@microchip.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAMFQIWYC/12NQQqDMBBFryKzbsokGpSueo/iQqajzsJEJkEs4 t0b7K7Lx+O/f0BiFU7wqA5Q3iRJDAXcrQKahzCxkXdhcOgabNCZNWo2i6hGlTCZzra1t61lGgc oo1V5lP0KviBwNoH3DH0xs6Qc9XM9bfbyv6jt/qObNWgYPdUesSXvn4uQRpplvVNcoD/P8wtf5 RxuugAAAA== To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Lars Povlsen <lars.povlsen@microchip.com>, "Steen Hegelund" <Steen.Hegelund@microchip.com>, <UNGLinuxDriver@microchip.com>, Russell King <linux@armlinux.org.uk> CC: <netdev@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-kernel@vger.kernel.org>, Horatiu Vultur <horatiu.vultur@microchip.com>, "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>, =?utf-8?q?Uwe_Kleine-?= =?utf-8?q?K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Vladimir Oltean <vladimir.oltean@nxp.com>, Yue Haibing <yuehaibing@huawei.com>, Daniel Machon <daniel.machon@microchip.com> X-Mailer: b4 0.14-dev X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240418_095719_455617_0E6DF6F3 X-CRM114-Status: GOOD ( 13.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
net: sparx5: add support for port mirroring
|
expand
|
On Thu, 18 Apr 2024 18:56:33 +0200 Daniel Machon wrote: > Changes in v2: > - Fix clang build warning about uninitialized variable 'err' > - Link to v1: https://lore.kernel.org/r/20240418-port-mirroring-v1-0-e05c35007c55@microchip.com Please don't repost within 24h, per: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#tl-dr
This series adds support for port mirroring, and port mirroring stats, through tc matchall action FLOW_ACTION_MIRRED. The hardware has three independent mirroring probes. Each probe can be configured with a separate set of filtering conditions that must be fulfilled before traffic is mirrored. A mirror probe can have up to 64 source ports and a single monitor port. The direction of a mirror probe determines if rx or tx traffic is mirrored from the source port to the monitor port. To: David S. Miller <davem@davemloft.net> To: Eric Dumazet <edumazet@google.com> To: Jakub Kicinski <kuba@kernel.org> To: Paolo Abeni <pabeni@redhat.com> To: Lars Povlsen <lars.povlsen@microchip.com> To: Steen Hegelund <Steen.Hegelund@microchip.com> To: UNGLinuxDriver@microchip.com To: Russell King <linux@armlinux.org.uk> Cc: netdev@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org Cc: Horatiu Vultur <horatiu.vultur@microchip.com> Cc: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Vladimir Oltean <vladimir.oltean@nxp.com> Cc: Yue Haibing <yuehaibing@huawei.com> Signed-off-by: Daniel Machon <daniel.machon@microchip.com> --- Changes in v2: - Fix clang build warning about uninitialized variable 'err' - Link to v1: https://lore.kernel.org/r/20240418-port-mirroring-v1-0-e05c35007c55@microchip.com --- Daniel Machon (5): net: sparx5: add new register definitions net: sparx5: add bookkeeping code for matchall rules net: sparx5: add port mirroring implementation net: sparx5: add the tc glue to support port mirroring net: sparx5: add support for matchall mirror stats drivers/net/ethernet/microchip/sparx5/Makefile | 3 +- .../net/ethernet/microchip/sparx5/sparx5_main.c | 3 + .../net/ethernet/microchip/sparx5/sparx5_main.h | 25 +++ .../ethernet/microchip/sparx5/sparx5_main_regs.h | 68 ++++++ .../net/ethernet/microchip/sparx5/sparx5_mirror.c | 233 +++++++++++++++++++++ .../ethernet/microchip/sparx5/sparx5_tc_matchall.c | 125 ++++++++++- 6 files changed, 447 insertions(+), 10 deletions(-) --- base-commit: 1c25fe9a044d5334153a3585754b26553f8287b9 change-id: 20240402-port-mirroring-81735171ecfa Best regards,