diff options
author | Jiri Pirko <jiri@mellanox.com> | 2020-02-25 13:45:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-25 22:05:54 +0300 |
commit | 85b0589ede83d7b4aeb2bc3cb8910183876cd5ee (patch) | |
tree | a3af1216ab766970f5a4afc950b0ba1b1dba0c94 /include | |
parent | 2008495d81159a66de4dc3ee4252a5fc60294a82 (diff) | |
download | linux-85b0589ede83d7b4aeb2bc3cb8910183876cd5ee.tar.xz |
devlink: add trap metadata type for cookie
Allow driver to indicate cookie metadata for registered traps.
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 'include')
-rw-r--r-- | include/net/devlink.h | 1 | ||||
-rw-r--r-- | include/uapi/linux/devlink.h | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 07923e619206..014a8b3d1499 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -541,6 +541,7 @@ struct devlink_trap_group { }; #define DEVLINK_TRAP_METADATA_TYPE_F_IN_PORT BIT(0) +#define DEVLINK_TRAP_METADATA_TYPE_F_FA_COOKIE BIT(1) /** * struct devlink_trap - Immutable packet trap attributes. diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h index ae37fd4d194a..be2a2948f452 100644 --- a/include/uapi/linux/devlink.h +++ b/include/uapi/linux/devlink.h @@ -252,6 +252,8 @@ enum devlink_trap_type { enum { /* Trap can report input port as metadata */ DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT, + /* Trap can report flow action cookie as metadata */ + DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE, }; enum devlink_attr { |