summaryrefslogtreecommitdiffstats
path: root/include/net/tc_act
diff options
context:
space:
mode:
authorXingfeng Hu <xingfeng.hu@corigine.com>2021-03-12 15:08:29 +0100
committerDavid S. Miller <davem@davemloft.net>2021-03-13 14:18:09 -0800
commit25660156f4cc4cf0cb55deda69f999dab554b750 (patch)
tree3a235a0eff104a16795b4fc5c5aa50130a6233ac /include/net/tc_act
parent4849d9beb8c9dc2cc6ebd5d6f1eead944e1a52cf (diff)
downloadlinux-25660156f4cc4cf0cb55deda69f999dab554b750.tar.bz2
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 <xingfeng.hu@corigine.com> Signed-off-by: Simon Horman <simon.horman@netronome.com> Signed-off-by: Louis Peens <louis.peens@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tc_act')
-rw-r--r--include/net/tc_act/tc_police.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/net/tc_act/tc_police.h b/include/net/tc_act/tc_police.h
index 6d1e26b709b5..ae117f7937d5 100644
--- a/include/net/tc_act/tc_police.h
+++ b/include/net/tc_act/tc_police.h
@@ -97,6 +97,18 @@ static inline u32 tcf_police_burst(const struct tc_action *act)
return burst;
}
+static inline u64 tcf_police_rate_pkt_ps(const struct tc_action *act)
+{
+ /* Not implemented */
+ return 0;
+}
+
+static inline u32 tcf_police_burst_pkt(const struct tc_action *act)
+{
+ /* Not implemented */
+ return 0;
+}
+
static inline u32 tcf_police_tcfp_mtu(const struct tc_action *act)
{
struct tcf_police *police = to_police(act);