[SRU][F:linux-bluefield][PATCH v2 1/5] UBUNTU: SAUCE: net/sched: Provide act to offload action
William Tu
witu at nvidia.com
Mon Apr 3 21:58:07 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>
---
v1->v2
- talked to Paul and he explained that this patch is to provide
interface for OFED and is an alternative to bring lots and lots
of upstream patches. This isn't used by upstream driver and so is
unused also in bluefield kernel.
External modules such as OFED can use it.
---
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 e9686f7e5cdf..d9e2e5d905ee 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -166,6 +166,7 @@ typedef void (*action_destr)(void *priv);
struct flow_action_entry {
enum flow_action_id id;
+ void *act;
action_destr destructor;
void *destructor_priv;
union {
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 5d933c9e9cc0..384a4d815849 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3518,6 +3518,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);
if (is_tcf_gact_ok(act)) {
entry->id = FLOW_ACTION_ACCEPT;
--
2.34.1
More information about the kernel-team
mailing list