From 25660156f4cc4cf0cb55deda69f999dab554b750 Mon Sep 17 00:00:00 2001 From: Xingfeng Hu Date: Fri, 12 Mar 2021 15:08:29 +0100 Subject: flow_offload: add support for packet-per-second policing Allow flow_offload API to configure packet-per-second policing using rate and burst parameters. Dummy implementations of tcf_police_rate_pkt_ps() and tcf_police_burst_pkt() are supplied which return 0, the unconfigured state. This is to facilitate splitting the offload, driver, and TC code portion of this feature into separate patches with the aim of providing a logical flow for review. And the implementation of these helpers will be filled out by a follow-up patch. Signed-off-by: Xingfeng Hu Signed-off-by: Simon Horman Signed-off-by: Louis Peens Signed-off-by: David S. Miller --- net/sched/cls_api.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/sched') diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index e37556cc37ab..ca8e177bf31b 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c @@ -3661,6 +3661,9 @@ int tc_setup_flow_action(struct flow_action *flow_action, entry->police.burst = tcf_police_burst(act); entry->police.rate_bytes_ps = tcf_police_rate_bytes_ps(act); + entry->police.burst_pkt = tcf_police_burst_pkt(act); + 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)) { -- cgit v1.2.3