Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1185605lqe; Mon, 8 Apr 2024 00:51:16 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVEHgzbB/h+cHsieOdVbOxg7kNHV7XvcR8SAS6Ntih50QflrJrNnHE49SiZyeTRvQdSwgwvdlJqkbwhp6ZJkUnJjDmHjUebgRHO6hNdBg== X-Google-Smtp-Source: AGHT+IFwRcZDBb1CUp9Rb8ZTD70noaemenPAODa58/nfXi02y8IyYuuL4RKsk8aJH5QgMHC02f0h X-Received: by 2002:a50:d61c:0:b0:56e:33fe:5e88 with SMTP id x28-20020a50d61c000000b0056e33fe5e88mr5189536edi.34.1712562676330; Mon, 08 Apr 2024 00:51:16 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712562676; cv=pass; d=google.com; s=arc-20160816; b=WCEzwhUL4PPE07McoieCNK1EPXUQanCahoJFJEWXJa2Y2uccvq1epYgqXvJra5Xs9y dqQflRlUo5S8e0ciIT/4E4zAFLsgLpC4yAqh0qvyjLSCfC391ktHaSCi8LgCPr6oXAEG 1GWZphZYIYoy9tRdgw7axZficoGiLDZLUP9zCrKRqvetSO5hwJkc5fLm1oECCOimd+3r r2kjDXh7+flVUkd6zn+JVjt79x9Ez9leudcW7bvXYJo3gqB0TMGBD5jIEZ6FtPWuGyEk vh01qbWHQvGF0B0HBPQckT+1G68eq29SHqK82wipcKC7LzAX0+4M3PWN0eLC+Lpth8PQ /qvg== 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=xSpCAliuw6IIW1OaiAAb7IrykbQLbmbM3yCE7wYMDVE=; fh=tqC39tIlS6D/RAQt4n0YdpNSF39XxlRBPCEXedsdbGs=; b=LXrpjweq8NaI7mTe8YYqL5uJy3I6UGOYOSmXs08cdjYC28bRSbUyGO5EittBxf8273 bRq8LQtkKXg3Su7dmQXaMgIFOk+BB2NMf5qU+AiCBaeP/4wz4VU//qNhC94RozAyLG0t r6Xk3pv3xgLXDdgkhPM3tcQ3gwVgREdS9OwKpBTAEVi60SNZgIId9ApTWGPvSr2but2i K2uBZ+b0/nOAE2sOClOm6qT1ZembwidMSYThEP7xr4CDH3OdgvvvJLb1wQgx1es8ksn4 X4KYZ58+nvr7qW8U+UVdp1CJNnPA4bkdsAubCTbkHdCsOZXC72LXAnvNADcmWAfwCVIa gdbQ==; 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-134946-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134946-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 r4-20020a50d684000000b0056e2060a0a5si3405621edi.406.2024.04.08.00.51.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 00:51:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-134946-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-134946-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-134946-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 E17741F21141 for ; Mon, 8 Apr 2024 07:51:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E1F544C93; Mon, 8 Apr 2024 07:48:13 +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 9E9612C69C for ; Mon, 8 Apr 2024 07:48:09 +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=1712562491; cv=none; b=CGukvQ1UIdYWry8I67hjnSA8MvwOmSrRXAEXy+rzZiWoMPoZZvHe/RSfM354mm9z5F6Yyd87IEI5e1DcVTadoV7MoG/sIxVb7gXqLNWWQHvqCSzWO/3GhA9EyEoJOSHT31ITK/QgUcOLfTIi61jFBgg3PEEKFEODvoleO8rcLGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712562491; c=relaxed/simple; bh=375ZQU7H5Hl/5eWt24TNsxPSHukiT82neLAMvXsnZcY=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=QJukbDrzyhw76Pv+7G3SF+AOuM8UgAE3bQUFYIgIaNHhLdGHdouL2MsjkNcAWnxiKV/CrK+4gfjiEZRTsnyN9+zrwdamVlhji0S1KaZegcsOUj5kkUfEoSEEVUDXmC7o7yMNco3CD+UFgewe+o+GMb3XQwS0xlsxOUXXJZGzMUI= 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 1rtjjY-0005Ia-4e; Mon, 08 Apr 2024 09:48:04 +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 1rtjjU-00B4Jn-UE; Mon, 08 Apr 2024 09:48:00 +0200 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rtjjU-007ewx-2n; Mon, 08 Apr 2024 09:48:00 +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 v4 0/9] Enhanced DCB and DSCP Support for KSZ Switches Date: Mon, 8 Apr 2024 09:47:49 +0200 Message-Id: <20240408074758.1825674-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 | 105 ++-- 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 | 8 +- drivers/net/dsa/microchip/ksz_dcb.c | 727 ++++++++++++++++++++++++ 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, 1230 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