mbox series

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

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

Message

Jianbo Liu July 2, 2022, 3:18 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:
    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 |  75 +++++++
 NEWS                               |   2 +
 lib/dpif-netlink.c                 |  31 ++-
 lib/netdev-linux.c                 | 233 ++++++++++++++++----
 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, 1056 insertions(+), 83 deletions(-)
 create mode 100644 Documentation/howto/tc-offload.rst

Comments

Eelco Chaudron July 7, 2022, 11:54 a.m. UTC | #1
On 2 Jul 2022, at 5:18, 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.

Just completed the review of v6 and sent out some minor comments.
If you could quickly send a v7, I’ll review and ack them as I’ll keep my test setup ready.

//Eelco
Jianbo Liu July 8, 2022, 2:25 a.m. UTC | #2
On Thu, 2022-07-07 at 13:54 +0200, Eelco Chaudron wrote:
> 
> 
> On 2 Jul 2022, at 5:18, 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.
> 
> Just completed the review of v6 and sent out some minor comments.
> If you could quickly send a v7, I’ll review and ack them as I’ll keep
> my test setup ready.
> 

Sorry I missed your email yesterday because I got off work (we are in
different time zone). Hope you still keep the setup.
I will send v7 soon, and you can test as sson as you start working.
Thanks!

> //Eelco
>
Eelco Chaudron July 8, 2022, 9:32 a.m. UTC | #3
On 8 Jul 2022, at 4:25, Jianbo Liu wrote:

> On Thu, 2022-07-07 at 13:54 +0200, Eelco Chaudron wrote:
>>
>>
>> On 2 Jul 2022, at 5:18, 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.
>>
>> Just completed the review of v6 and sent out some minor comments.
>> If you could quickly send a v7, I’ll review and ack them as I’ll keep
>> my test setup ready.
>>
>
> Sorry I missed your email yesterday because I got off work (we are in
> different time zone). Hope you still keep the setup.
> I will send v7 soon, and you can test as sson as you start working.
> Thanks!

No problem, I kept the setup ready and your v7 works fine. I have one small nit/change request but the rest looks good. If you sent out a v8 with this change, to me the series is ok for merge.

//Eelco
Jianbo Liu July 8, 2022, 9:58 a.m. UTC | #4
On Fri, 2022-07-08 at 11:32 +0200, Eelco Chaudron wrote:
> 
> 
> On 8 Jul 2022, at 4:25, Jianbo Liu wrote:
> 
> > On Thu, 2022-07-07 at 13:54 +0200, Eelco Chaudron wrote:
> > > 
> > > 
> > > On 2 Jul 2022, at 5:18, 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.
> > > 
> > > Just completed the review of v6 and sent out some minor comments.
> > > If you could quickly send a v7, I’ll review and ack them as I’ll
> > > keep
> > > my test setup ready.
> > > 
> > 
> > Sorry I missed your email yesterday because I got off work (we are
> > in
> > different time zone). Hope you still keep the setup.
> > I will send v7 soon, and you can test as sson as you start working.
> > Thanks!
> 
> No problem, I kept the setup ready and your v7 works fine. I have one
> small nit/change request but the rest looks good. If you sent out a
> v8 with this change, to me the series is ok for merge.
> 

Done. Thank you very much. :)

> //Eelco
>
Eelco Chaudron July 8, 2022, 10:19 a.m. UTC | #5
On 8 Jul 2022, at 11:58, Jianbo Liu wrote:

> On Fri, 2022-07-08 at 11:32 +0200, Eelco Chaudron wrote:
>>
>>
>> On 8 Jul 2022, at 4:25, Jianbo Liu wrote:
>>
>>> On Thu, 2022-07-07 at 13:54 +0200, Eelco Chaudron wrote:
>>>>
>>>>
>>>> On 2 Jul 2022, at 5:18, 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.
>>>>
>>>> Just completed the review of v6 and sent out some minor comments.
>>>> If you could quickly send a v7, I’ll review and ack them as I’ll
>>>> keep
>>>> my test setup ready.
>>>>
>>>
>>> Sorry I missed your email yesterday because I got off work (we are
>>> in
>>> different time zone). Hope you still keep the setup.
>>> I will send v7 soon, and you can test as sson as you start working.
>>> Thanks!
>>
>> No problem, I kept the setup ready and your v7 works fine. I have one
>> small nit/change request but the rest looks good. If you sent out a
>> v8 with this change, to me the series is ok for merge.
>>
>
> Done. Thank you very much. :)

Thank you! I’ve explicitly ACKed patch 4, so it’s clear I’m done with the review and happy!

Time for weekend ;)


//Eelco