diff options
author | Jiri Pirko <jiri@mellanox.com> | 2020-02-25 11:45:19 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-02-25 11:05:54 -0800 |
commit | 85b0589ede83d7b4aeb2bc3cb8910183876cd5ee (patch) | |
tree | a3af1216ab766970f5a4afc950b0ba1b1dba0c94 /net | |
parent | 2008495d81159a66de4dc3ee4252a5fc60294a82 (diff) | |
download | linux-85b0589ede83d7b4aeb2bc3cb8910183876cd5ee.tar.bz2 |
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 'net')
-rw-r--r-- | net/core/devlink.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/devlink.c b/net/core/devlink.c index 0d7c5d3443d2..12e6ef749b8a 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -5540,6 +5540,9 @@ static int devlink_trap_metadata_put(struct sk_buff *msg, if ((trap->metadata_cap & DEVLINK_TRAP_METADATA_TYPE_F_IN_PORT) && nla_put_flag(msg, DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT)) goto nla_put_failure; + if ((trap->metadata_cap & DEVLINK_TRAP_METADATA_TYPE_F_FA_COOKIE) && + nla_put_flag(msg, DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE)) + goto nla_put_failure; nla_nest_end(msg, attr); |