]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - include/linux/netdevice.h
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)
commitdb24a9044ee191c397dcd1c6574f56d67d7c8df5
tree5d15e7aed127d9c211b5b2dc2d69607cef0d6d8d
parent56ef9c909b40483d2c8cb63fcbf83865f162d5ec
net: add support for phys_port_name

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>
Documentation/ABI/testing/sysfs-class-net
include/linux/netdevice.h
include/uapi/linux/if_link.h
net/core/dev.c
net/core/net-sysfs.c
net/core/rtnetlink.c