mbox series

[ovs-dev,v8,0/9] Add support for ovs metering with tc offload

Message ID 20220708095533.32489-1-jianbol@nvidia.com
Headers show
Series Add support for ovs metering with tc offload | expand

Message

Jianbo Liu July 8, 2022, 9:55 a.m. UTC
This series is to add support for tc offloading of ovs metering, and
enhance OVS to use new kernel feature which offload tc police action to
hardware.
To do the offloading, new APIs for meter are added in netdev-offload,
and OVS meters are mapped to tc police actions with one-to-one
relationship for dpif-netlink.

Notes:
    v8
    - Small change to use memset.

    v7
    - Rework howto doc with Eelco's help.
    - other misc changes after review.

    v6
    - Add howto doc for meter offload.
    - other misc changes after review.

    v5
    - Add the stats of dropped packets.
    - Enhance meter tests.
    - other misc changes.

    v4
    - Move meter offload API to netdev_flow_api.
    - Add tests to check if meter is offloaded.
    - Modify NEWS.

    v3
    - Add netdev-offload APIs for meter.
    - Move the implementation to lower netdev-offload-tc layer.

    v2
    - Move tc police parse call from last patch to 2nd patch.
      2nd patch is adding the parse lib func and add the call to it in
that patch.
      Last patch is the put of tc police act.
      In 2nd patch also add empty switch case for tc police act put as
the impl.
      is done in the last patch when support for put is being added.

Jianbo Liu (9):
  netdev-offload: Add meter offload API
  tc: Add support parsing tc police action
  netdev-linux: Refactor put police action netlink message
  netdev-linux: Add functions to manipulate tc police action
  netdev-offload-tc: Implement meter offload API for tc
  netdev-offload-tc: Cleanup police actions with reserved indexes on
    startup
  netdev-offload-tc: Offloading rules with police actions
  dpif-netlink: Offloading meter to tc police action
  doc: Add meter offload topic document

 Documentation/automake.mk          |   1 +
 Documentation/howto/index.rst      |   1 +
 Documentation/howto/tc-offload.rst | 114 ++++++++++
 NEWS                               |   2 +
 lib/dpif-netlink.c                 |  31 ++-
 lib/netdev-linux.c                 | 236 ++++++++++++++++----
 lib/netdev-linux.h                 |   6 +
 lib/netdev-offload-provider.h      |  27 +++
 lib/netdev-offload-tc.c            | 336 +++++++++++++++++++++++++++++
 lib/netdev-offload.c               |  59 +++++
 lib/netdev-offload.h               |   5 +
 lib/tc.c                           | 251 +++++++++++++++++----
 lib/tc.h                           |  14 ++
 tests/system-offloads-traffic.at   |  98 +++++++++
 14 files changed, 1098 insertions(+), 83 deletions(-)
 create mode 100644 Documentation/howto/tc-offload.rst

Comments

Simon Horman July 12, 2022, 7:19 a.m. UTC | #1
On Fri, Jul 08, 2022 at 09:55:24AM +0000, Jianbo Liu wrote:
> This series is to add support for tc offloading of ovs metering, and
> enhance OVS to use new kernel feature which offload tc police action to
> hardware.
> To do the offloading, new APIs for meter are added in netdev-offload,
> and OVS meters are mapped to tc police actions with one-to-one
> relationship for dpif-netlink.

...

Thanks everyone,

I've applied this to master for inclusion in v1.18.

- eb8ebf8c43b5 ("doc: Add meter offload topic document")
  https://github.com/openvswitch/ovs/commit/eb8ebf8c43b5
- 5660b89a309d ("dpif-netlink: Offloading meter to tc police action")
  https://github.com/openvswitch/ovs/commit/5660b89a309d
- 218304df186f ("netdev-offload-tc: Offloading rules with police actions")
  https://github.com/openvswitch/ovs/commit/218304df186f
- f6ed09ef55e0 ("netdev-offload-tc: Cleanup police actions with reserved indexes on startup")
  https://github.com/openvswitch/ovs/commit/f6ed09ef55e0
- 4c226944f7c5 ("netdev-offload-tc: Implement meter offload API for tc")
  https://github.com/openvswitch/ovs/commit/4c226944f7c5
- 5c039ddc64ff ("netdev-linux: Add functions to manipulate tc police action")
  https://github.com/openvswitch/ovs/commit/5c039ddc64ff
- ed2300cca0d3 ("netdev-linux: Refactor put police action netlink message")
  https://github.com/openvswitch/ovs/commit/ed2300cca0d3
- a9b8cdde69de ("tc: Add support parsing tc police action")
  https://github.com/openvswitch/ovs/commit/a9b8cdde69de
- 922b850f08b1 ("netdev-offload: Add meter offload API")
  https://github.com/openvswitch/ovs/commit/922b850f08b1