Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1832824lqe; Tue, 9 Apr 2024 01:24:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXQ4GHeUODBPyl+n0nd3VqbCxQ2kBwoWrAeTrQxz08klDZ1vPXQDU6Hevi9Rvs+aSdpPgA4mdMb1BcnuzPrXyRJhdig7o0a2pC6SyQA7w== X-Google-Smtp-Source: AGHT+IHS1H2mrLnKj/z0vKaIcd/eNI13ZsRjapfi19xU5nxTp+8hzswDNYZaiULeVBUP6Qw2OKzd X-Received: by 2002:a05:6a00:22d5:b0:6e6:b4e0:c3db with SMTP id f21-20020a056a0022d500b006e6b4e0c3dbmr11977614pfj.24.1712651044843; Tue, 09 Apr 2024 01:24:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712651044; cv=pass; d=google.com; s=arc-20160816; b=bz5ElEBpV7IM1fnLBCfFplsvI2vusl4ZvATebz0Sue4Lm7yzFDTzXXCFyTDjoeHKyP BiQwM6mns9O95AHNezqz4BfD/MU3MjUMZ/y9i51ieDQEDX6nvuFRnwk4zGFdoKTGpOyZ epfcparj07O+rhOPTnulLVE2BbNkOJ/XcUGcSmGFZZpNqJ+Nbr9oh3VoZGT0GYAysEMb CCttwOKCxxImw7DcERd2z87G3wQq2YnBR+1X22jYSBq6FnBbk2wzSf5GwlWpoWI3u+T+ s4nd6kW83zvH+n/ZvhvB2Cfvx5BkxmAezXiga9OxAOxeO6GKd1ASnxa5Zu94+8F+MTGk pmeg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=v07osRm9DJq5i8MyB0jp73nvTAzVkEebcQon4G6ZI4U=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=NbYy2ERCEm9BwbESXwIVYn6qwJvH2VtEAa6wMSKxRfH1lvYLx0twGdVpsZABzhISqh AjBSXbWYng2XOHbhuFj4Y32WAykj7xYQ4jERm9mGlo2WNIqdHHCKTJ6dzKXHz5fXOMFH lob0qJRQtef/KCLaxH6zgLlJT2X5YtXncK5JyEGwEyTCLkjuShpeTiei1Sr2i3xtyCug XGN8fixH/cA7/iZeNsFQQtyKoonBOcwMKSm6ilOxlp/qkvX7KOVYc3Cw1ZBVEDzMpxrE LGIYlEP9qxXljxk6bZqNkASxjILGBq02j1upLFfwz7V6BprqoVzBBtcEOCyIgyhJZiHt C7Ig==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-136434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136434-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k12-20020a63d10c000000b005d4a1e64c7asi8366702pgg.332.2024.04.09.01.24.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 01:24:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-136434-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136434-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id ED57EB20CC2 for ; Tue, 9 Apr 2024 08:19:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 929E47EF0A; Tue, 9 Apr 2024 08:19:02 +0000 (UTC) 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 951D17E0F6 for ; Tue, 9 Apr 2024 08:18:59 +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=1712650741; cv=none; b=cLQjAvEcYJzDW1Dy57I7M0kxg1X5XBvRfYzpiuPkuNhKup7QVsJM6TxcSbNtkqoq2SRK7y397oYsBb+a6EFXxshINA77LTOexmcKokEIyihWSNFYNq7sXrXjRBNChfdlL+mRc883/0udhg5dM/ojvQMUHt3KkrsWt08OVHWy0n0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712650741; c=relaxed/simple; bh=+vKAnVxOOtaFR5Lbw6OBExvNJzg7jbglJsu/e1xdY1E=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=LN9PAMk/ItvBGHHhhd4i/fLadNBnZzLpfKZACrFZ1AIqeU8Wct4agYCX3MjKXOU/1+UHxiOV9abEzxCx+YA0OWsiGWWlO0ZcCm1rPitPGhX4se9xz2fizjdJ3boRFhazrDsuQyo6PAIE9sEhyHu16a4ebJ6mreueNKK981iPw6A= 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=20Andersen?= 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: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: linux-kernel@vger.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 -- 2.39.2