netdevsim: create devlink instance per netdevsim instance
authorJiri Pirko <jiri@mellanox.com>
Thu, 25 Apr 2019 13:59:42 +0000 (15:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Apr 2019 05:52:02 +0000 (01:52 -0400)
commit5fc494225c1eb81309cc4c91f183cd30e4edb674
tree4369d3393e958b7ffb3cf7cd4d5eba271d7f78ad
parent1daf36c0dbc059cdef1a1c11e83599c972832d1d
netdevsim: create devlink instance per netdevsim instance

Currently there is one devlink instance created per network namespace.
That is quite odd considering the fact that devlink instance should
represent an ASIC. The following patches are going to move the devlink
instance even more down to a bus device, but until then, have one
devlink instance per netdevsim instance. Struct nsim_devlink is
introduced to hold fib setting.

The changes in the fib code are only related to holding the
configuration per devlink instance instead of network namespace.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/devlink.c
drivers/net/netdevsim/fib.c
drivers/net/netdevsim/netdev.c
drivers/net/netdevsim/netdevsim.h