Message ID | 20230203-dt-bindings-network-class-v2-0-499686795073@jannau.net |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1886193wrn; Sun, 12 Feb 2023 04:42:07 -0800 (PST) X-Google-Smtp-Source: AK7set87mL7d2pczHak1PTd7McVxua9EY4NU7Sy4I9W+1CSsu7JcH1/aR8m+J+wOFhxtfU03rxjz X-Received: by 2002:a17:90a:1947:b0:231:2343:9be3 with SMTP id 7-20020a17090a194700b0023123439be3mr14763873pjh.29.1676205727568; Sun, 12 Feb 2023 04:42:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676205727; cv=none; d=google.com; s=arc-20160816; b=sDYHvVfbzzzu+88tiMSbDnCkHzWAWsZrLKcj/R9Cbh0+x5hq3drlLJ0Fh3mF9g0i3p rLpm6wx0SpFKLoXc1BpOgEzrld7396E+EhfL4V8TxvV41+T7HRNgpSUEy23UvVOy4gbg WTpWLELfkcKK2AVKmLLps4ATaMO8rsgUosHON5ofGPru6pk6t0UZAyAr9VASCJXIAAjS VQSqMiq80bbHLURzaPwDb/eEZnakFajsbhdIGAjDzKmqBdAOcDX3EEUp1ie93cxgPu81 rVdtY0DSFpwwJmJJOXL9GpPpSKGvMyg+1/WSePxeEfjU8FFC7lxp3JVaPO0FrrCAvU7V urTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from; bh=nDQl3Bx2fWNpNJrNZVCXiC0EJKQNPnZZM0Zy4DCWXJs=; b=oS9nUe8hHbkWxX3M6WouvbdUGolGEXgrKhtRU5PfcalksVlW/S818HM3SJq2vgbj5E bRRsbbk48aFo+FPFNYa3itzIPhxm/7lHblW7CTxRxZIyucjPxucEGMUoz7HIkWtkMLvi 9PFtQ7Vwx6Mr13EaBLls08QYtCQ5q3D4GkIqXtI+N6Ozy9oYWWV7ukeMv5t0VsQnu26b ubI8bG/hmEtkj3X9dAFufVegS9M9sDFOJ/HQt44GjjcVVGSbUxTzxaeQ3aYqQgdgOsUH Rt3aGBv7E/NhRUJlqICmNflb3JGPLoUFy4ND6hNsdDuG4cqFwcXvLK6w1AI5Q5Dhuo3O nieQ== 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 mh15-20020a17090b4acf00b002307e5c5f74si9115952pjb.185.2023.02.12.04.41.55; Sun, 12 Feb 2023 04:42:07 -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 S229741AbjBLMQr (ORCPT <rfc822;tebrre53rla2o@gmail.com> + 99 others); Sun, 12 Feb 2023 07:16:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229656AbjBLMQg (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sun, 12 Feb 2023 07:16:36 -0500 Received: from soltyk.jannau.net (soltyk.jannau.net [144.76.91.90]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D823DE052; Sun, 12 Feb 2023 04:16:33 -0800 (PST) Received: from robin.home.jannau.net (p579ad32f.dip0.t-ipconnect.de [87.154.211.47]) by soltyk.jannau.net (Postfix) with ESMTPSA id 37C2626F76B; Sun, 12 Feb 2023 13:16:31 +0100 (CET) From: Janne Grunau <j@jannau.net> Subject: [PATCH v2 0/4] dt-bindings: net: Add network-class.yaml schema Date: Sun, 12 Feb 2023 13:16:28 +0100 Message-Id: <20230203-dt-bindings-network-class-v2-0-499686795073@jannau.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAJzY6GMC/42OSwrCMBCGryJZOzKZ2IeuvIe4SDtDG5UpJLEip Xc39QSufj74X4tJEoMkc94tJsocUpi0AO13ph+9DgKBCxtCckjogDN0QTnokEAlv6f4gP7pU4L W1Y0w182JyZR855NAF73249aAiMBloZccRSC31lJp25xjSHmKn9+J2Ra5/rM3W0A4ViTomooQ+ XL3qv51KDZzW9f1C4fabxDdAAAA To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Mailing List <devicetree-spec@vger.kernel.org>, Kalle Valo <kvalo@kernel.org>, van Spriel <arend@broadcom.com>, =?utf-8?b?SsOpcsO0bWUgUG91aWxsZXI=?= <jerome.pouiller@silabs.com>, Dinh Nguyen <dinguyen@kernel.org>, Ley Foon Tan <lftan@altera.com>, Chee Nouk Phoon <cnphoon@altera.com> Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-wireless@vger.kernel.org, Janne Grunau <j@jannau.net> X-Mailer: b4 0.12.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2214; i=j@jannau.net; h=from:subject:message-id; bh=y7QrjK1UKfIGXPczHYVce0GeZzI5ACPm72GbLe9dHPc=; b=owGbwMvMwCG2UNrmdq9+ahrjabUkhuQXN+atn7qg2jhxduj922unGymYVfUGnlw5RaUwdDuTT aK6UHRRRykLgxgHg6yYIkuS9ssOhtU1ijG1D8Jg5rAygQxh4OIUgImIizAynGqae35x2N7/ospc n1dGJhTnhh5h3Hmk9uKZ/JbpYnHHbBj+Sm9y+8fyXrj49t6J4dw+cqnPxUvz1vzhYs3I2rJznZU qDwA= X-Developer-Key: i=j@jannau.net; a=openpgp; fpr=8B336A6BE4E5695E89B8532B81E806F586338419 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE 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?1757629096856922004?= X-GMAIL-MSGID: =?utf-8?q?1757629096856922004?= |
Series |
dt-bindings: net: Add network-class.yaml schema
|
|
Message
Janne Grunau
Feb. 12, 2023, 12:16 p.m. UTC
The Devicetree Specification, Release v0.3 specifies in section 4.3.1
a "Network Class Binding". This covers MAC address and maximal frame
size properties. "local-mac-address" and "mac-address" with a fixed
"address-size" of 48 bits are already in the ethernet-controller.yaml
schema so move those over.
Keep "address-size" fixed to 48 bits as it's unclear if network protocols
using 64-bit mac addresses like ZigBee, 6LoWPAN and others are relevant for
this binding. This allows mac address array size validation for ethernet
and wireless lan devices.
"max-frame-size" in the Devicetree Specification is written to cover the
whole layer 2 ethernet frame but actual use for this property is the
payload size. Keep the description from ethernet-controller.yaml which
specifies the property as MTU.
Signed-off-by: Janne Grunau <j@jannau.net>
---
Changes in v2:
- Added "max-frame-size" with the description from ethernet-controller.yaml
- Restrict "address-size" to 48-bits
- Fix the mac-address array size to 6 bytes
- Drop duplicate default value from "max-frame-size" description
- Fix 2 nios2 dts files which incorrectly use the ethernet frame size of 1518
- Link to v1: https://lore.kernel.org/r/20230203-dt-bindings-network-class-v1-0-452e0375200d@jannau.net
---
Janne Grunau (4):
dt-bindings: net: Add network-class schema for mac-address properties
dt-bindings: wireless: bcm4329-fmac: Use network-class.yaml schema
dt-bindings: wireless: silabs,wfx: Use network-class.yaml
nios2: dts: Fix tse_mac "max-frame-size" property
.../bindings/net/ethernet-controller.yaml | 25 +-----------
.../devicetree/bindings/net/network-class.yaml | 44 ++++++++++++++++++++++
.../bindings/net/wireless/brcm,bcm4329-fmac.yaml | 5 ++-
.../bindings/net/wireless/silabs,wfx.yaml | 5 +--
arch/nios2/boot/dts/10m50_devboard.dts | 2 +-
arch/nios2/boot/dts/3c120_devboard.dts | 2 +-
6 files changed, 52 insertions(+), 31 deletions(-)
---
base-commit: 1b929c02afd37871d5afb9d498426f83432e71c2
change-id: 20230203-dt-bindings-network-class-8367edd679d2
Best regards,
Comments
On Sun, 12 Feb 2023 13:16:28 +0100 Janne Grunau wrote: > The Devicetree Specification, Release v0.3 specifies in section 4.3.1 > a "Network Class Binding". This covers MAC address and maximal frame > size properties. "local-mac-address" and "mac-address" with a fixed > "address-size" of 48 bits are already in the ethernet-controller.yaml > schema so move those over. > > Keep "address-size" fixed to 48 bits as it's unclear if network protocols > using 64-bit mac addresses like ZigBee, 6LoWPAN and others are relevant for > this binding. This allows mac address array size validation for ethernet > and wireless lan devices. > > "max-frame-size" in the Devicetree Specification is written to cover the > whole layer 2 ethernet frame but actual use for this property is the > payload size. Keep the description from ethernet-controller.yaml which > specifies the property as MTU. Rob, Krzysztof - is this one on your todo list? It's been hanging around in my queue, I'm worried I missed some related conversation.
On Mon, Feb 20, 2023 at 1:40 PM Jakub Kicinski <kuba@kernel.org> wrote: > > On Sun, 12 Feb 2023 13:16:28 +0100 Janne Grunau wrote: > > The Devicetree Specification, Release v0.3 specifies in section 4.3.1 > > a "Network Class Binding". This covers MAC address and maximal frame > > size properties. "local-mac-address" and "mac-address" with a fixed > > "address-size" of 48 bits are already in the ethernet-controller.yaml > > schema so move those over. > > > > Keep "address-size" fixed to 48 bits as it's unclear if network protocols > > using 64-bit mac addresses like ZigBee, 6LoWPAN and others are relevant for > > this binding. This allows mac address array size validation for ethernet > > and wireless lan devices. > > > > "max-frame-size" in the Devicetree Specification is written to cover the > > whole layer 2 ethernet frame but actual use for this property is the > > payload size. Keep the description from ethernet-controller.yaml which > > specifies the property as MTU. > > Rob, Krzysztof - is this one on your todo list? It's been hanging > around in my queue, I'm worried I missed some related conversation. Andrew suggested changes on 1 and 2 which seem reasonable to me. Rob
On Mon, 20 Feb 2023 15:49:44 -0600 Rob Herring wrote: > > Rob, Krzysztof - is this one on your todo list? It's been hanging > > around in my queue, I'm worried I missed some related conversation. > > Andrew suggested changes on 1 and 2 which seem reasonable to me. Ah, thank you! I see them in lore but not in my MUA.