All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Wells Lu <wellslutw@gmail.com>,
	davem@davemloft.net, robh+dt@kernel.org, netdev@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	p.zabel@pengutronix.de, pabeni@redhat.com, krzk+dt@kernel.org,
	roopa@nvidia.com, edumazet@google.com, wells.lu@sunplus.com
Subject: Re: [PATCH net-next v8 2/2] net: ethernet: Add driver for Sunplus SP7021
Date: Thu, 14 Apr 2022 15:36:41 +0200	[thread overview]
Message-ID: <Ylgjab6qLsrzKZKc@lunn.ch> (raw)
In-Reply-To: <20220414141825.50eb8b6a@kernel.org>

> > +		/* Get mac-address from nvmem. */
> > +		ret = spl2sw_nvmem_get_mac_address(&pdev->dev, port_np, mac_addr);
> > +		if (ret) {
> > +			dev_info(&pdev->dev, "Generate a random mac address!\n");
> > +
> > +			/* Generate a mac address using OUI of Sunplus Technology
> > +			 * and random controller number.
> > +			 */
> > +			mac_addr[0] = 0xfc; /* OUI of Sunplus: fc:4b:bc */
> > +			mac_addr[1] = 0x4b;
> > +			mac_addr[2] = 0xbc;
> > +			mac_addr[3] = get_random_int() % 256;
> > +			mac_addr[4] = get_random_int() % 256;
> > +			mac_addr[5] = get_random_int() % 256;
> 
> I don't think you can do that. Either you use your OUI and assign the
> address at manufacture or you must use a locally administered address.
> And if locally administered address is used it better be completely
> random to lower the probability of collision to absolute minimum.

I commented about that in an earlier version of these patches. We
probably need a quote from the 802.1 or 802.3 which says this is O.K.

	 Andrew

  reply	other threads:[~2022-04-14 14:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13  2:31 [PATCH net-next v8 0/2] This is a patch series for Ethernet driver of Sunplus SP7021 SoC Wells Lu
2022-04-13  2:31 ` [PATCH net-next v8 1/2] devicetree: bindings: net: Add bindings doc for Sunplus SP7021 Wells Lu
2022-04-13  2:31 ` [PATCH net-next v8 2/2] net: ethernet: Add driver " Wells Lu
2022-04-14 12:18   ` Jakub Kicinski
2022-04-14 13:36     ` Andrew Lunn [this message]
2022-04-19 10:07       ` Wells Lu 呂芳騰
2022-04-19 13:03         ` Andrew Lunn
2022-04-19  9:49     ` Wells Lu 呂芳騰

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=Ylgjab6qLsrzKZKc@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=roopa@nvidia.com \
    --cc=wells.lu@sunplus.com \
    --cc=wellslutw@gmail.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.