net: add support for phys_port_name
authorDavid Ahern <dsahern@gmail.com>
Wed, 18 Mar 2015 02:23:15 +0000 (20:23 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 19 Mar 2015 02:30:35 +0000 (22:30 -0400)
Similar to port id allow netdevices to specify port names and export
the name via sysfs. Drivers can implement the netdevice operation to
assist udev in having sane default names for the devices using the
rule:

$ cat /etc/udev/rules.d/80-net-setup-link.rules
SUBSYSTEM=="net", ACTION=="add", ATTR{phys_port_name}!="",
NAME="$attr{phys_port_name}"

Use of phys_name versus phys_id was suggested-by Jiri Pirko.

Signed-off-by: David Ahern <dsahern@gmail.com>
Acked-by: Jiri Pirko <jiri@resnulli.us>
Acked-by: Scott Feldman <sfeldma@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found