Skip to content
Commit f532957d authored by David Wei's avatar David Wei Committed by David S. Miller
Browse files

netdevsim: allow two netdevsim ports to be connected



Add two netdevsim bus attribute to sysfs:
/sys/bus/netdevsim/link_device
/sys/bus/netdevsim/unlink_device

Writing "A M B N" to link_device will link netdevsim M in netnsid A with
netdevsim N in netnsid B.

Writing "A M" to unlink_device will unlink netdevsim M in netnsid A from
its peer, if any.

rtnl_lock is taken to ensure nothing changes during the linking.

Signed-off-by: default avatarDavid Wei <dw@davidwei.uk>
Reviewed-by: default avatarMaciek Machnikowski <maciek@machnikowski.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e2d890af
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment