Thread (23 messages) 23 messages, 6 authors, 2013-07-22

RE: [PATCH net-next] net: Add phys_port identifier to struct net_device and export it to sysfs

From: <hidden>
Date: 2013-06-19 18:55:16

-----Original Message-----
From: Ben Hutchings [mailto:bhutchings@solarflare.com]
Sent: Wednesday, June 19, 2013 9:07 PM
To: K, Narendra
Cc: john.fastabend@gmail.com; netdev@vger.kernel.org;
john.r.fastabend@intel.com
Subject: Re: [PATCH net-next] net: Add phys_port identifier to struct
net_device and export it to sysfs

On Wed, 2013-06-19 at 07:29 -0700, Narendra_K@Dell.com wrote:
[...]
quoted
2. show_phys_port  function sees a consistent value of
'netdev->phys_port.port_id and netdev->phys_port.port_id_len '  if
another execution path changes the value of 'netdev->phys_port.port_id
and netdev->phys_port.port_id_len '  with write_lock(&dev_base_lock)
held (similar to how dev->operstate is being changed).
[...]

If the physical port ID can change dynamically (I hadn't thought of that, but an
embedded switch could support such reconfiguration) then any such change
also needs to be announced through rtnetlink.  Actually, I think the value
needs to be included in rtnetlink information anyway.
Ok. Thank you Ben. I had not thought about this scenario.  I was thinking about the reason to hold the dev_base_lock.  Do you think points 1 and 2 are correct reason to hold the dev_base_lock ? If correct,  I think the 'show_broadcast' function also needs to be fixed as it is not holding the lock.

With regards,
Narendra K
Linux Engineering
Dell Inc.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help