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 91E74C6FD19 for ; Thu, 16 Mar 2023 08:08:56 +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:In-Reply-To:From:References:Cc:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6sW+IYp3hW5Zr2ul2j6kJx8GeErlugezZmyJeW3cZPE=; b=J9+FSOCkhaDJE/ 1BmZ+Q72A8wabwrFOty8fx5d3oj+4x2Eus/ecmhS6jg2kl2nGiow0Swn6KrgLa5T07pdehorFF8Ak 0zJhZy1AhE87O/e2hru1KHD8BuA+pklGstHcQUp9kEPPgo27DL6IHm8GxboSpS5G6vdwvRWnztGym bO3lbFPNDOQQThvS2eVROYKoT0TkKPnGZcPdq2z90MkZpDisbIiUjJPUU0PwaEyUrsfHYvDf9r06Z Y6rahHIPWWFnf2GngBc09+LCCnt5w5mvjd7LlB6UVKJzgJ5S7foJwQlqqTxYLTfy7hBkeI2KSGG9f PEofhC7ycCt7166jpkMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pciee-00FbbN-1w; Thu, 16 Mar 2023 08:08:08 +0000 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pcieb-00FbaS-1l for linux-arm-kernel@lists.infradead.org; Thu, 16 Mar 2023 08:08:07 +0000 Received: by mail-ed1-x532.google.com with SMTP id ek18so4179498edb.6 for ; Thu, 16 Mar 2023 01:08:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678954084; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=2t5vgQAFH4zea9C9lwjCcYRFCKm2hCie1XyP3i2whSo=; b=FOk180Mybn/nrJNla/QxIEQVZ1i87jWOwt47jh12+zhGW+jJcZzqIo8xeSDzuJX347 e8X1PQoIiGXM+iMeS/bPsQuYiiTmCVV1T4cqDulvj2IwZNbVuLzvOEB6AMVIuUb9g7Pu JLh/noUDGL9/3gNwBjue+NXf5anXljKjgCcEaqqSWDcbqZMihfD621qWkr8tb9Q0z0Q2 V8sRddtOEDa9IsmSPnES94pgVpxcWEeFBCO+qQJva2qBxjLZ6vu8w5K+vVjPLw6+cOnr NP/Qu0N8bJ3J1aYmxANEcyakcVtwFt5AJ/RwABGVAa1+9tjcPzoqnkbf4RFZT2AvIGhU ekvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678954084; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2t5vgQAFH4zea9C9lwjCcYRFCKm2hCie1XyP3i2whSo=; b=8RyZFaQrGWj3PXWkND7X5Ce9p2PL6JhMcqikQXo1TIqc+2C0jfLouWZfajXUIycgWj ublMzRwZGKvERbPYXK9rmxFi3dAPXn9ZbgD7uEtNwP/Z8gkma7kCPpkpXbxcAE7rWBKg HZB6Klckbk9cLUu+KDNxaIi6TcKkg7VBypQsFNce5rIQaXWb44GfMkzDy7uhf4DiMOxD rg3F04bFJ9VO7PB0LIJSjBGZNclXOj/iAXfpmtrlV7w1TAFhDzHCn4f6ACyKP3g9kz2z jRtULq6h6nBByU+1a6WiECpu2+8Qyl/kQ1GqyUu7PCX3c8R6NydmwOWsQmurEB/8y+8h H20w== X-Gm-Message-State: AO0yUKWfMxTDhi50lj8jrgDDjEoui4H9r+dpKSevyHbKxk+8PA0msHWz Frs4Lo2YefF0ebd1IgQiUCYzNg== X-Google-Smtp-Source: AK7set+fhPNTk5Netaf52WqB7gcefN//PWAgl+AdB5Q4iDcjAlDmAtCNo/y6ml41RRTaKQ2Vn9KeKA== X-Received: by 2002:a17:906:16d6:b0:930:310:abf4 with SMTP id t22-20020a17090616d600b009300310abf4mr2419857ejd.50.1678954084026; Thu, 16 Mar 2023 01:08:04 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:9827:5f65:8269:a95f? ([2a02:810d:15c0:828:9827:5f65:8269:a95f]) by smtp.gmail.com with ESMTPSA id q24-20020a1709064cd800b009306be6bed7sm460103ejt.190.2023.03.16.01.08.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Mar 2023 01:08:03 -0700 (PDT) Message-ID: <60ce1510-6f2f-dad0-005c-7bcb3880872a@linaro.org> Date: Thu, 16 Mar 2023 09:08:02 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH net-next 12/16] dt-bindings: net: dwmac: Add MTL Tx Queue properties constraints Content-Language: en-US To: Serge Semin , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski Cc: Serge Semin , Alexey Malahov , Pavel Parkhomenko , Christian Marangi , Richard Cochran , Biao Huang , Yang Yingliang , devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Torgue References: <20230313225103.30512-1-Sergey.Semin@baikalelectronics.ru> <20230313225103.30512-13-Sergey.Semin@baikalelectronics.ru> From: Krzysztof Kozlowski In-Reply-To: <20230313225103.30512-13-Sergey.Semin@baikalelectronics.ru> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230316_010805_592083_0EB66283 X-CRM114-Status: GOOD ( 24.18 ) 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 On 13/03/2023 23:50, Serge Semin wrote: > Currently none of the MTL Tx Queues QoS-related DT-properties have been > equipped with the proper constraints meanwhile they can be specified at > least based on the corresponding CSR field sizes or the DW (x|xG)MAC > IP-core synthesize parameter constraints. Let's do that: > + snps,tx-queues-to-use - number of Tx queues to utilise is limited with a > number of available queues. DW MAC/GMAC: no queues, DW Eth QoS: <= 8, DW > xGMAC: <= 16. > + snps,weight - Tx Queue/Traffic Class quantum/weight utilised depending > on enabled algorithm for the Data Center Bridging feature: DWRR (up to > 0x1312D0 bytes to add to credit) or WFQ (up to 0x3FFF - least bandwidth) > or WFQ (up to 0x64). DW MAC/GMAC: no queues, DW Eth QoS: <= 0x1312D0, DW > xGMAC: <= 0x1312D0. > + snps,send_slope - Tx Queue/Traffic Class Send-Slope credit value > subtracted from the accumulated credit for the Audio/Video bridging > feature (CBS algorithm, bits per cycle scaled up by 1,024). DW MAC/GMAC: > no queues, DW Eth QoS: <= 0x2000, DW xGMAC: <= 0x3FFF. > + snps,idle_slope - same meaning as snps,send_slope except it's determines > the Idle-Slope credit of CBS algorithm. DW MAC/GMAC: no queues, DW Eth > QoS: <= 0x2000, DW xGMAC: <= 0x8000. > + snps,high_credit/snps,low_credit - maximum and minimum values > accumulated in the credit for the Audio/Video bridging feature (CBS > algorithm, bits scaled up by 1,024). DW MAC/GMAC: no queues, DW Eth > QoS: <= 0x1FFFFFFF, DW xGMAC: <= 0x1FFFFFFF. > + snps,priority - Tx Queue/Traffic Class priority (enabled by the > PFC-packets) limits determined by the VLAN tag PRI field width (it's 7). > DW MAC/GMAC: no queues, DW Eth QoS: 0xff, DW xGMAC: 0xff. > > Since the constraints vary for different IP-cores and the DT-schema is > common for all of them the least restrictive values are chosen. The info > above can be used for the IP-core specific DT-schemas if anybody ever is > bothered with one to create. > > Signed-off-by: Serge Semin > --- > .../bindings/net/snps,dwmac-generic.yaml | 2 +- > .../devicetree/bindings/net/snps,dwmac.yaml | 24 ++++++++++++++++++- > 2 files changed, 24 insertions(+), 2 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml b/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml > index ae740a1ab213..2974af79511d 100644 > --- a/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml > +++ b/Documentation/devicetree/bindings/net/snps,dwmac-generic.yaml > @@ -137,7 +137,7 @@ examples: > snps,send_slope = <0x1000>; > snps,idle_slope = <0x1000>; > snps,high_credit = <0x3E800>; > - snps,low_credit = <0xFFC18000>; > + snps,low_credit = <0x1FC18000>; > snps,priority = <0x1>; > }; > }; > diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > index e5662b1498b7..2ebf7995426b 100644 > --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml > @@ -250,6 +250,10 @@ properties: > snps,tx-queues-to-use: > $ref: /schemas/types.yaml#/definitions/uint32 > description: number of TX queues to be used in the driver > + default: 1 > + minimum: 1 > + maximum: 16 > + > snps,tx-sched-wrr: > type: boolean > description: Weighted Round Robin > @@ -296,13 +300,16 @@ properties: > snps,tx-sched-wfq: false > snps,tx-sched-dwrr: false > patternProperties: > - "^queue[0-9]$": > + "^queue([0-9]|1[0-5])$": > description: Each subnode represents a queue. > type: object > properties: > snps,weight: > $ref: /schemas/types.yaml#/definitions/uint32 > description: TX queue weight (if using a DCB weight algorithm) > + minimum: 0 > + maximum: 0x1312D0 > + > snps,dcb-algorithm: > type: boolean > description: TX queue will be working in DCB > @@ -315,15 +322,27 @@ properties: > snps,send_slope: > $ref: /schemas/types.yaml#/definitions/uint32 > description: enable Low Power Interface > + minimum: 0 > + maximum: 0x3FFF lowercase hex everywhere. Best regards, Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel