[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEPrYjTZ8SU1y4TwKHYtZju+4_-O5mazAjaFKaKmR2cYuAKHnA@mail.gmail.com>
Date: Wed, 17 Dec 2014 10:09:31 -0600
From: Joshua Watt <jpewdev@...il.com>
To: netdev@...r.kernel.org
Subject: Question about phys_port_id
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists