aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/netdevsim.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2020-02-25 11:45:26 +0100
committerDavid S. Miller <davem@davemloft.net>2020-02-25 11:05:55 -0800
commitd3cbb907ae57fe5da314b51d949b617b538bdeae (patch)
tree7aa16891799aeb91509266d1e0bac998decfbdb9 /drivers/net/netdevsim/netdevsim.h
parentmlxsw: spectrum_trap: Lookup and pass cookie down to devlink_trap_report() (diff)
downloadlinux-dev-d3cbb907ae57fe5da314b51d949b617b538bdeae.tar.xz
linux-dev-d3cbb907ae57fe5da314b51d949b617b538bdeae.zip
netdevsim: add ACL trap reporting cookie as a metadata
Add new trap ACL which reports flow action cookie in a metadata. Allow used to setup the cookie using debugfs file. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netdevsim/netdevsim.h')
-rw-r--r--drivers/net/netdevsim/netdevsim.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index 2eb7b0dc1594..e46fc565b981 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -178,6 +178,8 @@ struct nsim_dev {
bool fail_reload;
struct devlink_region *dummy_region;
struct nsim_dev_health health;
+ struct flow_action_cookie *fa_cookie;
+ spinlock_t fa_cookie_lock; /* protects fa_cookie */
};
static inline struct net *nsim_dev_net(struct nsim_dev *nsim_dev)