[SRU][J:linux-bluefield][PATCH v4 01/10] UBUNTU: SAUCE: net/sched: Provide act to offload action
William Tu
witu at nvidia.com
Mon Jun 19 17:49:32 UTC 2023
From: Paul Blakey <paulb at nvidia.com>
BugLink: https://bugs.launchpad.net/bugs/2012571
To support act stats, provide the action instance
in flow offload operation. This instance will be
saved by drivers, and used to directly update the
stats on.
Signed-off-by: Paul Blakey <paulb at nvidia.com>
Signed-off-by: William Tu <witu at nvidia.com>
Reviewed-by: William Tu <witu at nvidia.com>
---
include/net/flow_offload.h | 1 +
net/sched/cls_api.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/net/flow_offload.h b/include/net/flow_offload.h
index 7a2b0223a02c..5cc43cf3e075 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -198,6 +198,7 @@ void flow_action_cookie_destroy(struct flow_action_cookie *cookie);
struct flow_action_entry {
enum flow_action_id id;
enum flow_action_hw_stats hw_stats;
+ void *act;
action_destr destructor;
void *destructor_priv;
union {
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 62ce6981942b..9574bf9037b9 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3571,6 +3571,7 @@ int tc_setup_flow_action(struct flow_action *flow_action,
struct flow_action_entry *entry;
entry = &flow_action->entries[j];
+ entry->act = act;
spin_lock_bh(&act->tcfa_lock);
err = tcf_act_get_cookie(entry, act);
if (err)
--
2.34.1
More information about the kernel-team
mailing list