Re: [ovs-dev] [PATCH v5 9/9] system-offloads-traffic.at: Add vxlan gbp offload test
On 25/06/2023 7:04, Gavin Li wrote: > > On 6/23/2023 7:06 PM, Simon Horman wrote: >> External email: Use caution opening links or attachments >> >> >> On Fri, Jun 23, 2023 at 01:01:38PM +0200, Eelco Chaudron wrote: >>> >>> On 23 Jun 2023, at 12:57, Simon Horman wrote: >>> On Fri, Jun 23, 2023 at 11:16:50AM +0200, Eelco Chaudron wrote: > > On 19 Jun 2023, at 13:56, Roi Dayan wrote: > >> From: Gavin Li >> >> Add a vxlan gbp offload test case: >> >> vxlan offloads with gbp extention - ping between two ports - offloads >> enabled ok >> >> Signed-off-by: Gavin Li >> Reviewed-by: Roi Dayan >> Reviewed-by: Simon Horman >> --- > Thanks for adding the test, however, there is one problem. If the kernel > does not support this feature the test is not skipped but errors out. > > I’ve added some comments inline below. Hi Eelco, I take it that this means we would like to see a v6? >>> Yes, when I looked at this briefly I thought we should be good with v5 and >>> the nits. But then I tested this without kernel support. >> Ack, I've marked it as changes requested in patchwork. >> >> Roi, sorry to have to ask for v6 but >> I think we are pretty close on this one. > ACK thanks for all the review! ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v5 9/9] system-offloads-traffic.at: Add vxlan gbp offload test
On 6/23/2023 7:06 PM, Simon Horman wrote: External email: Use caution opening links or attachments On Fri, Jun 23, 2023 at 01:01:38PM +0200, Eelco Chaudron wrote: On 23 Jun 2023, at 12:57, Simon Horman wrote: On Fri, Jun 23, 2023 at 11:16:50AM +0200, Eelco Chaudron wrote: On 19 Jun 2023, at 13:56, Roi Dayan wrote: From: Gavin Li Add a vxlan gbp offload test case: vxlan offloads with gbp extention - ping between two ports - offloads enabled ok Signed-off-by: Gavin Li Reviewed-by: Roi Dayan Reviewed-by: Simon Horman --- Thanks for adding the test, however, there is one problem. If the kernel does not support this feature the test is not skipped but errors out. I’ve added some comments inline below. Hi Eelco, I take it that this means we would like to see a v6? Yes, when I looked at this briefly I thought we should be good with v5 and the nits. But then I tested this without kernel support. Ack, I've marked it as changes requested in patchwork. Roi, sorry to have to ask for v6 but I think we are pretty close on this one. ACK ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v5 9/9] system-offloads-traffic.at: Add vxlan gbp offload test
On 6/23/2023 5:16 PM, Eelco Chaudron wrote: External email: Use caution opening links or attachments On 19 Jun 2023, at 13:56, Roi Dayan wrote: From: Gavin Li Add a vxlan gbp offload test case: vxlan offloads with gbp extention - ping between two ports - offloads enabled ok Signed-off-by: Gavin Li Reviewed-by: Roi Dayan Reviewed-by: Simon Horman --- Thanks for adding the test, however, there is one problem. If the kernel does not support this feature the test is not skipped but errors out. I’ve added some comments inline below. Cheers, Eelco ACK tests/system-offloads-traffic.at | 49 1 file changed, 49 insertions(+) diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at index ae302a29499a..cabbcfbd168f 100644 --- a/tests/system-offloads-traffic.at +++ b/tests/system-offloads-traffic.at @@ -805,3 +805,52 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/could not open network device ovs-p0/d /failed to offload flow/d "]) AT_CLEANUP + +AT_SETUP([offloads - ping over vxlan tunnel with gbp - offloads enabled]) +OVS_CHECK_TUNNEL_TSO() +OVS_CHECK_VXLAN() + +OVS_TRAFFIC_VSWITCHD_START([], [], [-- set Open_vSwitch . other_config:hw-offload=true]) +ADD_BR([br-underlay]) + +AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"]) + +ADD_NAMESPACES(at_ns0) + +dnl Set up underlay link from host into the namespace using veth pair. +ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24") +AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"]) +AT_CHECK([ip link set dev br-underlay up]) + +dnl Set up tunnel endpoints on OVS outside the namespace and with a native +dnl linux device inside the namespace. +ADD_OVS_TUNNEL([vxlan], [br0], [at_vxlan0], [172.31.1.1], [10.1.1.100/24], [options:exts=gbp]) +AT_CHECK([ovs-ofctl add-flow br0 "in_port=br0 actions=load:0x200->NXM_NX_TUN_GBP_ID[], output:at_vxlan0]") +AT_CHECK([ovs-ofctl add-flow br0 "in_port=at_vxlan0, tun_gbp_id=512 actions=output:br0"]) +AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) + +ADD_NATIVE_TUNNEL([vxlan], [at_vxlan1], [at_ns0], [172.31.1.100], [10.1.1.1/24], + [id 0 dstport 4789 gbp]) +NS_CHECK_EXEC([at_ns0], [iptables -I OUTPUT -p ip -j MARK --set-mark 512 2>/dev/null], [0]) +NS_CHECK_EXEC([at_ns0], [iptables -I INPUT -m mark --mark 512 -j ACCEPT 2>/dev/null], [0], [ignore]) + + dnl First, check the underlay. ACK +NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl +3 packets transmitted, 3 received, 0% packet loss, time 0ms +]) + +dnl Okay, now check the overlay with different packet sizes End the sentence with a dot, but also the comment on different packet sizes does not make sense. + dnl Okay, now check the overlay. ACK +NS_CHECK_EXEC([at_ns0], [ping -q -c 1000 -i 0.01 10.1.1.100 | FORMAT_PING], [0], [dnl +1000 packets transmitted, 1000 received, 0% packet loss, time 0ms +]) + +AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep "eth_type(0x0800)" | grep "tp_dst=4789,vxlan(gbp(id=512))" | wc -l], [0], [dnl +1 +]) +AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep "eth_type(0x0800)" | grep "tp_dst=4789,vxlan(gbp(id=512,flags=0))" | wc -l], [0], [dnl +1 +]) + +dnl First, check the underlay Guess this comment was left behind and had to be moved up (plus a dot :). ACK +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + -- 2.38.0 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v5 9/9] system-offloads-traffic.at: Add vxlan gbp offload test
On Fri, Jun 23, 2023 at 01:01:38PM +0200, Eelco Chaudron wrote: > > > On 23 Jun 2023, at 12:57, Simon Horman wrote: > > > On Fri, Jun 23, 2023 at 11:16:50AM +0200, Eelco Chaudron wrote: > >> > >> > >> On 19 Jun 2023, at 13:56, Roi Dayan wrote: > >> > >>> From: Gavin Li > >>> > >>> Add a vxlan gbp offload test case: > >>> > >>> vxlan offloads with gbp extention - ping between two ports - offloads > >>> enabled ok > >>> > >>> Signed-off-by: Gavin Li > >>> Reviewed-by: Roi Dayan > >>> Reviewed-by: Simon Horman > >>> --- > >> > >> Thanks for adding the test, however, there is one problem. If the kernel > >> does not support this feature the test is not skipped but errors out. > >> > >> I’ve added some comments inline below. > > > > Hi Eelco, > > > > I take it that this means we would like to see a v6? > > Yes, when I looked at this briefly I thought we should be good with v5 and > the nits. But then I tested this without kernel support. Ack, I've marked it as changes requested in patchwork. Roi, sorry to have to ask for v6 but I think we are pretty close on this one. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v5 9/9] system-offloads-traffic.at: Add vxlan gbp offload test
On 23 Jun 2023, at 12:57, Simon Horman wrote: > On Fri, Jun 23, 2023 at 11:16:50AM +0200, Eelco Chaudron wrote: >> >> >> On 19 Jun 2023, at 13:56, Roi Dayan wrote: >> >>> From: Gavin Li >>> >>> Add a vxlan gbp offload test case: >>> >>> vxlan offloads with gbp extention - ping between two ports - offloads >>> enabled ok >>> >>> Signed-off-by: Gavin Li >>> Reviewed-by: Roi Dayan >>> Reviewed-by: Simon Horman >>> --- >> >> Thanks for adding the test, however, there is one problem. If the kernel >> does not support this feature the test is not skipped but errors out. >> >> I’ve added some comments inline below. > > Hi Eelco, > > I take it that this means we would like to see a v6? Yes, when I looked at this briefly I thought we should be good with v5 and the nits. But then I tested this without kernel support. //Eelco ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v5 9/9] system-offloads-traffic.at: Add vxlan gbp offload test
On Fri, Jun 23, 2023 at 11:16:50AM +0200, Eelco Chaudron wrote: > > > On 19 Jun 2023, at 13:56, Roi Dayan wrote: > > > From: Gavin Li > > > > Add a vxlan gbp offload test case: > > > > vxlan offloads with gbp extention - ping between two ports - offloads > > enabled ok > > > > Signed-off-by: Gavin Li > > Reviewed-by: Roi Dayan > > Reviewed-by: Simon Horman > > --- > > Thanks for adding the test, however, there is one problem. If the kernel does > not support this feature the test is not skipped but errors out. > > I’ve added some comments inline below. Hi Eelco, I take it that this means we would like to see a v6? ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH v5 9/9] system-offloads-traffic.at: Add vxlan gbp offload test
On 19 Jun 2023, at 13:56, Roi Dayan wrote: > From: Gavin Li > > Add a vxlan gbp offload test case: > > vxlan offloads with gbp extention - ping between two ports - offloads > enabled ok > > Signed-off-by: Gavin Li > Reviewed-by: Roi Dayan > Reviewed-by: Simon Horman > --- Thanks for adding the test, however, there is one problem. If the kernel does not support this feature the test is not skipped but errors out. I’ve added some comments inline below. Cheers, Eelco > tests/system-offloads-traffic.at | 49 > 1 file changed, 49 insertions(+) > > diff --git a/tests/system-offloads-traffic.at > b/tests/system-offloads-traffic.at > index ae302a29499a..cabbcfbd168f 100644 > --- a/tests/system-offloads-traffic.at > +++ b/tests/system-offloads-traffic.at > @@ -805,3 +805,52 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/could not open network > device ovs-p0/d > /failed to offload flow/d > "]) > AT_CLEANUP > + > +AT_SETUP([offloads - ping over vxlan tunnel with gbp - offloads enabled]) > +OVS_CHECK_TUNNEL_TSO() > +OVS_CHECK_VXLAN() > + > +OVS_TRAFFIC_VSWITCHD_START([], [], [-- set Open_vSwitch . > other_config:hw-offload=true]) > +ADD_BR([br-underlay]) > + > +AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"]) > + > +ADD_NAMESPACES(at_ns0) > + > +dnl Set up underlay link from host into the namespace using veth pair. > +ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24") > +AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"]) > +AT_CHECK([ip link set dev br-underlay up]) > + > +dnl Set up tunnel endpoints on OVS outside the namespace and with a native > +dnl linux device inside the namespace. > +ADD_OVS_TUNNEL([vxlan], [br0], [at_vxlan0], [172.31.1.1], [10.1.1.100/24], > [options:exts=gbp]) > +AT_CHECK([ovs-ofctl add-flow br0 "in_port=br0 > actions=load:0x200->NXM_NX_TUN_GBP_ID[], output:at_vxlan0]") > +AT_CHECK([ovs-ofctl add-flow br0 "in_port=at_vxlan0, tun_gbp_id=512 > actions=output:br0"]) > +AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) > + > +ADD_NATIVE_TUNNEL([vxlan], [at_vxlan1], [at_ns0], [172.31.1.100], > [10.1.1.1/24], > + [id 0 dstport 4789 gbp]) > +NS_CHECK_EXEC([at_ns0], [iptables -I OUTPUT -p ip -j MARK --set-mark 512 > 2>/dev/null], [0]) > +NS_CHECK_EXEC([at_ns0], [iptables -I INPUT -m mark --mark 512 -j ACCEPT > 2>/dev/null], [0], [ignore]) > + + dnl First, check the underlay. > +NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | > FORMAT_PING], [0], [dnl > +3 packets transmitted, 3 received, 0% packet loss, time 0ms > +]) > + > +dnl Okay, now check the overlay with different packet sizes End the sentence with a dot, but also the comment on different packet sizes does not make sense. + dnl Okay, now check the overlay. > +NS_CHECK_EXEC([at_ns0], [ping -q -c 1000 -i 0.01 10.1.1.100 | FORMAT_PING], > [0], [dnl > +1000 packets transmitted, 1000 received, 0% packet loss, time 0ms > +]) > + > +AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep > "eth_type(0x0800)" | grep "tp_dst=4789,vxlan(gbp(id=512))" | wc -l], [0], [dnl > +1 > +]) > +AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep > "eth_type(0x0800)" | grep "tp_dst=4789,vxlan(gbp(id=512,flags=0))" | wc -l], > [0], [dnl > +1 > +]) > + > +dnl First, check the underlay Guess this comment was left behind and had to be moved up (plus a dot :). > +OVS_TRAFFIC_VSWITCHD_STOP > +AT_CLEANUP > + > -- > 2.38.0 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH v5 9/9] system-offloads-traffic.at: Add vxlan gbp offload test
From: Gavin Li Add a vxlan gbp offload test case: vxlan offloads with gbp extention - ping between two ports - offloads enabled ok Signed-off-by: Gavin Li Reviewed-by: Roi Dayan Reviewed-by: Simon Horman --- tests/system-offloads-traffic.at | 49 1 file changed, 49 insertions(+) diff --git a/tests/system-offloads-traffic.at b/tests/system-offloads-traffic.at index ae302a29499a..cabbcfbd168f 100644 --- a/tests/system-offloads-traffic.at +++ b/tests/system-offloads-traffic.at @@ -805,3 +805,52 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/could not open network device ovs-p0/d /failed to offload flow/d "]) AT_CLEANUP + +AT_SETUP([offloads - ping over vxlan tunnel with gbp - offloads enabled]) +OVS_CHECK_TUNNEL_TSO() +OVS_CHECK_VXLAN() + +OVS_TRAFFIC_VSWITCHD_START([], [], [-- set Open_vSwitch . other_config:hw-offload=true]) +ADD_BR([br-underlay]) + +AT_CHECK([ovs-ofctl add-flow br-underlay "actions=normal"]) + +ADD_NAMESPACES(at_ns0) + +dnl Set up underlay link from host into the namespace using veth pair. +ADD_VETH(p0, at_ns0, br-underlay, "172.31.1.1/24") +AT_CHECK([ip addr add dev br-underlay "172.31.1.100/24"]) +AT_CHECK([ip link set dev br-underlay up]) + +dnl Set up tunnel endpoints on OVS outside the namespace and with a native +dnl linux device inside the namespace. +ADD_OVS_TUNNEL([vxlan], [br0], [at_vxlan0], [172.31.1.1], [10.1.1.100/24], [options:exts=gbp]) +AT_CHECK([ovs-ofctl add-flow br0 "in_port=br0 actions=load:0x200->NXM_NX_TUN_GBP_ID[], output:at_vxlan0]") +AT_CHECK([ovs-ofctl add-flow br0 "in_port=at_vxlan0, tun_gbp_id=512 actions=output:br0"]) +AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"]) + +ADD_NATIVE_TUNNEL([vxlan], [at_vxlan1], [at_ns0], [172.31.1.100], [10.1.1.1/24], + [id 0 dstport 4789 gbp]) +NS_CHECK_EXEC([at_ns0], [iptables -I OUTPUT -p ip -j MARK --set-mark 512 2>/dev/null], [0]) +NS_CHECK_EXEC([at_ns0], [iptables -I INPUT -m mark --mark 512 -j ACCEPT 2>/dev/null], [0], [ignore]) + +NS_CHECK_EXEC([at_ns0], [ping -q -c 3 -i 0.3 -w 2 172.31.1.100 | FORMAT_PING], [0], [dnl +3 packets transmitted, 3 received, 0% packet loss, time 0ms +]) + +dnl Okay, now check the overlay with different packet sizes +NS_CHECK_EXEC([at_ns0], [ping -q -c 1000 -i 0.01 10.1.1.100 | FORMAT_PING], [0], [dnl +1000 packets transmitted, 1000 received, 0% packet loss, time 0ms +]) + +AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep "eth_type(0x0800)" | grep "tp_dst=4789,vxlan(gbp(id=512))" | wc -l], [0], [dnl +1 +]) +AT_CHECK([ovs-appctl dpctl/dump-flows type=tc,offloaded | grep "eth_type(0x0800)" | grep "tp_dst=4789,vxlan(gbp(id=512,flags=0))" | wc -l], [0], [dnl +1 +]) + +dnl First, check the underlay +OVS_TRAFFIC_VSWITCHD_STOP +AT_CLEANUP + -- 2.38.0 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev