From patchwork Thu Mar 28 16:05:09 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 13608917 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 B05718004E for ; Thu, 28 Mar 2024 16:05:36 +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=1711641940; cv=none; b=IxgjAF/vuyiZhE/5BueomsTkucKrt7Ll+QPpUgvGl5MiLv2c1aQp5Iprop63eBeXlnR4v6LvsCcq4c/va38qEYFbpeNejZNHDI5ApKUliTRrnDzRKe9Ks0zUIfduAfyjvXSMhEXyjf186s3v6XfA7GLI4Aw3eNcSPJk6VzKp+RM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711641940; c=relaxed/simple; bh=i166C4ugguMaBE/jhXf1xvZtL6qoC2/5pt0YAsHGzVw=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=TmUMWR7vthsW9L9GWuW4A7nWfNe+lmIEXw2QAJdG+QAmhZZsTjHYHlHEz12paxyB+/tAiO13EuI9IAtFOKd5ymisuCMhxzTE9JfHu1xrmBs5JtOghjwtgdjj6/eX8/zMWRudPn1nkMMgeox27GcO2Q3fyYHYPQXQYU7fHFWkzv0= 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 1rpsFm-00058g-N5; Thu, 28 Mar 2024 17:05:22 +0100 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 1rpsFj-0092JG-CM; Thu, 28 Mar 2024 17:05:19 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rpsFj-00A3Nb-10; Thu, 28 Mar 2024 17:05:19 +0100 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 v1 0/9] Enhanced DCB and DSCP Support for KSZ Switches Date: Thu, 28 Mar 2024 17:05:09 +0100 Message-Id: <20240328160518.2396238-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. 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 | 94 +++- drivers/net/dsa/microchip/ksz_common.h | 7 +- drivers/net/dsa/microchip/ksz_dcb.c | 712 ++++++++++++++++++++++++ drivers/net/dsa/microchip/ksz_dcb.h | 21 + include/net/dsa.h | 4 + include/net/dscp.h | 76 +++ include/net/ieee8021q.h | 34 ++ net/Kconfig | 4 + net/core/Makefile | 1 + net/core/ieee8021q_helpers.c | 165 ++++++ net/dsa/user.c | 28 + 17 files changed, 1198 insertions(+), 74 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