From: Andrew Lunn <andrew@lunn.ch>
To: Ansuel Smith <ansuelsmth@gmail.com>
Cc: devicetree@vger.kernel.org, Vignesh Raghavendra <vigneshr@ti.com>,
Boris Brezillon <bbrezillon@kernel.org>,
Richard Weinberger <richard@nod.at>,
Russell King <linux@armlinux.org.uk>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
linux-mtd@lists.infradead.org,
Miquel Raynal <miquel.raynal@bootlin.com>,
Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, Frank Rowand <frowand.list@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Heiner Kallweit <hkallweit1@gmail.com>
Subject: Re: [PATCH v2 4/4] dt-bindings: net: Document use of mac-address-increment
Date: Sun, 20 Sep 2020 02:31:28 +0200 [thread overview]
Message-ID: <20200920003128.GC3673389@lunn.ch> (raw)
In-Reply-To: <20200919223026.20803-5-ansuelsmth@gmail.com>
> + mac-address-increment:
> + description:
> + The MAC address can optionally be increased (or decreased using
> + negative values) from the original value readed (from a nvmem cell
Read is irregular, there is no readed, just read.
> + for example). This can be used if the mac is readed from a dedicated
> + partition and must be increased based on the number of device
> + present in the system.
You should probably add there is no underflow/overflow to other bytes
of the MAC address. 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00.
> + minimum: -255
> + maximum: 255
> +
> + mac-address-increment-byte:
> + description:
> + If 'mac-address-increment' is defined, this will tell what byte of
> + the mac-address will be increased. If 'mac-address-increment' is
> + not defined, this option will do nothing.
> + default: 5
> + minimum: 0
> + maximum: 5
Is there a real need for this? A value of 0 seems like a bad idea,
since a unicast address could easily become a multicast address, which
is not valid for an interface address. It also does not seem like a
good idea to allow the OUI to be changed. So i think only bytes 3-5
should be allowed, but even then, i don't think this is needed, unless
you do have a clear use case.
Andrew
______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
WARNING: multiple messages have this Message-ID (diff)
From: Andrew Lunn <andrew@lunn.ch>
To: Ansuel Smith <ansuelsmth@gmail.com>
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Richard Weinberger <richard@nod.at>,
Vignesh Raghavendra <vigneshr@ti.com>,
Rob Herring <robh+dt@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Frank Rowand <frowand.list@gmail.com>,
Boris Brezillon <bbrezillon@kernel.org>,
linux-mtd@lists.infradead.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH v2 4/4] dt-bindings: net: Document use of mac-address-increment
Date: Sun, 20 Sep 2020 02:31:28 +0200 [thread overview]
Message-ID: <20200920003128.GC3673389@lunn.ch> (raw)
In-Reply-To: <20200919223026.20803-5-ansuelsmth@gmail.com>
> + mac-address-increment:
> + description:
> + The MAC address can optionally be increased (or decreased using
> + negative values) from the original value readed (from a nvmem cell
Read is irregular, there is no readed, just read.
> + for example). This can be used if the mac is readed from a dedicated
> + partition and must be increased based on the number of device
> + present in the system.
You should probably add there is no underflow/overflow to other bytes
of the MAC address. 00:01:02:03:04:ff + 1 == 00:01:02:03:04:00.
> + minimum: -255
> + maximum: 255
> +
> + mac-address-increment-byte:
> + description:
> + If 'mac-address-increment' is defined, this will tell what byte of
> + the mac-address will be increased. If 'mac-address-increment' is
> + not defined, this option will do nothing.
> + default: 5
> + minimum: 0
> + maximum: 5
Is there a real need for this? A value of 0 seems like a bad idea,
since a unicast address could easily become a multicast address, which
is not valid for an interface address. It also does not seem like a
good idea to allow the OUI to be changed. So i think only bytes 3-5
should be allowed, but even then, i don't think this is needed, unless
you do have a clear use case.
Andrew
next prev parent reply other threads:[~2020-09-20 0:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-19 22:30 [PATCH v2 0/4] Actually implement nvmem support for mtd Ansuel Smith
2020-09-19 22:30 ` Ansuel Smith
2020-09-19 22:30 ` [PATCH v2 1/4] mtd: Add nvmem support for mtd nvmem-providers Ansuel Smith
2020-09-19 22:30 ` Ansuel Smith
2020-09-19 22:30 ` [PATCH v2 2/4] dt-bindings: mtd: partition: Document use of nvmem-provider Ansuel Smith
2020-09-19 22:30 ` Ansuel Smith
2020-09-19 22:30 ` [PATCH v2 3/4] of_net: add mac-address-increment support Ansuel Smith
2020-09-19 22:30 ` Ansuel Smith
2020-09-19 22:30 ` [PATCH v2 4/4] dt-bindings: net: Document use of mac-address-increment Ansuel Smith
2020-09-19 22:30 ` Ansuel Smith
2020-09-20 0:31 ` Andrew Lunn [this message]
2020-09-20 0:31 ` Andrew Lunn
2020-09-20 0:39 ` R: " ansuelsmth
2020-09-20 0:39 ` ansuelsmth
2020-09-20 1:22 ` Andrew Lunn
2020-09-20 1:22 ` Andrew Lunn
2020-09-20 9:45 ` ansuelsmth
2020-09-20 9:45 ` ansuelsmth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200920003128.GC3673389@lunn.ch \
--to=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=bbrezillon@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=richard@nod.at \
--cc=robh+dt@kernel.org \
--cc=vigneshr@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.