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>
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user