Re: [PATCH net v6 1/6] net: marvell: prestera: Add driver for Prestera family ASIC devices

From: Vadym Kochan
Date: Fri Sep 04 2020 - 11:55:08 EST


Hi Andrew,

On Fri, Sep 04, 2020 at 03:32:17PM +0200, Andrew Lunn wrote:
> > > > +static int prestera_is_valid_mac_addr(struct prestera_port *port, u8 *addr)
> > > > +{
> > > > + if (!is_valid_ether_addr(addr))
> > > > + return -EADDRNOTAVAIL;
> > > > +
> > > > + if (memcmp(port->sw->base_mac, addr, ETH_ALEN - 1))
> > >
> > > Why ETH_ALEN - 1?
> > >
> > This is the restriction of the port mac address, it must have base mac
> > address part at first 5 bytes.
>
> You probably want to put a comment here about that.
>
> And this is particularly user unfriendly. Is this a hardware issue? Or
> firmware? Is this likely to change in the future?
>
> Andrew

It is required by the firmware, partially it may have relation to the
hardware.

I am not sure if it will be changed in the future. But I will add
a comment as you suggested.

Thanks,