mbox series

[ovs-dev,v4,0/8] Add support for ovs metering with tc offload

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

Message

Jianbo Liu May 3, 2022, 3:08 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:
    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 (8):
  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

 NEWS                             |   2 +
 lib/dpif-netlink.c               |  31 +++-
 lib/netdev-linux.c               | 215 ++++++++++++++++++----
 lib/netdev-linux.h               |   6 +
 lib/netdev-offload-provider.h    |  15 ++
 lib/netdev-offload-tc.c          | 302 +++++++++++++++++++++++++++++++
 lib/netdev-offload.c             |  45 +++++
 lib/netdev-offload.h             |   8 +
 lib/tc.c                         | 164 +++++++++++++++++
 lib/tc.h                         |  14 ++
 tests/system-offloads-traffic.at |  12 ++
 11 files changed, 769 insertions(+), 45 deletions(-)

Comments

Simon Horman May 10, 2022, 7:23 a.m. UTC | #1
On Tue, May 03, 2022 at 03:08:28AM +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.

...

Hi Jianbo,

Thanks for revising the patchset.

My colleagues at Corigine have exercised this patchset and have verified
it for our test-cases.

Also, I have run the upstream test workflows over them, and they look good.

1. netdev-offload: Add meter offload API
   https://github.com/horms2/ovs/actions/runs/2267288971
2. tc: Add support parsing tc police action
   https://github.com/horms2/ovs/actions/runs/2267290094
3. netdev-linux: Refactor put police action netlink message
   https://github.com/horms2/ovs/actions/runs/2267290628
4. netdev-linux: Add functions to manipulate tc police action
   https://github.com/horms2/ovs/actions/runs/2267292208
5. netdev-offload-tc: Implement and register meter offload API for tc
   https://github.com/horms2/ovs/actions/runs/2267293408
6. netdev-offload-tc: Cleanup police actions with reserved indexes on startup
   https://github.com/horms2/ovs/actions/runs/2267293841
7. netdev-offload-tc: Offloading rules with police actions
   https://github.com/horms2/ovs/actions/runs/2267294499
8. dpif-netlink: Offloading meter to tc police action
   https://github.com/horms2/ovs/actions/runs/2267294940

I have also reviewed the patches, and with my OVS maintainer hat on, I'm
happy to apply them, and plan to do so in the coming days unless there are
objections.

Kind regards,
Simon
Eelco Chaudron May 10, 2022, 10:52 a.m. UTC | #2
On 10 May 2022, at 9:23, Simon Horman wrote:

> On Tue, May 03, 2022 at 03:08:28AM +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.
>
> ...
>
> Hi Jianbo,
>
> Thanks for revising the patchset.
>
> My colleagues at Corigine have exercised this patchset and have verified
> it for our test-cases.
>
> Also, I have run the upstream test workflows over them, and they look good.
>
> 1. netdev-offload: Add meter offload API
> https://github.com/horms2/ovs/actions/runs/2267288971
> 2. tc: Add support parsing tc police action
> https://github.com/horms2/ovs/actions/runs/2267290094
> 3. netdev-linux: Refactor put police action netlink message
> https://github.com/horms2/ovs/actions/runs/2267290628
> 4. netdev-linux: Add functions to manipulate tc police action
> https://github.com/horms2/ovs/actions/runs/2267292208
> 5. netdev-offload-tc: Implement and register meter offload API for tc
> https://github.com/horms2/ovs/actions/runs/2267293408
> 6. netdev-offload-tc: Cleanup police actions with reserved indexes on startup
> https://github.com/horms2/ovs/actions/runs/2267293841
> 7. netdev-offload-tc: Offloading rules with police actions
> https://github.com/horms2/ovs/actions/runs/2267294499
> 8. dpif-netlink: Offloading meter to tc police action
> https://github.com/horms2/ovs/actions/runs/2267294940
>
> I have also reviewed the patches, and with my OVS maintainer hat on, I'm
> happy to apply them, and plan to do so in the coming days unless there are
> objections.

Hi Simon/Jianbo,

I was on PTO for the last two weeks, and I wanted to take a look as some of this patch might collide with the following patch also online https://patchwork.ozlabs.org/project/openvswitch/list/?series=297328.

I hope to get some time late this week, or early next week. Would it be ok to hold off until my review?

Cheers,

Eelco

> Kind regards,
> Simon
>
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Simon Horman May 10, 2022, 1:44 p.m. UTC | #3
On Tue, May 10, 2022 at 12:52:58PM +0200, Eelco Chaudron wrote:
> 
> 
> On 10 May 2022, at 9:23, Simon Horman wrote:
> 
> > On Tue, May 03, 2022 at 03:08:28AM +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.
> >
> > ...
> >
> > Hi Jianbo,
> >
> > Thanks for revising the patchset.
> >
> > My colleagues at Corigine have exercised this patchset and have verified
> > it for our test-cases.
> >
> > Also, I have run the upstream test workflows over them, and they look good.
> >
> > 1. netdev-offload: Add meter offload API
> > https://github.com/horms2/ovs/actions/runs/2267288971
> > 2. tc: Add support parsing tc police action
> > https://github.com/horms2/ovs/actions/runs/2267290094
> > 3. netdev-linux: Refactor put police action netlink message
> > https://github.com/horms2/ovs/actions/runs/2267290628
> > 4. netdev-linux: Add functions to manipulate tc police action
> > https://github.com/horms2/ovs/actions/runs/2267292208
> > 5. netdev-offload-tc: Implement and register meter offload API for tc
> > https://github.com/horms2/ovs/actions/runs/2267293408
> > 6. netdev-offload-tc: Cleanup police actions with reserved indexes on startup
> > https://github.com/horms2/ovs/actions/runs/2267293841
> > 7. netdev-offload-tc: Offloading rules with police actions
> > https://github.com/horms2/ovs/actions/runs/2267294499
> > 8. dpif-netlink: Offloading meter to tc police action
> > https://github.com/horms2/ovs/actions/runs/2267294940
> >
> > I have also reviewed the patches, and with my OVS maintainer hat on, I'm
> > happy to apply them, and plan to do so in the coming days unless there are
> > objections.
> 
> Hi Simon/Jianbo,
> 
> I was on PTO for the last two weeks, and I wanted to take a look as some of this patch might collide with the following patch also online https://patchwork.ozlabs.org/project/openvswitch/list/?series=297328.
> 
> I hope to get some time late this week, or early next week. Would it be ok to hold off until my review?

Thanks Eelco,

that is fine from my perspective.