netdevsim: Register control traps
authorIdo Schimmel <idosch@mellanox.com>
Fri, 29 May 2020 18:36:44 +0000 (21:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 1 Jun 2020 18:49:23 +0000 (11:49 -0700)
commit1897936744f0ab366102170d7c76bfc8f7aeb2ba
treeb3f3cb76165cbc0edaf841b19bd3999d4e4ea58f
parent5eb18a2b6c11bf165271644ef1ab812b10659c8f
netdevsim: Register control traps

Register two control traps with devlink. The existing selftest at
tools/testing/selftests/drivers/net/netdevsim/devlink_trap.sh iterates
over all registered traps and checks that the action of non-drop traps
cannot be changed. Up until now only exception traps were tested, now
control traps will be tested as well.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/netdevsim/dev.c