From: Jiri Pirko <jiri@resnulli.us>
To: netdev@vger.kernel.org
Cc: dsahern@gmail.com, stephen@networkplumber.org,
idosch@mellanox.com, mlxsw@mellanox.com
Subject: [patch iproute2/net-next] devlink: add trap metadata type for flow action cookie
Date: Tue, 3 Mar 2020 14:27:42 +0100 [thread overview]
Message-ID: <20200303132742.13243-1-jiri@resnulli.us> (raw)
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
next reply other threads:[~2020-03-03 13:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 13:27 Jiri Pirko [this message]
2020-03-04 19:48 ` [patch iproute2/net-next] devlink: add trap metadata type for flow action cookie David Ahern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200303132742.13243-1-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=dsahern@gmail.com \
--cc=idosch@mellanox.com \
--cc=mlxsw@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).