From patchwork Tue Apr 9 08:18:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 13621990 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 80C9B7E591 for ; Tue, 9 Apr 2024 08:19:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712650744; cv=none; b=IMy5GV7G2gmCpyqF3/MszCEvo/WmBlYZ/XJnrx8XNXwAnlOe2V9E6LasfRftR7aMsUKpWfFtZuhrN7Synt7XNDrrWeHxbtOnVlPiEjXy3L63DVVMSEs8h3fSxmmV8ugCUAWZJSX/pJTOnLHtbdh6lMvXP+tjWayOBvZwFqsfdoQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712650744; c=relaxed/simple; bh=+vKAnVxOOtaFR5Lbw6OBExvNJzg7jbglJsu/e1xdY1E=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=GAEJB/cpHjU2LkMl9E6DzgBkzxH/FSpco3ZmS2sI/IKa/p99CQSFYqxShgAZpJl58pGbscvz6xpdnsc28H1XHSomxzS9mkLt4OA14UtUmjlA3JnZLpsx+RtVgME7/w2k5kBCAV6wFul4WaAr7+n/DxfRelAxGlEnkP8aKe0iKjY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ru6gw-0006VG-Nk; Tue, 09 Apr 2024 10:18:54 +0200 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ru6gu-00BGpN-Kj; Tue, 09 Apr 2024 10:18:52 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1ru6gu-00EoUQ-1p; Tue, 09 Apr 2024 10:18:52 +0200 From: Oleksij Rempel To: "David S. Miller" , Andrew Lunn , Eric Dumazet , Florian Fainelli , Jakub Kicinski , Paolo Abeni , Vladimir Oltean , Woojung Huh , Arun Ramadoss Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com, David Ahern , Simon Horman , Willem de Bruijn , =?utf-8?q?S=C3=B8ren_Andersen?= Subject: [PATCH net-next v5 0/9] Enhanced DCB and DSCP Support for KSZ Switches Date: Tue, 9 Apr 2024 10:18:42 +0200 Message-Id: <20240409081851.3530641-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.39.2 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This patch series is aimed at improving support for DCB (Data Center Bridging) and DSCP (Differentiated Services Code Point) on KSZ switches. The main goal is to introduce global DSCP and PCP (Priority Code Point) mapping support, addressing the limitation of KSZ switches not having per-port DSCP priority mapping. This involves extending the DSA framework with new callbacks for managing trust settings for global DSCP and PCP maps. Additionally, we introduce IEEE 802.1q helpers for default configurations, benefiting other drivers too. Change logs are in separate patches. Oleksij Rempel (9): net: dsa: add support for DCB get/set apptrust configuration net: dsa: microchip: add IPV information support net: add IEEE 802.1q specific helpers net: dsa: microchip: add multi queue support for KSZ88X3 variants net: dsa: microchip: add support for different DCB app configurations net: dsa: microchip: dcb: add special handling for KSZ88X3 family net: dsa: microchip: enable ETS support for KSZ989X variants net: dsa: microchip: init predictable IPV to queue mapping for all non KSZ8xxx variants net: dsa: microchip: let DCB code do PCP and DSCP policy configuration drivers/net/dsa/microchip/Kconfig | 2 + drivers/net/dsa/microchip/Makefile | 2 +- drivers/net/dsa/microchip/ksz8.h | 1 + drivers/net/dsa/microchip/ksz8795.c | 106 ++-- drivers/net/dsa/microchip/ksz8795_reg.h | 9 +- drivers/net/dsa/microchip/ksz9477.c | 6 - drivers/net/dsa/microchip/ksz_common.c | 100 ++-- drivers/net/dsa/microchip/ksz_common.h | 11 +- drivers/net/dsa/microchip/ksz_dcb.c | 764 ++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_dcb.h | 21 + include/net/dsa.h | 4 + include/net/dscp.h | 76 +++ include/net/ieee8021q.h | 51 ++ net/Kconfig | 4 + net/core/Makefile | 1 + net/core/ieee8021q_helpers.c | 171 ++++++ net/dsa/user.c | 28 + 17 files changed, 1271 insertions(+), 86 deletions(-) create mode 100644 drivers/net/dsa/microchip/ksz_dcb.c create mode 100644 drivers/net/dsa/microchip/ksz_dcb.h create mode 100644 include/net/dscp.h create mode 100644 include/net/ieee8021q.h create mode 100644 net/core/ieee8021q_helpers.c