Skip to contentSkip to conversation

devlink: add trap metadata type for flow action cookie

PATCH Applied Jiri Pirko 2 participants 2 messages Mar 3, 2020 – Mar 4, 2020

Subsystems (3)
lore
Share & tools
lore

Jiri Pirko

author maintainer
#0 lore raw

PATCH 1/1 devlink: add trap metadata type for flow action cookie

From: Jiri Pirko <[email protected]>

Flow action cookie has been recently added to kernel, print it out.

---
 devlink/devlink.c            | 2 ++
 include/uapi/linux/devlink.h | 2 ++
 2 files changed, 4 insertions(+)
devlink/devlink.c +2 -0
index 6e2115b6c544..eef27c275921 100644
@@ -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>";
 	}
include/uapi/linux/devlink.h +2 -0
index 3f82dedda28f..a24d3c766d0b 100644
@@ -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 {
Signature · 1 line
2.21.1
Applied
#1 lore raw
Quoted 10 lines · Jiri Pirko

From: Jiri Pirko <[email protected]>

Flow action cookie has been recently added to kernel, print it out.

---
 devlink/devlink.c            | 2 ++
 include/uapi/linux/devlink.h | 2 ++
 2 files changed, 4 insertions(+)

applied to iproute2-next. Thanks