summaryrefslogtreecommitdiffstats
path: root/include/net/flow_offload.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2020-02-25 11:45:18 +0100
committerDavid S. Miller <davem@davemloft.net>2020-02-25 11:05:54 -0800
commit2008495d81159a66de4dc3ee4252a5fc60294a82 (patch)
treebfdc544617d4c7163b01b27f14eb5b0fca01f462 /include/net/flow_offload.h
parent3b3e808cd883dd2e39c85e6d8debc0020b5ef5e7 (diff)
downloadlinux-stable-2008495d81159a66de4dc3ee4252a5fc60294a82.tar.gz
linux-stable-2008495d81159a66de4dc3ee4252a5fc60294a82.tar.bz2
linux-stable-2008495d81159a66de4dc3ee4252a5fc60294a82.zip
flow_offload: pass action cookie through offload structures
Extend struct flow_action_entry in order to hold TC action cookie specified by user inserting the action. 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 'include/net/flow_offload.h')
-rw-r--r--include/net/flow_offload.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index c6f7bd22db60..4e864c34a1b0 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -156,6 +156,16 @@ enum flow_action_mangle_base {
typedef void (*action_destr)(void *priv);
+struct flow_action_cookie {
+ u32 cookie_len;
+ u8 cookie[];
+};
+
+struct flow_action_cookie *flow_action_cookie_create(void *data,
+ unsigned int len,
+ gfp_t gfp);
+void flow_action_cookie_destroy(struct flow_action_cookie *cookie);
+
struct flow_action_entry {
enum flow_action_id id;
action_destr destructor;
@@ -214,6 +224,7 @@ struct flow_action_entry {
u8 ttl;
} mpls_mangle;
};
+ struct flow_action_cookie *cookie; /* user defined action cookie */
};
struct flow_action {