Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp265421lqe; Wed, 10 Apr 2024 01:06:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUlX/oh0Uv2vK3sCehzVP3CQszVv0BzFBimPEkSS/6kjCcF4mvY4q447eyzA0nuvh61GjNJqshKng1NTaUWohLDT9Dgh8cvYG8JdslZsQ== X-Google-Smtp-Source: AGHT+IGT3p+rSZRyjkeddD6Ao+rEPRP5xvkMUXSIPcn/IaIBczOGx4n9Rs2Stjm0zd0iJB77vq6O X-Received: by 2002:a17:906:4ac9:b0:a51:7ee5:514f with SMTP id u9-20020a1709064ac900b00a517ee5514fmr1041911ejt.3.1712736380330; Wed, 10 Apr 2024 01:06:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712736380; cv=pass; d=google.com; s=arc-20160816; b=NAMVTxnl58gi7fjK2JkNwlW4cySpm5+BQSZ7ZyQG4HmkB24FmWGeh7re48OqL2l3Uf 5MO/S8BLhfX/QmMJ7bDUSmOq81FyH3dwCA/L+E14rSIZTuqJ7TUNee0IJ59ZcrxkTHOg aBACh9TQ9vprKM+pGg8dlqyg/x5JFjNZLFZdjBAIWhCxNHSGzQlF6M11JyNhTofXtQBz iGfl0Pqgpmqy/ZS/Nwv5ipAKb19b6mo+iwxFsEmSloA0WSLbtB5TndVT0ax8TN6/jVRa qbjYTC6tiy8IrqOGLlg6NbnGU/zhRROUpoqGIZjF5tIkOAv0wGhyUuUAOYB9WgHe6ora PFfQ== 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=FbBZGj1dXmSFbBHpZAQuK6dnIETbtlp9gLdq/Kp9ou8=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=RCDvoCt2loJEJQxTyV3u1yxi0XSF4ZBBQNCZp1yVcsFDw6F9ENaXqyr5U4BYfeQzvU WN92IS35lBGry+6h9vltClBlNixO72AS1yUpvrK7Edxgvh3ZCT0Pahy9+CyKmS2tHTCV ZpBXiJA0cbgCeNvCO9OCiacGoVPP39ZdCGcIuwEPirGh9P4TcyxTDrnL8as2Crqp9vX2 Z7OeUZs0GljXf9OvuUuipUlOLldG33TrnHffvTuWbVPp2qByEvT1/cEu1scVrTSDGCyT aRfU3UK3ClqSX59Fsh7rg1QV+VNkUXd0Qs+6tzMeEpQLyXzx7Ar9tpkOkOKpWD/R/M5R k0eQ==; 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-138133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138133-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id js17-20020a17090797d100b00a51bcc27a7csi4590135ejc.55.2024.04.10.01.06.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 01:06:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-138133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-138133-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-138133-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 06AD41F234DF for ; Wed, 10 Apr 2024 08:06:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6F6AF13D614; Wed, 10 Apr 2024 08:06:08 +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 7E65013D2B1 for ; Wed, 10 Apr 2024 08:06:05 +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=1712736367; cv=none; b=gz3b2/FQaCqyqQ+khZ7BWOfKCVTSGQmgUOx+OMI81c74ObCQAo5XHTpRPzk68I8ZxooQHNSljTKARa/NYJTT+lERdZ4N2KgnxLNqotyJU6fXpRWc6z0SBulXh6q8dKNPMm8Rj3XhN27jjuAd2XR3valCPeO9cZXgnQp46+HJtdo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712736367; c=relaxed/simple; bh=W7fnSk3fbYYgmx0QN0RX3r5eACexf4oPRUSnMF8edrA=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=oTPTgbzEt+FvMb5bk62c1ChKGtVTednb4BBMsNrbfFxboa5N4J4NYLpLtFZVj5UBoXHMzFDfDSm4IeIuuqDdYykCgKH34ECk1QH2hyYk/LDa7c9vRgd57w4F87ckhAYRO3qau+Nfq0GkP30MGtMm861z5EATjDnmPIQIlvwXRIg= 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 1ruSy0-0004NM-Bh; Wed, 10 Apr 2024 10:06:00 +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 1ruSxx-00BSau-QP; Wed, 10 Apr 2024 10:05:57 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1ruSxx-005Cta-2P; Wed, 10 Apr 2024 10:05:57 +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 v6 0/9] Enhanced DCB and DSCP Support for KSZ Switches Date: Wed, 10 Apr 2024 10:05:47 +0200 Message-Id: <20240410080556.1241048-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 | 55 ++ net/Kconfig | 3 + net/core/Makefile | 1 + net/core/ieee8021q_helpers.c | 208 +++++++ net/dsa/user.c | 28 + 17 files changed, 1311 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