aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-04-26 01:52:03 -0400
committerDavid S. Miller <davem@davemloft.net>2019-04-26 01:52:03 -0400
commit9157bc2a5e8214b29f1f64342e7a3aae93a98512 (patch)
treef88904011329e2ebd0a12f14d22fa7a3e620e8a7 /drivers/s390/net
parentMerge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next (diff)
parentnetdevsim: implement ndo_get_devlink_port (diff)
downloadlinux-dev-9157bc2a5e8214b29f1f64342e7a3aae93a98512.tar.xz
linux-dev-9157bc2a5e8214b29f1f64342e7a3aae93a98512.zip
Merge branch 'netdevsim-implement-proper-device-model'
Jiri Pirko says: ==================== netdevsim: implement proper device model Currently the model of netdevsim is a bit odd in multiple ways. 1) devlink instance is not in any way related with actual netdevsim netdevices. Instead, it is created per-namespace. 2) multi-port netdevsim device is done using "link" attribute. 3) netdevsim bus is there only to have something to bind the netdev to, it really does not act as a bus. 4) netdevsim instances are created by "ip link add" which is great for soft devices with no hw backend. The rtnl core allocates netdev and calls into driver holding rtnl mutex. For hw-backed devices, this flow is wrong as it breaks order in which things are done. This patchset adjust netdevsim to fix all above. In order to support proper devlink and devlink port instances and to be able to emulate real devices, there is need to implement bus probe and instantiate everything from there. User can specify device id and port count to be instantianted. For example: $ echo "10 4" > /sys/bus/netdevsim/new_device Then devlink shows this: $ devlink dev netdevsim/netdevsim10 $ devlink port netdevsim/netdevsim10/0: type eth netdev eni0np1 flavour physical netdevsim/netdevsim10/1: type eth netdev eni0np2 flavour physical netdevsim/netdevsim10/2: type eth netdev eni0np3 flavour physical netdevsim/netdevsim10/3: type eth netdev eni0np4 flavour physical There is possible to add and delete ports using their indexes during netdevsim device lifetime like this: Then devlink shows this: $ devlink port netdevsim/netdevsim10/1: type eth netdev eni10np2 flavour physical netdevsim/netdevsim10/2: type eth netdev eni10np3 flavour physical netdevsim/netdevsim10/3: type eth netdev eni10np4 flavour physical netdevsim/netdevsim10/43: type eth netdev eni10np44 flavour physical Debugfs topology is also adjusted a bit. The rest stays the same as before. Udev bits are merged un systemd upstream git: https://github.com/systemd/systemd/commit/eaa9d507d85509c8bf727356e3884ec54b0fc646 See individual patches for changelog. ==================== Acked-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390/net')
0 files changed, 0 insertions, 0 deletions