netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Question about phys_port_id
@ 2014-12-17 16:09 Joshua Watt
  2014-12-17 16:47 ` Dan Williams
  0 siblings, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2014-12-17 16:09 UTC (permalink / raw)
  To: netdev

Hello,

I had a question regarding the phys_port_id attribute of net_device.
Is that identifier supposed to be globally unique or just unique among
devices that share a common device? For example, we have a single
device that create two net_device s (one for each of it's macs). Would
it be sufficient for this device to return a phys_port_id of 0 for the
first net_device and 1 for the second? I noticed that the other
implementations that use phys_port_id copy their mac address into the
phys_port_id, but I'm not sure if that is just because that is an easy
way to get a unique number or if it is because the ID needs to be
globally unique.

If you're wondering the driver in question is the TI cpsw driver
(drivers/net/ethernet/ti/cpsw.c). We are running the device in
dual-emac mode and need to uniquely identify which emac is which in
userspace (specifically, udev rules). The physical port identifier
seems to be the logical choice to me, but I'm not sure if I'm missing
something.

Thanks,
Joshua Watt

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-18 15:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17 16:09 Question about phys_port_id Joshua Watt
2014-12-17 16:47 ` Dan Williams
2014-12-17 16:59   ` [PATCH] Documentation: clarify phys_port_id Dan Williams
2014-12-17 23:24     ` Florian Fainelli
2014-12-18  5:57     ` Sathya Perla
2014-12-18 15:35       ` Dan Williams

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).