[ovs-dev] [PATCH v15 0/7] Add offload support for sFlow

Eelco Chaudron echaudro at redhat.com
Fri Oct 1 09:35:43 UTC 2021


Hi Chris,

I just started to review this patchset, but as some of the v14 discussions have not finished, I’ll copy them over to v15. This way, all the open items are contained in a single thread/revision. I would suggest clear up the open items before you send a new revision.

This is only a visual review, as I did not test the code, assuming we need a new revision anyway with the test cases integrated.

Cheers,

Eelco


On 15 Sep 2021, at 14:43, Chris Mi wrote:

> This patch set adds offload support for sFlow.
>
> Psample is a genetlink channel for packet sampling. TC action act_sample
> uses psample to send sampled packets to userspace.
>
> When offloading sample action to TC, userspace creates a unique ID to
> map sFlow action and tunnel info and passes this ID to kernel instead
> of the sFlow info. psample will send this ID and sampled packet to
> userspace. Using the ID, userspace can recover the sFlow info and send
> sampled packet to the right sFlow monitoring host.
>
> v2-v1:
> - Fix robot errors.
> v3-v2:
> - Remove Gerrit Change-Id.
> - Add patch #9 to fix older kernels build issue.
> - Add travis test result.
> v4-v3:
> - Fix offload issue when sampling rate is 1.
> v5-v4:
> - Move polling thread from ofproto to netdev-offload-tc.
> v6-v5:
> - Rebase.
> - Add GitHub Actions test result.
> v7-v6:
> - Remove Gerrit Change-Id.
> - Fix "ERROR: Inappropriate spacing around cast"
> v8-v7
> - Address Eelco Chaudron's comment for patch #11.
> v9-v8
> - Remove sflow_len from struct dpif_sflow_attr.
> - Log a debug message for other userspace actions.
> v10-v9
> - Address Eelco Chaudron's comments on v9.
> v11-v10
> - Fix a bracing error.
> v12-v11
> - Add duplicate sample group id check.
> v13-v12
> - Remove the psample poll thread from netdev-offload-tc and reuse
>   ofproto handler thread according to Ilya's new desgin.
> - Add dpif-offload-provider layer according to Eli's suggestion.
> v14-v13
> - Fix a robot error.
> v15-v14
> - Address Eelco Chaudron's comments on v14.
>
> Chris Mi (7):
>   compat: Add psample and tc sample action defines for older kernels
>   ovs-kmod-ctl: Load kernel module psample
>   dpif-offload-provider: Introduce dpif-offload-provider layer
>   netdev-offload-tc: Introduce group ID management API
>   dpif-offload-netlink: Implement dpif-offload-provider API
>   ofproto: Introduce API to process sFlow offload packet
>   netdev-offload-tc: Add offload support for sFlow
>
>  NEWS                             |   1 +
>  include/linux/automake.mk        |   4 +-
>  include/linux/psample.h          |  62 +++++
>  include/linux/tc_act/tc_sample.h |  25 ++
>  lib/automake.mk                  |   3 +
>  lib/dpif-netdev.c                |   1 +
>  lib/dpif-netlink.c               |   2 +
>  lib/dpif-offload-netlink.c       | 208 ++++++++++++++
>  lib/dpif-offload-provider.h      |  75 +++++
>  lib/dpif-offload.c               |  43 +++
>  lib/dpif-provider.h              |   8 +-
>  lib/dpif.c                       |  10 +
>  lib/netdev-offload-tc.c          | 459 +++++++++++++++++++++++++++++--
>  lib/netdev-offload.h             |   1 +
>  lib/tc.c                         |  61 +++-
>  lib/tc.h                         |  16 +-
>  ofproto/ofproto-dpif-upcall.c    |  63 +++++
>  utilities/ovs-kmod-ctl.in        |  14 +
>  18 files changed, 1030 insertions(+), 26 deletions(-)
>  create mode 100644 include/linux/psample.h
>  create mode 100644 include/linux/tc_act/tc_sample.h
>  create mode 100644 lib/dpif-offload-netlink.c
>  create mode 100644 lib/dpif-offload-provider.h
>  create mode 100644 lib/dpif-offload.c
>
> -- 
> 2.27.0



More information about the dev mailing list