lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230313225103.30512-12-Sergey.Semin@baikalelectronics.ru>
Date:   Tue, 14 Mar 2023 01:50:58 +0300
From:   Serge Semin <Sergey.Semin@...kalelectronics.ru>
To:     Giuseppe Cavallaro <peppe.cavallaro@...com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>,
        Jose Abreu <joabreu@...opsys.com>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>
CC:     Serge Semin <Sergey.Semin@...kalelectronics.ru>,
        Serge Semin <fancer.lancer@...il.com>,
        Alexey Malahov <Alexey.Malahov@...kalelectronics.ru>,
        Pavel Parkhomenko <Pavel.Parkhomenko@...kalelectronics.ru>,
        Christian Marangi <ansuelsmth@...il.com>,
        Richard Cochran <richardcochran@...il.com>,
        Biao Huang <biao.huang@...iatek.com>,
        Yang Yingliang <yangyingliang@...wei.com>,
        <devicetree@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-stm32@...md-mailman.stormreply.com>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: [PATCH net-next 11/16] dt-bindings: net: dwmac: Add MTL Rx Queue properties constraints

Currently none of the MTL Rx 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,rx-queues-to-use - number of Rx queues to utilise is limited with a
number of available queues. DW MAC/GMAC: no queues, DW Eth QoS: <= 8, DW
xGMAC: <= 12.
+ snps,map-to-dma-channel - DMA channel ID is limited with a number of
available DMA-channels. DW MAC/GMAC: <= 3, DW Eth QoS: <= 8, DW xGMAC: <=
16.
+ snps,priority - bitfield of the USP (user Priority) values of the tagged
packets is limited with the corresponding CSR field width or a maximum
possible VLAN tag PRI field value (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 <Sergey.Semin@...kalelectronics.ru>
---
 .../devicetree/bindings/net/snps,dwmac.yaml          | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index f24718a8d184..e5662b1498b7 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -115,6 +115,10 @@ properties:
       snps,rx-queues-to-use:
         $ref: /schemas/types.yaml#/definitions/uint32
         description: number of RX queues to be used in the driver
+        default: 1
+        minimum: 1
+        maximum: 12
+
       snps,rx-sched-sp:
         type: boolean
         description: Strict priority
@@ -135,7 +139,7 @@ properties:
           properties:
             snps,rx-sched-sp: false
     patternProperties:
-      "^queue[0-9]$":
+      "^queue([0-9]|1[0-1])$":
         description: Each subnode represents a queue.
         type: object
         properties:
@@ -148,6 +152,9 @@ properties:
           snps,map-to-dma-channel:
             $ref: /schemas/types.yaml#/definitions/uint32
             description: DMA channel id to map
+            minimum: 0
+            maximum: 15
+
           snps,route-avcp:
             type: boolean
             description: AV Untagged Control packets
@@ -166,6 +173,9 @@ properties:
           snps,priority:
             $ref: /schemas/types.yaml#/definitions/uint32
             description: Bitmask of the tagged frames priorities assigned to the queue
+            minimum: 0
+            maximum: 0xFF
+
         allOf:
           - if:
               required:
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ