From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A6851ECAAD8 for ; Tue, 20 Sep 2022 10:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=PLHK9sYyKn6F7kMBJVtnpYKYkahW2uFGTDPOJHKdSUA=; b=xzwt7zik5KFTr0 T50S6wpnbDoroA/tv0rnjrjY71UTVhkCtSSmldulTxsm1Vsdb8N0wwSDd0cRxItlIC+Fk9b4Thok8 MlBJvyqSlRNa8joZNVH3E17nnA+5iZXkDT5Sx6npyQGfiLMNAUlF/4Qds5ueDf0VuWNwr0Vg2JnvX UHJRIqUKKJqWx0Raun+OKlOiLK/IkP66B6JVroZswhKvK9bMUlTJgT4C0G1RpowA9IVNxxeXPHG1t Mo/6H4g0wck4BUYAPucTmrlQ/SpvUa8T/ufU1PDe3s8IPj+nnw/ZKHfXFh/1Qo4ZOthHIyBqABOf7 g2l6gHvOIITyjq9BPhAQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaa89-002k2U-0c; Tue, 20 Sep 2022 10:05:29 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaa85-002jyV-FO for linux-arm-kernel@lists.infradead.org; Tue, 20 Sep 2022 10:05:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1663668325; x=1695204325; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=TF9Z14Cf+4jHWEAHeCx4BawtaGnTswA4wIDLFjzWOCE=; b=v+1MgraeogQbNfiNCVR3IxGGuLQaC4EV+8mpqiBf7TFse38iAVb+I57V sg2S9IEK+LZ0D/RbUinki+HnlBrQX9/Mjtufn7ooeTaPVbIohoQmZTKnT 0GKoa6bD82KtOG2339+lJGwORf3pt2Kb4Ey9I9nZ1+taLdMEN7yPuaKei j+wrflulRU9ac8atezGSTkOLg1bcFGxrTKP2LPwKMvpcU2iLbNM9OgKUf zjElBAvka2y4VCg7xZ/zgNaH1zRgCjkjPTTZzlVrmRzBHBbLn9D5b44rH zbtELeuXQVngI/98CavBbKWS32CShR8KF7eQ+xegG7t+FitqYexPClM/P g==; X-IronPort-AV: E=Sophos;i="5.93,330,1654585200"; d="scan'208";a="181220968" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 20 Sep 2022 03:05:22 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 20 Sep 2022 03:05:21 -0700 Received: from DEN-LT-70577.microchip.com (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Tue, 20 Sep 2022 03:05:19 -0700 From: Daniel Machon To: CC: , , , , , , , , , , , Subject: [PATCH net-next v2 0/5] Add QoS offload support for sparx5 Date: Tue, 20 Sep 2022 12:14:27 +0200 Message-ID: <20220920101432.139323-1-daniel.machon@microchip.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220920_030525_616262_50D55218 X-CRM114-Status: GOOD ( 14.01 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This patch series adds support for offloading QoS features with the tc command suite, to the sparx5 switch. The new offloadable QoS features introduced in this patch series are: - tc-mqprio for mapping traffic class to hardware queue. Queues are by default mapped 1:1 in hardware, as such the mqprio qdisc is used as an attachment point for qdiscs tbf and ets. $ tc qdisc add dev eth0 root handle 1:0 mqprio - tc-tbf for setting up shaping on scheduler elements of the HSCH (Hierarchical Scheduler) block. Shaping on either port output or queue output is supported. Port shaper: $ tc qdisc add dev eth0 root handle 1:0 tbf rate \ 10000000 burst 8192 limit 1m Queue shaper: $ tc qdisc replace dev eth0 parent 1:5 handle 2:0 tbf \ rate 10000000 burst 8192 limit 1m - tc-ets for setting up strict and or bandwidth-sharing bands on one through eight priority queues. Configure a mix of strict and bw-sharing bands: $ tc qdisc add dev eth0 handle 1: root ets bands 8 strict 5 \ quanta 1000 1000 1000 priomap 7 6 5 4 3 2 1 0 Patch #1 Sets up the tc hook. Patch #2 Adds support for offloading the tc-mqprio qdisc. Patch #3 Adds support for offloading the tc-tbf qdisc. Patch #4 Adds support for offloading the tc-ets qdisc. Patch #5 Updates the maintainers of the sparx5 driver. ======================================================================== v1: https://lore.kernel.org/netdev/20220919120215.3815696-1-daniel.machon@microchip.com/ v1 -> v2: - Fix compiler warning in patch #2 - Fix comment style in patch #4 Daniel Machon (5): net: microchip: sparx5: add tc setup hook net: microchip: sparx5: add support for offloading mqprio qdisc net: microchip: sparx5: add support for offloading tbf qdisc net: microchip: sparx5: add support for offloading ets qdisc maintainers: update MAINTAINERS file. MAINTAINERS | 1 + .../net/ethernet/microchip/sparx5/Makefile | 2 +- .../ethernet/microchip/sparx5/sparx5_main.c | 7 + .../microchip/sparx5/sparx5_main_regs.h | 165 ++++++ .../ethernet/microchip/sparx5/sparx5_netdev.c | 8 +- .../ethernet/microchip/sparx5/sparx5_qos.c | 514 ++++++++++++++++++ .../ethernet/microchip/sparx5/sparx5_qos.h | 82 +++ .../net/ethernet/microchip/sparx5/sparx5_tc.c | 125 +++++ .../net/ethernet/microchip/sparx5/sparx5_tc.h | 15 + 9 files changed, 917 insertions(+), 2 deletions(-) create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_qos.c create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_qos.h create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_tc.c create mode 100644 drivers/net/ethernet/microchip/sparx5/sparx5_tc.h -- 2.34.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel