Message ID | 20230310090809.220764-1-o.rempel@pengutronix.de |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp770167wrd; Fri, 10 Mar 2023 01:27:21 -0800 (PST) X-Google-Smtp-Source: AK7set94Pnnk6rRrh6QJD6EIZ979lm27S6X9XDl9EGYzi1/FoeQIxCwMHtigUNldVf5SdRx80asA X-Received: by 2002:a05:6a20:656:b0:cb:a22e:d33b with SMTP id 22-20020a056a20065600b000cba22ed33bmr19154776pzm.42.1678440441135; Fri, 10 Mar 2023 01:27:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678440441; cv=none; d=google.com; s=arc-20160816; b=p/AwHhRPdW/hMuEvKNSoBTNxM6B4WVqnVMugP7zocjeXMZFLZVyESfbv15qyHnV2Gh 5DnBdraIMY2tuDKYakWASFA2icqz0c/YFHvhWDZn7YVBmfxfjBEHulOvWBJOdWL1v0zi Rllvdm2n1ggEd03cE2legFpBdv7ZK0qc7uSzxmBpCsLE9Sv6jGjJB51AS0xdBeFHx5ec aaiitcqFMsG8OG2HCw6IQDuAnVjnot+JaI56ZXkanMQiuiRHSo75geLapluQATHSpqyE RaLmV76DYNkD3j7ZThC9/iMnbFcrrvpJiJtdz+aH2znieRlQCj34i+MJGRwiIIBYMKIA bE+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=i+RA1AbLFs3xQ47mSBKa9Cd+EPrfLXYoi1J57NxsMwY=; b=nesK1QXiOSd/ZeqBN+zE6b74OgEX6fPeIik7XLbLRB1P+XWMSQXZMkMW+aVGLRaoDM gqL3DB1ZggycZ8csrjsnRM9yGfFFdB7RNuWYsBO+mCq6wBo+HmYUfEnkXFrnfcAG5yH+ IAPUYjePfL6dhZ/RuZy8U3u1/KHJQ0etWR2XiPtqtw3wGfdYAcXGhtZPfJjdUe5OADgv tcEOAYhsWrbIKtJrPbaHRC+GzZaVNjF4kkr34nmq2GF2oWQva0G2US2dm8gdsNGDljZH 3PJYfsnup7rkTIX42VBMMJmqrMdKeSuTWFiePTly1kIrDRxMMgGVBFXg49t4ozcrweED pv+Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 197-20020a6300ce000000b00502e3fd615esi1492654pga.365.2023.03.10.01.27.09; Fri, 10 Mar 2023 01:27:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231495AbjCJJNa (ORCPT <rfc822;carlos.wei.hk@gmail.com> + 99 others); Fri, 10 Mar 2023 04:13:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230301AbjCJJNH (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Mar 2023 04:13:07 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC6B9E673 for <linux-kernel@vger.kernel.org>; Fri, 10 Mar 2023 01:08:22 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <ore@pengutronix.de>) id 1paYjV-0000YF-Hy; Fri, 10 Mar 2023 10:08:13 +0100 Received: from [2a0a:edc0:0:1101:1d::ac] (helo=dude04.red.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1paYjT-0038wo-I3; Fri, 10 Mar 2023 10:08:11 +0100 Received: from ore by dude04.red.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from <ore@pengutronix.de>) id 1paYjS-000vRd-Pj; Fri, 10 Mar 2023 10:08:10 +0100 From: Oleksij Rempel <o.rempel@pengutronix.de> To: "David S. Miller" <davem@davemloft.net>, Andrew Lunn <andrew@lunn.ch>, Eric Dumazet <edumazet@google.com>, Florian Fainelli <f.fainelli@gmail.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Vladimir Oltean <olteanv@gmail.com>, Woojung Huh <woojung.huh@microchip.com> Cc: Oleksij Rempel <o.rempel@pengutronix.de>, kernel@pengutronix.de, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, UNGLinuxDriver@microchip.com Subject: [PATCH net-next v2 0/2] net: dsa: microchip: tc-ets support Date: Fri, 10 Mar 2023 10:08:07 +0100 Message-Id: <20230310090809.220764-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.30.2 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.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759972363777287586?= X-GMAIL-MSGID: =?utf-8?q?1759972363777287586?= |
Series |
net: dsa: microchip: tc-ets support
|
|
Message
Oleksij Rempel
March 10, 2023, 9:08 a.m. UTC
changes v3: - add tc_ets_supported to match supported devices - dynamically regenerated default TC to queue map. - add Acked-by to the first patch changes v2: - run egress limit configuration on all queue separately. Otherwise configuration may not apply correctly. Oleksij Rempel (2): net: dsa: microchip: add ksz_setup_tc_mode() function net: dsa: microchip: add ETS Qdisc support for KSZ9477 series drivers/net/dsa/microchip/ksz_common.c | 238 ++++++++++++++++++++++++- drivers/net/dsa/microchip/ksz_common.h | 18 +- 2 files changed, 244 insertions(+), 12 deletions(-)
Comments
Hi Oleksij, On Fri, 2023-03-10 at 10:08 +0100, Oleksij Rempel wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you > know the content is safe Cover letter patch version is still v2. [PATCH net-next v2] > > changes v3: > - add tc_ets_supported to match supported devices > - dynamically regenerated default TC to queue map. > - add Acked-by to the first patch > > changes v2: > - run egress limit configuration on all queue separately. Otherwise > configuration may not apply correctly. > > Oleksij Rempel (2): > net: dsa: microchip: add ksz_setup_tc_mode() function > net: dsa: microchip: add ETS Qdisc support for KSZ9477 series > > drivers/net/dsa/microchip/ksz_common.c | 238 > ++++++++++++++++++++++++- > drivers/net/dsa/microchip/ksz_common.h | 18 +- > 2 files changed, 244 insertions(+), 12 deletions(-) > > -- > 2.30.2 >
On Fri, 10 Mar 2023 10:08:07 +0100 Oleksij Rempel wrote: > changes v3: > - add tc_ets_supported to match supported devices > - dynamically regenerated default TC to queue map. > - add Acked-by to the first patch > > changes v2: > - run egress limit configuration on all queue separately. Otherwise > configuration may not apply correctly. I thought Vladimir was suggesting mqprio, could you summarize the take aways from that discussion?
On Mon, Mar 13, 2023 at 12:18:33PM -0700, Jakub Kicinski wrote: > On Fri, 10 Mar 2023 10:08:07 +0100 Oleksij Rempel wrote: > > changes v3: > > - add tc_ets_supported to match supported devices > > - dynamically regenerated default TC to queue map. > > - add Acked-by to the first patch > > > > changes v2: > > - run egress limit configuration on all queue separately. Otherwise > > configuration may not apply correctly. > > I thought Vladimir was suggesting mqprio, could you summarize the take > aways from that discussion? Both Qdiscs are suitable for my use case, but I prefer tc-ets because it aligns better with the abilities of the KSZ9477 family of switches. However, I won't be able to support only the deficit round-robin functionality of tc-ets with this hardware. On the other hand, tc-mqprio has more features that are not supported by this switch, such as TXQ grouping, bandwidth limit, and DCB support. The advanced mapping functionality of tc-mqprio, which involves mapping SO_PRIORITY to TCs and then to TXQ groups, can also be confusing. For my use case, only TC to TXQ mapping is needed. Futures of tc-mqprio: - all TXQ groups use a strict priority transmission selection algorithm (TSA). Within one TXQ group probably round robin robin TSA is used. - Number of supported traffic classes (TCs) is equal to the number of TXQ groups. - TCs have predefined priorities. TC0 == minimal prio and transmitted last if TCn> TC0 exists. - flexible mapping of all SO_PRIORITYs to TCs - flexible mapping of TCs to TXQ groups. - configurable bandwidth limit per TXQ group. Futures of tc-ets: - supports strict priority and deficit round robin (DRR) TSA. Both variants can be combined. - quantum of each DRR band can be flexibly configured. - each band has predefined priority and mapped directly to a TXQ. - Supports max 16 TCs. Each TC can be flexibly mapped to a band==TXQ. Futures of KSZ9477 family: - Supports up to 4 TXQs. LANxxxx variants support up to 8 TXQs - Each TXQ can be configured to strict priority or to weighted round robin (WRR) TSA. - If bandwidth configuration per TXQ is used TSA falls back to simple round robin. - TXQs can’t be grouped without breaking strict priority TSA - Max 8 TCs are supported and can be flexibly mapped to TXQs Regards, Oleksij
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller <davem@davemloft.net>: On Fri, 10 Mar 2023 10:08:07 +0100 you wrote: > changes v3: > - add tc_ets_supported to match supported devices > - dynamically regenerated default TC to queue map. > - add Acked-by to the first patch > > changes v2: > - run egress limit configuration on all queue separately. Otherwise > configuration may not apply correctly. > > [...] Here is the summary with links: - [net-next,v3,1/2] net: dsa: microchip: add ksz_setup_tc_mode() function https://git.kernel.org/netdev/net-next/c/69444581d002 - [net-next,v3,2/2] net: dsa: microchip: add ETS Qdisc support for KSZ9477 series https://git.kernel.org/netdev/net-next/c/c570f861fa05 You are awesome, thank you!