diff options
author | Baowen Zheng <baowen.zheng@corigine.com> | 2021-12-17 19:16:19 +0100 |
---|---|---|
committer | Vladimir Oltean <vladimir.oltean@nxp.com> | 2022-05-04 16:33:12 +0300 |
commit | 7c7f4606af8ad49c8df105254974af971afba1f3 (patch) | |
tree | 3a2052b2c9cc448e07e6daaf493c8b6b2ecc0fa3 /net | |
parent | 9669b39531de2056a0023cde6b6620405a00df53 (diff) |
flow_offload: add index to flow_action_entry structure
Add index to flow_action_entry structure and delete index from police and
gate child structure.
We make this change to offload tc action for driver to identify a tc
action.
Signed-off-by: Baowen Zheng <baowen.zheng@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 5a9959008fb63191538ab0f7800f4cf26afe7750)
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/sched/cls_api.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index cd44cac7fbcf..2f08e2d90b94 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3576,6 +3576,7 @@ int tc_setup_flow_action(struct flow_action *flow_action, goto err_out_locked; entry->hw_stats = tc_act_hw_stats(act->hw_stats); + entry->hw_index = act->tcfa_index; if (is_tcf_gact_ok(act)) { entry->id = FLOW_ACTION_ACCEPT; @@ -3667,7 +3668,6 @@ int tc_setup_flow_action(struct flow_action *flow_action, entry->police.rate_pkt_ps = tcf_police_rate_pkt_ps(act); entry->police.mtu = tcf_police_tcfp_mtu(act); - entry->police.index = act->tcfa_index; } else if (is_tcf_ct(act)) { entry->id = FLOW_ACTION_CT; entry->ct.action = tcf_ct_action(act); @@ -3706,7 +3706,6 @@ int tc_setup_flow_action(struct flow_action *flow_action, entry->priority = tcf_skbedit_priority(act); } else if (is_tcf_gate(act)) { entry->id = FLOW_ACTION_GATE; - entry->gate.index = tcf_gate_index(act); entry->gate.prio = tcf_gate_prio(act); entry->gate.basetime = tcf_gate_basetime(act); entry->gate.cycletime = tcf_gate_cycletime(act); |