netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander H Duyck <alexander.duyck@gmail.com>
To: 梁礼学 <lianglixuehao@126.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Leon Romanovsky <leon@kernel.org>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	linux-kernel@vger.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH v7] igb: Assign random MAC address instead of fail in case of invalid one
Date: Thu, 15 Dec 2022 07:49:59 -0800	[thread overview]
Message-ID: <3bc9c4dab64860fde7405fd589375f0ae087afe9.camel@gmail.com> (raw)
In-Reply-To: <2D8AD99A-E29B-40CC-AFEC-3D9D4AC80C14@126.com>

On Thu, 2022-12-15 at 11:24 +0800, 梁礼学 wrote:
> The module parameter method does bring some inconvenience to the user, 
> especially the parameter needs to be specified when the module is loaded. 
> But as alexander said, if the net device is not successfully registered, 
> the user has no chance to modify the invalid MAC address in the current EEPROM. 
> At present, the read/write of EEPROM is bundled with the net driver. 
> I am not sure if there is any other way to complete the modification of EEPROM 
> independently of the network driver;
> 
> Is it necessary to bind the registration of net device to the judgment of invalid MAC?
> I personally think that MAC configuration is not the capability or function of the device, 
> this should not affect the registration of the device;
> Can the invalid MAC be judged in the up stage of the network device? 
> In this way, the net driver can continue to be loaded successfully, 
> and the MAC can be changed using ethtool, and it will not increase the difficulty of debugging for users.
> 
> Thanks

The problem is that the decision all depends on use case. For a small
embedded device or desktop system it probably doesn't care as it will
always just default to DHCP most likely anyway so it doesn't really
care about maintaining a static MAC configuration.

However the igb device covers a range of products including workstation
and some server. The issue is that changing the MAC address on server
setups can trigger significant issues depending on the setup as things
like static IP reservations can be lost due to either a static DHCP
reservation or sysconfig potentially being lost. I know on older redhat
systems random MACs would lead to a buildup up sysconfig files as it
would generate a new one every time the MAC changed. It is one of the
reasons why Intel stopped using random MAC on VFs if I recall
correctly.

Lastly one thing that occurs to me is that there is support for
providing a MAC address via eth_platform_get_mac_address() as some of
the smaller embedded parts have an option to run without an EEPROM. I
wonder if there isn't a way to work around this by providing a
devicetree overlay on problematic systems.




  reply	other threads:[~2022-12-15 15:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-13  7:47 [PATCH v7] igb: Assign random MAC address instead of fail in case of invalid one Lixue Liang
2022-12-13 19:22 ` Tony Nguyen
2022-12-14  7:22 ` Leon Romanovsky
2022-12-14 10:02   ` 梁礼学
2022-12-14 16:51   ` Jakub Kicinski
2022-12-14 18:53     ` Leon Romanovsky
2022-12-14 20:50       ` Jakub Kicinski
2022-12-14 21:43         ` Heiner Kallweit
2022-12-14 23:17           ` Alexander Duyck
2022-12-15  3:24             ` 梁礼学
2022-12-15 15:49               ` Alexander H Duyck [this message]
2022-12-19 18:25             ` Jacob Keller
2022-12-18  8:41         ` Leon Romanovsky
2022-12-19 15:30           ` Alexander Duyck
2022-12-28  9:15             ` Leon Romanovsky
2022-12-30 16:17               ` Andrew Lunn
  -- strict thread matches above, loose matches on Subject: below --
2022-12-14  1:12 Lixue Liang

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=3bc9c4dab64860fde7405fd589375f0ae087afe9.camel@gmail.com \
    --to=alexander.duyck@gmail.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=jesse.brandeburg@intel.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=lianglixuehao@126.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).