mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-23 08:55:56 -04:00
netdevsim: Add devlink-trap support
Have netdevsim register its trap groups and traps with devlink during initialization and periodically report trapped packets to devlink core. Since netdevsim is not a real device, the trapped packets are emulated using a workqueue that periodically reports a UDP packet with a random 5-tuple from each active packet trap and from each running netdev. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
f3047ca01f
commit
da58f90f11
@@ -145,6 +145,7 @@ struct nsim_dev_port {
|
||||
struct nsim_dev {
|
||||
struct nsim_bus_dev *nsim_bus_dev;
|
||||
struct nsim_fib_data *fib_data;
|
||||
struct nsim_trap_data *trap_data;
|
||||
struct dentry *ddir;
|
||||
struct dentry *ports_ddir;
|
||||
struct bpf_offload_dev *bpf_dev;
|
||||
|
||||
Reference in New Issue
Block a user