* [patch iproute2/net-next] devlink: add trap metadata type for flow action cookie
@ 2020-03-03 13:27 Jiri Pirko
2020-03-04 19:48 ` David Ahern
0 siblings, 1 reply; 2+ messages in thread
From: Jiri Pirko @ 2020-03-03 13:27 UTC (permalink / raw)
To: netdev; +Cc: dsahern, stephen, idosch, mlxsw
From: Jiri Pirko <jiri@mellanox.com>
Flow action cookie has been recently added to kernel, print it out.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
devlink/devlink.c | 2 ++
include/uapi/linux/devlink.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/devlink/devlink.c b/devlink/devlink.c
index 6e2115b6c544..eef27c275921 100644
--- a/devlink/devlink.c
+++ b/devlink/devlink.c
@@ -6932,6 +6932,8 @@ static const char *trap_metadata_name(const struct nlattr *attr)
switch (attr->nla_type) {
case DEVLINK_ATTR_TRAP_METADATA_TYPE_IN_PORT:
return "input_port";
+ case DEVLINK_ATTR_TRAP_METADATA_TYPE_FA_COOKIE:
+ return "flow_action_cookie";
default:
return "<unknown metadata type>";
}
diff --git a/include/uapi/linux/devlink.h b/include/uapi/linux/devlink.h
index 3f82dedda28f..a24d3c766d0b 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 {
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch iproute2/net-next] devlink: add trap metadata type for flow action cookie
2020-03-03 13:27 [patch iproute2/net-next] devlink: add trap metadata type for flow action cookie Jiri Pirko
@ 2020-03-04 19:48 ` David Ahern
0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2020-03-04 19:48 UTC (permalink / raw)
To: Jiri Pirko, netdev; +Cc: stephen, idosch, mlxsw
On 3/3/20 6:27 AM, Jiri Pirko wrote:
> From: Jiri Pirko <jiri@mellanox.com>
>
> Flow action cookie has been recently added to kernel, print it out.
>
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> ---
> devlink/devlink.c | 2 ++
> include/uapi/linux/devlink.h | 2 ++
> 2 files changed, 4 insertions(+)
>
applied to iproute2-next. Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-03-04 19:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-03 13:27 [patch iproute2/net-next] devlink: add trap metadata type for flow action cookie Jiri Pirko
2020-03-04 19:48 ` David Ahern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).