Re: [ovs-dev] [PATCH v28 8/8] system-offloads-traffic.at: Add sFlow offload test cases

2023-06-18 Thread 0-day Robot
Bleep bloop. Greetings Chris Mi, I am a robot and I have tried out your patch. Thanks for your contribution. I encountered some error that I wasn't expecting. See the details below. checkpatch: WARNING: Line is 111 characters long (recommended limit is 79) #39 FILE:

[ovs-dev] [PATCH v28 6/8] dpif-netlink: Add netdev offload recv in normal recv upcalls

2023-06-18 Thread Chris Mi via dev
In thread handler 0, add netdev offload recv in normal recv upcalls. To avoid starvation, introduce a flag to alternate the order of receiving normal upcalls and offload upcalls based on that flag. Add similar change for recv_wait. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan ---

[ovs-dev] [PATCH v28 8/8] system-offloads-traffic.at: Add sFlow offload test cases

2023-06-18 Thread Chris Mi via dev
Add three sFlow offload test cases: 3: offloads - sflow with sampling=1 - offloads enabled ok 4: offloads - sflow with sampling=2 - offloads enabled ok 5: offloads - ping over vxlan tunnel with sflow - offloads enabled ok Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Acked-by: Eelco

[ovs-dev] [PATCH v28 7/8] netdev-offload-tc: Add offload support for sFlow

2023-06-18 Thread Chris Mi via dev
Create a unique group ID to map the sFlow info when offloading sample action to TC. When showing the offloaded datapath flows, translate the group ID from TC sample action to sFlow info using the mapping. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- lib/netdev-offload-tc.c | 288

[ovs-dev] [PATCH v28 5/8] netdev-offload: Add netdev offload recv and recv_wait APIs

2023-06-18 Thread Chris Mi via dev
Iterate each registered offload API. It's not a problem for today since we only have one implementation. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- lib/netdev-offload.c | 38 ++ lib/netdev-offload.h | 5 + 2 files changed, 43 insertions(+) diff

[ovs-dev] [PATCH v28 4/8] netdev-offload-tc: Add sample offload API for TC

2023-06-18 Thread Chris Mi via dev
Initialize psample socket. Add sample recv API to receive sampled packets from psample socket. Add sample recv wait API to add psample socket fd to poll list. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan --- lib/dpif.h| 6 +- lib/flow.h| 2 +-

[ovs-dev] [PATCH v28 2/8] ovs-kmod-ctl: Load kernel module psample

2023-06-18 Thread Chris Mi via dev
Load kernel module psample to receive sampled packets from TC. Before removing kernel module psample, remove act_sample first. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Acked-by: Eelco Chaudron --- utilities/ovs-kmod-ctl.in | 14 ++ 1 file changed, 14 insertions(+) diff

[ovs-dev] [PATCH v28 1/8] compat: Add psample and tc sample action defines for older kernels

2023-06-18 Thread Chris Mi via dev
Update kernel UAPI to support psample and the tc sample action. Signed-off-by: Chris Mi Reviewed-by: Roi Dayan Acked-by: Eelco Chaudron --- include/linux/automake.mk| 10 +++--- include/linux/psample.h | 62 include/linux/tc_act/tc_sample.h |

[ovs-dev] [PATCH v28 3/8] netdev-offload-tc: Introduce group ID management API

2023-06-18 Thread Chris Mi via dev
When offloading sample action to TC, userspace creates a unique ID to map sample action and tunnel info and passes this ID to kernel instead of the sample info. Kernel will send this ID and sampled packet to userspace. Using the ID, userspace can recover the sample info and send sampled packet to

[ovs-dev] [PATCH v28 0/8] Add offload support for sFlow

2023-06-18 Thread Chris Mi via dev
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

Re: [ovs-dev] [PATCH v27 7/8] netdev-offload-tc: Add offload support for sFlow

2023-06-18 Thread Chris Mi via dev
+if (err) { +VLOG_ERR_RL(_rl, "No OVS_ACTION_ATTR_USERSPACE attribute"); +} +return err; +} + +static void +offload_sample_init(struct offload_sample *sample, +const struct nlattr *next_actions, +size_t next_actions_len, +

Re: [ovs-dev] [PATCH v27 0/8] Add offload support for sFlow

2023-06-18 Thread Chris Mi via dev
On 6/16/2023 10:24 PM, Eelco Chaudron wrote: On 1 Jun 2023, at 13:16, 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

[ovs-dev] [PATCH v5 4/4] netdev-dpdk: Add support for ingress packet-per-second policing.

2023-06-18 Thread miterv
From: Lin Huang OvS has supported packet-per-second policer which can be set at ingress and egress side in kernel datapath. But the userspace datapath dosen't support for ingress and egress packet-per-second policing now. So, this patch add support for userspace ingress pps policing by using

[ovs-dev] [PATCH v5 1/4] token-bucket: Make token-bucket timestamp updated by caller.

2023-06-18 Thread miterv
From: Lin Huang Now, token-bucket 'last_fill' is updated by token_bucket_withdraw() itself. Add a new function parameter 'now' to update timestamp by caller. Signed-off-by: Lin Huang --- include/openvswitch/token-bucket.h | 3 ++- lib/token-bucket.c | 4 ++-- lib/vlog.c

[ovs-dev] [PATCH v5 3/4] netdev-dpdk: Add support for egress packet-per-second policing.

2023-06-18 Thread miterv
From: Lin Huang OvS has supported packet-per-second policer which can be set at ingress and egress side in kernel datapath. But the userspace datapath doesn't support for ingress and egress packet-per-second policing now. So, this patch add support for userspace egress pps policing by using

[ovs-dev] [PATCH v5 2/4] netdev-dpdk: make srtcm_policer not to free pkts.

2023-06-18 Thread miterv
From: Lin Huang Now srtcm_policer will free pkts, if packets are exceed rate limit. This patch change srtcm_policer not to free pkts, just count dropped packets. Signed-off-by: Lin Huang --- lib/netdev-dpdk.c | 21 +++-- 1 file changed, 7 insertions(+), 14 deletions(-) diff

[ovs-dev] [PATCH v5 0/4] netdev-dpdk: Add support for userspace port-based packet-per-second policing.

2023-06-18 Thread miterv
From: Lin Huang v5->v4: police pkts bps and pps at the same time. Get the maximum from the number of dropped packets, and drop that. v4->v3: rewrite egress_policer_details_to_param func. add a new pkts_policer_profile_config func. v2->v3: police and free pkts by bulk.

[ovs-dev] [PATCH ovn 3/3] northd: Incremental processing of VIF updates and deletions in 'lflow' node.

2023-06-18 Thread Han Zhou
This patch achieves zero recompute for VIF updates and deletions in common scenarios. The performance gain for these scenarios is similar to the patch "northd: Incremental processing of VIF additions in 'lflow' node." Signed-off-by: Han Zhou --- northd/northd.c | 231

[ovs-dev] [PATCH ovn 2/3] northd.c: Maintain links between ovn_port and lflow.

2023-06-18 Thread Han Zhou
For incremental processing, it is important to maintain relationship between the inputs and the logical flows generated. This patch creates the links between ovn_port and logical flows. The same data structure may be expanded to maintain links between logical flows and other types of inputs. This

[ovs-dev] [PATCH ovn 1/3] northd.c: Generate and maintain SB lflow uuid in ovn_lflow.

2023-06-18 Thread Han Zhou
For incremental processing, we need to maintain SB lflow uuids in northd. For this reason, we generate the row uuid when creating the Logical_Flow record in SB DB, rather than waiting for SB DB to populate back. Signed-off-by: Han Zhou --- northd/northd.c | 12 ++-- 1 file changed, 10

[ovs-dev] [PATCH ovn 0/3] ovn-northd incremental processing for VIF udpates and deletions end-to-end.

2023-06-18 Thread Han Zhou
This series closes the gaps of ovn-northd incremental processing for VIF updates and deletions, with the help of the changes that maintain lflow uuids and the link between lflows and the input ovn_ports. Han Zhou (3): northd.c: Generate and maintain SB lflow uuid in ovn_lflow. northd.c: