Commit 85b0589ede83d7b4aeb2bc3cb8910183876cd5ee
Committed by
David S. Miller
1 parent
2008495d81
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>
Showing 3 changed files with 6 additions and 0 deletions Side-by-side Diff
include/net/devlink.h
include/uapi/linux/devlink.h
net/core/devlink.c
... | ... | @@ -5540,6 +5540,9 @@ |
5540 | 5540 | if ((trap->metadata_cap & DEVLINK_TRAP_METADATA_TYPE_F_IN_PORT) && |
5541 | 5541 | nla_put_flag(msg, DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT)) |
5542 | 5542 | goto nla_put_failure; |
5543 | + if ((trap->metadata_cap & DEVLINK_TRAP_METADATA_TYPE_F_FA_COOKIE) && | |
5544 | + nla_put_flag(msg, DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE)) | |
5545 | + goto nla_put_failure; | |
5543 | 5546 | |
5544 | 5547 | nla_nest_end(msg, attr); |
5545 | 5548 |