[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220126220505.iccabgu3olbaxhbi@skbuf>
Date: Thu, 27 Jan 2022 00:05:05 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Ansuel Smith <ansuelsmth@...il.com>
Cc: Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, linux-kernel@...r.kernel.org,
netdev@...r.kernel.org
Subject: Re: [RFC PATCH v7 12/16] net: dsa: qca8k: add support for phy
read/write with mgmt Ethernet
On Wed, Jan 26, 2022 at 02:57:03AM +0100, Ansuel Smith wrote:
> > > > Shouldn't qca8k_master_change() also take phy_hdr_data->mutex?
> > > >
> > >
> > > Is actually the normal mgmg_hdr_data.
> > >
> > > phy_hdr_data = &priv->mgmt_hdr_data;
> > >
> > > Should I remove this and use mgmt_hdr_data directly to remove any
> > > confusion?
> >
> > I am not thrilled by the naming of this data structure anyway
> > (why "hdr"?), but yes, I also got tricked by inconsistent naming.
> > Please choose a consistent name and stick with it.
>
> Hdr as header stuff since all this stuff is put in the hdr. Should I
> just drop hdr and use mgmt_data directly? Or mgmt_eth?
I don't have a strong preference because I can't find a good name.
Consistency in naming this feature is the most important part.
Maybe it is just me who is reading it this way, but I associate a
structure whose name contains "hdr" with something that pertains to data
from an skb (such as "mgmt_ethhdr" which is exactly that), hence the
earlier comment. I opened the manual and the phrasing that the vendor
uses is that "[ the switch ] supports the read/write register (sic)
through the Atheros header". So it makes more sense now and it's in line
with that, at least to some degree. I understand if you prefer not to
change it, but "mgmt_data" sounds less confusing to me.
Powered by blists - more mailing lists