Re: [ovs-dev] [PATCH] system-ovn.at: Add test for ping other router's port on distributed router
I forgot one other comment. On Thu, Apr 20, 2017 at 11:05 AM, Mickey Spiegelwrote: > > On Tue, Apr 18, 2017 at 4:49 AM, Guoshuai Li wrote: > >> Signed-off-by: Guoshuai Li >> --- >> tests/system-ovn.at | 101 ++ >> ++ >> tests/system-traffic.at | 20 ++ >> 2 files changed, 121 insertions(+) >> >> diff --git a/tests/system-ovn.at b/tests/system-ovn.at >> index dd62bd1..68da38a 100644 >> --- a/tests/system-ovn.at >> +++ b/tests/system-ovn.at > > > ... I have not looked at the system-ovn test yet. > >> >> >> diff --git a/tests/system-traffic.at b/tests/system-traffic.at >> index c042773..295e606 100644 >> --- a/tests/system-traffic.at >> +++ b/tests/system-traffic.at >> @@ -3678,3 +3678,23 @@ NS_CHECK_EXEC([at_ns0], [ping -q -c 1 -w 3 >> 10.4.2.2], [1], [ignore]) >> >> OVS_TRAFFIC_VSWITCHD_STOP(["/dropping VLAN \(0\|300\) packet received >> on dot1q-tunnel port/d"]) >> AT_CLEANUP >> + >> +AT_SETUP([datapath - SNAT and UNSNAT]) >> > The name should be more specific. This does not just test SNAT and UNSNAT in the datapath, it includes an action in between that forces processing to userspace. Something like "datapath - SNAT, userspace action, UNSNAT"? Mickey > +OVS_TRAFFIC_VSWITCHD_START() >> + >> +AT_CHECK([ovs-ofctl add-flow br0 "table=0, >> priority=100,in_port=1,ip,nw_dst=20.0.0.2 >> actions=dec_ttl(),mod_dl_src:00:00:02:01:02:01,mod_dl_dst:00 >> :00:02:01:02:02,resubmit(,1)"]) >> +AT_CHECK([ovs-ofctl add-flow br0 "table=1, >> priority=100,ip,nw_src=192.168.1.2 >> actions=ct(commit,table=2,zone=6,nat(src=20.0.0.1))"]) >> > > There should be another table added here with a flow that does the clone > with nested ct_clear actions. The use of ct_clear changes how the unsnat in > table 3 is processed. > > Mickey > > >> +AT_CHECK([ovs-ofctl add-flow br0 "table=2, >> priority=100,icmp,nw_dst=20.0.0.2,icmp_type=8,icmp_code=0 >> actions=push:NXM_OF_IP_SRC[],push:NXM_OF_IP_DST[],pop:NXM_OF >> _IP_SRC[],pop:NXM_OF_IP_DST[],load:0xff->NXM_NX_IP_TTL[],loa >> d:0->NXM_OF_ICMP_TYPE[],dec_ttl(),mod_dl_src:00:00:02:01: >> 02:02,mod_dl_dst:00:00:02:01:02:01,resubmit(,3)"]) >> +AT_CHECK([ovs-ofctl add-flow br0 "table=3, priority=100,ip,nw_dst=20.0.0.1 >> actions=ct(table=4,zone=6,nat)"]) >> +AT_CHECK([ovs-ofctl add-flow br0 "table=4, >> priority=100,ip,nw_dst=192.168.1.2 >> actions=dec_ttl(),mod_dl_src:00:00:01:01:02:01,mod_dl_dst:f0 >> :00:00:01:02:01,load:0->NXM_OF_IN_PORT[],output:1"]) >> + >> +ADD_NAMESPACES(foo1) >> +ADD_VETH(foo1, foo1, br0, "192.168.1.2/24", "f0:00:00:01:02:01", >> "192.168.1.1") >> +NS_CHECK_EXEC([foo1], [arp -s 192.168.1.1 00:00:01:01:02:01]) >> + >> +NS_CHECK_EXEC([foo1], [ping -q -c 3 -i 0.3 -w 2 20.0.0.2 | FORMAT_PING], >> [0], [dnl >> +3 packets transmitted, 3 received, 0% packet loss, time 0ms >> +]) >> + >> +OVS_TRAFFIC_VSWITCHD_STOP >> +AT_CLEANUP >> -- >> 2.10.1.windows.1 >> >> This patch is used to analyze "ovn: unsnat handling error for Distributed >> Gateway" problems: >> >> https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/331033.html >> >> > ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH] system-ovn.at: Add test for ping other router's port on distributed router
On Tue, Apr 18, 2017 at 4:49 AM, Guoshuai Liwrote: > Signed-off-by: Guoshuai Li > --- > tests/system-ovn.at | 101 ++ > ++ > tests/system-traffic.at | 20 ++ > 2 files changed, 121 insertions(+) > > diff --git a/tests/system-ovn.at b/tests/system-ovn.at > index dd62bd1..68da38a 100644 > --- a/tests/system-ovn.at > +++ b/tests/system-ovn.at ... I have not looked at the system-ovn test yet. > > > diff --git a/tests/system-traffic.at b/tests/system-traffic.at > index c042773..295e606 100644 > --- a/tests/system-traffic.at > +++ b/tests/system-traffic.at > @@ -3678,3 +3678,23 @@ NS_CHECK_EXEC([at_ns0], [ping -q -c 1 -w 3 > 10.4.2.2], [1], [ignore]) > > OVS_TRAFFIC_VSWITCHD_STOP(["/dropping VLAN \(0\|300\) packet received on > dot1q-tunnel port/d"]) > AT_CLEANUP > + > +AT_SETUP([datapath - SNAT and UNSNAT]) > +OVS_TRAFFIC_VSWITCHD_START() > + > +AT_CHECK([ovs-ofctl add-flow br0 "table=0, > priority=100,in_port=1,ip,nw_dst=20.0.0.2 > actions=dec_ttl(),mod_dl_src:00:00:02:01:02:01,mod_dl_dst: > 00:00:02:01:02:02,resubmit(,1)"]) > +AT_CHECK([ovs-ofctl add-flow br0 "table=1, priority=100,ip,nw_src=192.168.1.2 > actions=ct(commit,table=2,zone=6,nat(src=20.0.0.1))"]) > There should be another table added here with a flow that does the clone with nested ct_clear actions. The use of ct_clear changes how the unsnat in table 3 is processed. Mickey > +AT_CHECK([ovs-ofctl add-flow br0 "table=2, > priority=100,icmp,nw_dst=20.0.0.2,icmp_type=8,icmp_code=0 > actions=push:NXM_OF_IP_SRC[],push:NXM_OF_IP_DST[],pop:NXM_ > OF_IP_SRC[],pop:NXM_OF_IP_DST[],load:0xff->NXM_NX_IP_TTL[], > load:0->NXM_OF_ICMP_TYPE[],dec_ttl(),mod_dl_src:00:00:02: > 01:02:02,mod_dl_dst:00:00:02:01:02:01,resubmit(,3)"]) > +AT_CHECK([ovs-ofctl add-flow br0 "table=3, priority=100,ip,nw_dst=20.0.0.1 > actions=ct(table=4,zone=6,nat)"]) > +AT_CHECK([ovs-ofctl add-flow br0 "table=4, priority=100,ip,nw_dst=192.168.1.2 > actions=dec_ttl(),mod_dl_src:00:00:01:01:02:01,mod_dl_dst: > f0:00:00:01:02:01,load:0->NXM_OF_IN_PORT[],output:1"]) > + > +ADD_NAMESPACES(foo1) > +ADD_VETH(foo1, foo1, br0, "192.168.1.2/24", "f0:00:00:01:02:01", > "192.168.1.1") > +NS_CHECK_EXEC([foo1], [arp -s 192.168.1.1 00:00:01:01:02:01]) > + > +NS_CHECK_EXEC([foo1], [ping -q -c 3 -i 0.3 -w 2 20.0.0.2 | FORMAT_PING], > [0], [dnl > +3 packets transmitted, 3 received, 0% packet loss, time 0ms > +]) > + > +OVS_TRAFFIC_VSWITCHD_STOP > +AT_CLEANUP > -- > 2.10.1.windows.1 > > This patch is used to analyze "ovn: unsnat handling error for Distributed > Gateway" problems: > > https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/331033.html > > ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
Re: [ovs-dev] [PATCH] system-ovn.at: Add test for ping other router's port on distributed router
On 18 April 2017 at 04:49, Guoshuai Liwrote: > Signed-off-by: Guoshuai Li > --- Hi Guoshuai, Thanks for the patch. Is this intended for debugging some current issue? I can't get these new tests to pass "make check-kmod". Furthermore, for "make check-system-userspace", the "datapath - SNAT and UNSNAT" test needs to check for CT, NAT features, eg using the following incremental: diff --git a/tests/system-traffic.at b/tests/system-traffic.at index 295e6062579e..6f637f257b75 100644 --- a/tests/system-traffic.at +++ b/tests/system-traffic.at @@ -3680,6 +3680,8 @@ OVS_TRAFFIC_VSWITCHD_STOP(["/dropping VLAN \(0\|300\) packet received on dot1q-t AT_CLEANUP AT_SETUP([datapath - SNAT and UNSNAT]) +CHECK_CONNTRACK() +CHECK_CONNTRACK_NAT() OVS_TRAFFIC_VSWITCHD_START() AT_CHECK([ovs-ofctl add-flow br0 "table=0, priority=100,in_port=1,ip,nw_dst=20.0.0.2 actions=dec_ttl(),mod_dl_src:00:00:02:01:02:01,mod_dl_dst:00:00:02:01:02:02,resubmit(,1)"]) > -- > 2.10.1.windows.1 > > This patch is used to analyze "ovn: unsnat handling error for Distributed > Gateway" problems: > > https://mail.openvswitch.org/pipermail/ovs-dev/2017-April/331033.html Ah :-) Usually this appears immediately below a "---" after the commit message. I'll mark this in patchwork as 'Deferred'. When a fix is supplied, we could apply this patch at the same time. ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev