summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorAdrian Moreno <amorenoz@redhat.com>2024-07-04 10:56:52 +0200
committerJakub Kicinski <kuba@kernel.org>2024-07-05 17:45:46 -0700
commit093b0f366567aa3fed85c316f832607069202b23 (patch)
tree41e77bfea79f323c007f7389202d88fd4975a344 /include/net
parent064fbc4e9b5a6dbda7fe7b67dc7e9e95d31f8d75 (diff)
net: psample: add user cookie
Add a user cookie to the sample metadata so that sample emitters can provide more contextual information to samples. If present, send the user cookie in a new attribute: PSAMPLE_ATTR_USER_COOKIE. Reviewed-by: Michal Kubiak <michal.kubiak@intel.com> Acked-by: Eelco Chaudron <echaudro@redhat.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Signed-off-by: Adrian Moreno <amorenoz@redhat.com> Link: https://patch.msgid.link/20240704085710.353845-2-amorenoz@redhat.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/psample.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/psample.h b/include/net/psample.h
index 0509d2d6be67..2ac71260a546 100644
--- a/include/net/psample.h
+++ b/include/net/psample.h
@@ -25,6 +25,8 @@ struct psample_metadata {
out_tc_occ_valid:1,
latency_valid:1,
unused:5;
+ const u8 *user_cookie;
+ u32 user_cookie_len;
};
struct psample_group *psample_group_get(struct net *net, u32 group_num);