On 1 Mar 2023, at 8:22, 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.

I started to review, but the test cases are failing in my setups. Maybe you 
need to re-base your build as some stuff has changed related to flow statistic 
updates.

On RHEL9/Fedora 37:

  3: sflow offloads with sampling=1 - ping between two ports - offloads enabled 
FAILED (system-offloads-traffic.at:133)
  4: sflow offloads with sampling=2 - ping between two ports - offloads enabled 
FAILED (system-offloads-traffic.at:191)


3:

./system-offloads-traffic.at:133: ovs-appctl dpctl/dump-flows type=tc,offloaded 
| grep "in_port(2)" | grep "eth_type(0x0800)" | grep "actions:userspace" | grep 
"sFlow" | sed -e "s/used:[0-9].[0-9]*s/used:0.001s/;s/eth(src=[a-z0-9:]*,dst=
[a-z0-9:]*)/eth(macs)/;s/pid=[0-9]*/pid=1/;s/output=$P1_IFINDEX/output=1/"
--- -   2023-03-10 12:59:37.008456662 +0100
+++ 
/root/Documents/reviews/ovs_cmi_tc_sflow/OVS_master_DPDK_v22.11/ovs_github/tests/system-offloads-testsuite.dir/at-groups/3/stdout
   2023-03-10 12:59:37.007186662 +0100
@@ -1,2 +1,2 @@
-recirc_id(0),in_port(2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:10, 
bytes:840, used:0.001s, 
actions:userspace(pid=1,sFlow(vid=0,pcp=0,output=1),actions),3
+recirc_id(0),in_port(2),eth(macs),eth_type(0x0800),ipv4(frag=no), packets:19, 
bytes:1596, used:0.001s, 
actions:userspace(pid=1,sFlow(vid=0,pcp=0,output=1),actions),3


4:

./system-offloads-traffic.at:191: check_logs
--- /dev/null   2023-03-08 13:28:57.628323765 +0100
+++ 
/root/Documents/reviews/ovs_cmi_tc_sflow/OVS_master_DPDK_v22.11/ovs_github/tests/system-offloads-testsuite.dir/at-groups/4/stdout
   2023-03-10 13:04:47.167727980 +0100
@@ -0,0 +1 @@
+2023-03-10T12:04:35.938Z|00001|dpif(handler1)|WARN|system@ovs-system: recv 
failed (No such file or directory)


On Fedora 37:

  3: sflow offloads with sampling=1 - ping between two ports - offloads enabled 
FAILED (system-offloads-traffic.at:133)
  4: sflow offloads with sampling=2 - ping between two ports - offloads enabled 
FAILED (system-offloads-traffic.at:191)


//Eelco

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to