switchdev: convert parent_id_get to switchdev attr get
Switch ID is just a gettable port attribute. Convert switchdev op switchdev_parent_id_get to a switchdev attr. Note: for sysfs and netlink interfaces, SWITCHDEV_ATTR_PORT_PARENT_ID is called with SWITCHDEV_F_NO_RECUSE to limit switch ID user-visiblity to only port netdevs. So when a port is stacked under bond/bridge, the user can only query switch id via the switch ports, but not via the upper devices Signed-off-by:Scott Feldman <sfeldma@gmail.com> Acked-by:
Jiri Pirko <jiri@resnulli.us> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/rocker/rocker.c 12 additions, 5 deletionsdrivers/net/ethernet/rocker/rocker.c
- include/net/switchdev.h 4 additions, 14 deletionsinclude/net/switchdev.h
- net/core/net-sysfs.c 7 additions, 3 deletionsnet/core/net-sysfs.c
- net/core/rtnetlink.c 6 additions, 3 deletionsnet/core/rtnetlink.c
- net/dsa/slave.c 11 additions, 5 deletionsnet/dsa/slave.c
- net/switchdev/switchdev.c 11 additions, 27 deletionsnet/switchdev/switchdev.c
Loading
Please register or sign in to comment