Re: [PATCH] net: dsa: Inherit dev addr from master

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2019-02-22 22:30, Andrew Lunn wrote:
On Fri, Feb 22, 2019 at 06:26:54PM +0530, Vinod Koul wrote:
From: Xiaofei Shen <xiaofeis@xxxxxxxxxxxxxx>

When we create slave netdevice, the dev addr is inherited from master
but the master dev addr maybe NULL at that time, so inherit it again
while opening the slave.

Hi Xiaofei, Vinod

Inheriting it twice seems a bit clumsy. Can the first inherit be
removed? Can you change your MAC driver to set its MAC address in
probe?

	Andrew
Hi Andrew

Some mac driver set its MAC address in probe while some MAC driver do it in the open function in the kernel.


This patch is checking whether the address is valid firstly, if it already inherits a valid mac address, it will not inherit again.

I think we can remove the first inherit, but if keep it, we can see consistent address output by ifconfig -a before open master and slave interface.

Xiaofeis




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux