]> git.baikalelectronics.ru Git - kernel.git/commit
flow_offload: add support for packet-per-second policing
authorXingfeng Hu <xingfeng.hu@corigine.com>
Fri, 12 Mar 2021 14:08:29 +0000 (15:08 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Mar 2021 22:18:09 +0000 (14:18 -0800)
commit40d7e3ab479b0dd1e087d2c0b9f8390cfe1bc145
tree3a235a0eff104a16795b4fc5c5aa50130a6233ac
parenta8c2d75f723a119f7d22d7a250022d39709b9974
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>
include/net/flow_offload.h
include/net/tc_act/tc_police.h
net/sched/cls_api.c