[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.21.1905031601050.11823@ehc-opti7040.uk.solarflarecom.com>
Date: Fri, 3 May 2019 16:03:11 +0100
From: Edward Cree <ecree@...arflare.com>
To: Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
"Pablo Neira Ayuso" <pablo@...filter.org>,
David Miller <davem@...emloft.net>
CC: netdev <netdev@...r.kernel.org>,
Cong Wang <xiyou.wangcong@...il.com>,
Andy Gospodarek <andy@...yhouse.net>,
Anjali Singhai Jain <anjali.singhai@...el.com>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Or Gerlitz <gerlitz.or@...il.com>
Subject: [RFC PATCH net-next 1/3] flow_offload: copy tcfa_index into
flow_action_entry
Required for support of shared counters (and possibly other shared per-
action entities in future).
Signed-off-by: Edward Cree <ecree@...arflare.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 d035183c8d03..6f59cdaf6eb6 100644
--- a/include/net/flow_offload.h
+++ b/include/net/flow_offload.h
@@ -135,6 +135,7 @@ enum flow_action_mangle_base {
struct flow_action_entry {
enum flow_action_id id;
+ u32 action_index;
union {
u32 chain_index; /* FLOW_ACTION_GOTO */
struct net_device *dev; /* FLOW_ACTION_REDIRECT */
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 263c2ec082c9..835f3129c24f 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3193,6 +3193,7 @@ int tc_setup_flow_action(struct flow_action *flow_action,
struct flow_action_entry *entry;
entry = &flow_action->entries[j];
+ entry->action_index = act->tcfa_index;
if (is_tcf_gact_ok(act)) {
entry->id = FLOW_ACTION_ACCEPT;
} else if (is_tcf_gact_shot(act)) {
Powered by blists - more mailing lists