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>
This commit is contained in:
Jiri Pirko
2020-02-25 11:45:26 +01:00
committed by David S. Miller
parent 6de9fceeaa
commit d3cbb907ae
2 changed files with 116 additions and 3 deletions

View File

@@ -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)