netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing
@ 2021-03-12 14:08 Simon Horman
  2021-03-12 14:08 ` [PATCH v3 net-next 1/3] flow_offload: " Simon Horman
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Simon Horman @ 2021-03-12 14:08 UTC (permalink / raw)
  To: David Miller, Jakub Kicinski
  Cc: netdev, oss-drivers, Xingfeng Hu, Baowen Zheng, Louis Peens,
	Simon Horman

This series enhances the TC policer action implementation to allow a
policer action instance to enforce a rate-limit based on
packets-per-second, configurable using a packet-per-second rate and burst
parameters.

In the hope of aiding review this is broken up into three patches.

* [PATCH 1/3] flow_offload: add support for packet-per-second policing

  Add support for this feature to the flow_offload API that is used to allow
  programming flows, including TC rules and their actions, into hardware.

* [PATCH 2/3] flow_offload: reject configuration of packet-per-second policing in offload drivers

  Teach all exiting users of the flow_offload API that allow offload of
  policer action instances to reject offload if packet-per-second rate
  limiting is configured: none support it at this time

* [PATCH 3/3] net/sched: act_police: add support for packet-per-second policing

  With the above ground-work in place add the new feature to the TC policer
  action itself

With the above in place the feature may be used.

As follow-ups we plan to provide:
* Corresponding updates to iproute2
* Corresponding self tests (which depend on the iproute2 changes)
* Hardware offload support for the NFP driver

Key changes since v2:
* Added patches 1 and 2, which makes adding patch 3 safe for existing
  hardware offload of the policer action
* Re-worked patch 3 so that a TC policer action instance may be configured
  for packet-per-second or byte-per-second rate limiting, but not both.
* Corrected kdoc usage

Baowen Zheng (2):
  flow_offload: reject configuration of packet-per-second policing in
    offload drivers
  net/sched: act_police: add support for packet-per-second policing

Xingfeng Hu (1):
  flow_offload: add support for packet-per-second policing

 drivers/net/dsa/sja1105/sja1105_flower.c      |  6 ++
 .../chelsio/cxgb4/cxgb4_tc_matchall.c         | 11 ++-
 .../net/ethernet/freescale/enetc/enetc_qos.c  |  5 ++
 .../net/ethernet/mellanox/mlx5/core/en_tc.c   |  4 +
 .../ethernet/mellanox/mlxsw/spectrum_flower.c |  5 ++
 drivers/net/ethernet/mscc/ocelot_flower.c     |  5 ++
 drivers/net/ethernet/mscc/ocelot_net.c        |  6 ++
 .../ethernet/netronome/nfp/flower/qos_conf.c  |  5 ++
 include/net/flow_offload.h                    |  2 +
 include/net/sch_generic.h                     | 14 ++++
 include/net/tc_act/tc_police.h                | 52 +++++++++++++
 include/uapi/linux/pkt_cls.h                  |  2 +
 net/sched/act_police.c                        | 59 +++++++++++++--
 net/sched/cls_api.c                           |  3 +
 net/sched/sch_generic.c                       | 75 ++++++++++++-------
 15 files changed, 221 insertions(+), 33 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-03-16 16:40 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 14:08 [PATCH v3 net-next 0/3] net/sched: act_police: add support for packet-per-second policing Simon Horman
2021-03-12 14:08 ` [PATCH v3 net-next 1/3] flow_offload: " Simon Horman
2021-03-12 14:08 ` [PATCH v3 net-next 2/3] flow_offload: reject configuration of packet-per-second policing in offload drivers Simon Horman
2021-03-12 14:08 ` [PATCH v3 net-next 3/3] net/sched: act_police: add support for packet-per-second policing Simon Horman
2021-03-12 14:22 ` [PATCH v3 net-next 0/3] " Simon Horman
2021-03-16 13:53   ` Jamal Hadi Salim
2021-03-16 16:40     ` Simon Horman
2021-03-13 22:40 ` patchwork-bot+netdevbpf
2021-03-14  8:17 ` Ido Schimmel
2021-03-15 14:41   ` Simon Horman
2021-03-16  8:35     ` Ido Schimmel
2021-03-16 10:42       ` Simon Horman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).