summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorPo Liu <Po.Liu@nxp.com>2020-06-24 17:36:30 +0800
committerDavid S. Miller <davem@davemloft.net>2020-06-24 22:04:26 -0700
commit627e39b1399e72e53895eec6bbec30199ed43de2 (patch)
tree104ee4d3e279848e839947ad1eb93fcb9d20e6bd /net/sched
parent89d1f0966997d5bbe510dbdb10a5c26c0e567b03 (diff)
downloadlinux-627e39b1399e72e53895eec6bbec30199ed43de2.tar.gz
linux-627e39b1399e72e53895eec6bbec30199ed43de2.tar.bz2
linux-627e39b1399e72e53895eec6bbec30199ed43de2.zip
net: qos: police action add index for tc flower offloading
Hardware device may include more than one police entry. Specifying the action's index make it possible for several tc filters to share the same police action when installing the filters. Propagate this index to device drivers through the flow offload intermediate representation, so that drivers could share a single hardware policer between multiple filters. v1->v2 changes: - Update the commit message suggest by Ido Schimmel <idosch@idosch.org> Signed-off-by: Po Liu <Po.Liu@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/cls_api.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
index 6aba7d5ba1ec..fdc4c89ca1fa 100644
--- a/net/sched/cls_api.c
+++ b/net/sched/cls_api.c
@@ -3659,6 +3659,7 @@ int tc_setup_flow_action(struct flow_action *flow_action,
entry->police.rate_bytes_ps =
tcf_police_rate_bytes_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);