Thanks Yifeng

Thanks for switching to use ‘packet-out’.
Patches 4-8 seem like they can be part of the same patch, since they are 
closely related.
As discussed, none of the tests pass for Userspace datapath, so maybe you want 
to check them out or just disable them for now

I tested with “Linux ubuntu 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 
16:08:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux”
Fusion Ubuntu VM

dball@ubuntu:~/ovs$ time sudo make check-system-userspace 
TESTSUITEFLAGS='18-22' -C _gcc
make: Entering directory '/home/dball/ovs/_gcc'
make  all-recursive
make[1]: Entering directory '/home/dball/ovs/_gcc'
Making all in datapath
make[2]: Entering directory '/home/dball/ovs/_gcc/datapath'
Making all in linux
make[3]: Entering directory '/home/dball/ovs/_gcc/datapath/linux'
make -C /lib/modules/4.4.0-119-generic/build 
M=/home/dball/ovs/_gcc/datapath/linux modules
make[4]: Entering directory '/usr/src/linux-headers-4.4.0-119-generic'
  Building modules, stage 2.
  MODPOST 6 modules
make[4]: Leaving directory '/usr/src/linux-headers-4.4.0-119-generic'
make[3]: Leaving directory '/home/dball/ovs/_gcc/datapath/linux'
make[3]: Entering directory '/home/dball/ovs/_gcc/datapath'
make[3]: Leaving directory '/home/dball/ovs/_gcc/datapath'
make[2]: Leaving directory '/home/dball/ovs/_gcc/datapath'
make[2]: Entering directory '/home/dball/ovs/_gcc'
make[3]: Entering directory '/home/dball/ovs/_gcc/datapath'
make[3]: 'distfiles' is up to date.
make[3]: Leaving directory '/home/dball/ovs/_gcc/datapath'
make[2]: Leaving directory '/home/dball/ovs/_gcc'
make[1]: Leaving directory '/home/dball/ovs/_gcc'
set /bin/bash '../tests/system-userspace-testsuite' -C tests  
AUTOTEST_PATH='utilities:vswitchd:ovsdb:vtep:tests:::ovn/controller-vtep:ovn/northd:ovn/utilities:ovn/controller'
 18-22 -j1; \
"$@" || (test X'' = Xyes && "$@" --recheck)
## ------------------------------- ##
## openvswitch 2.10.90 test suite. ##
## ------------------------------- ##

datapath-sanity

 18: datapath - ping over gre tunnel by simulated packets FAILED 
(system-traffic.at:615)
 19: datapath - ping over erspan v1 tunnel by simulated packets FAILED 
(system-traffic.at:659)
 20: datapath - ping over erspan v2 tunnel by simulated packets FAILED 
(system-traffic.at:706)
 21: datapath - ping over ip6erspan v1 tunnel by simulated packets FAILED 
(system-traffic.at:754)
 22: datapath - ping over ip6erspan v2 tunnel by simulated packets FAILED 
(system-traffic.at:804)

## ------------- ##
## Test results. ##
## ------------- ##

ERROR: All 5 tests were run,
5 failed unexpectedly.
## ------------------------------------------- ##
## system-userspace-testsuite.log was created. ##
## ------------------------------------------- ##


The kmod tests all pass now and they are a little faster now, but still slow

et /bin/bash '../tests/system-kmod-testsuite' -C tests  
AUTOTEST_PATH='utilities:vswitchd:ovsdb:vtep:tests:::ovn/controller-vtep:ovn/northd:ovn/utilities:ovn/controller'
 18 -j1; \
"$@" || (test X'' = Xyes && "$@" --recheck)
## ------------------------------- ##
## openvswitch 2.10.90 test suite. ##
## ------------------------------- ##
 18: datapath - ping over gre tunnel by simulated packets ok

## ------------- ##
## Test results. ##
## ------------- ##

1 test was successful.
make[1]: Leaving directory '/home/dball/ovs/_gcc'
make: Leaving directory '/home/dball/ovs/_gcc'

real    1m32.789s
user    0m3.396s
sys     0m0.872s


Thanks Darrell






On 8/8/18, 4:35 PM, "ovs-dev-boun...@openvswitch.org on behalf of Yifeng Sun" 
<ovs-dev-boun...@openvswitch.org on behalf of pkusunyif...@gmail.com> wrote:

    Introduce a new test that doesn't setup native gre tunnels but sends
    simulated raw packets.
    This test is supposed to only run for kernel version from 4.4.x to 4.15.x.
    
    Signed-off-by: Yifeng Sun <pkusunyif...@gmail.com>
    ---
     tests/system-traffic.at | 47 
+++++++++++++++++++++++++++++++++++++++++++++++
     1 file changed, 47 insertions(+)
    
    diff --git a/tests/system-traffic.at b/tests/system-traffic.at
    index cf53c10..dca2bc8 100644
    --- a/tests/system-traffic.at
    +++ b/tests/system-traffic.at
    @@ -575,6 +575,53 @@ NS_CHECK_EXEC([at_ns0], [ping -s 3200 -q -c 3 -i 0.3 
-w 2 10.1.1.100 | FORMAT_PI
     OVS_TRAFFIC_VSWITCHD_STOP
     AT_CLEANUP
     
    +AT_SETUP([datapath - ping over gre tunnel by simulated packets])
    +OVS_CHECK_KERNEL(4, 4, 15)
    +
    +OVS_TRAFFIC_VSWITCHD_START()
    +
    +AT_CHECK([ovs-vsctl -- set bridge br0 
other-config:hwaddr=\"f2:ff:00:00:00:01\"])
    +ADD_BR([br-underlay], [set bridge br-underlay 
other-config:hwaddr=\"f2:ff:00:00:00:02\"])
    +
    +AT_CHECK([ovs-ofctl add-flow br0 "actions=normal"])
    +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", f2:ff:00:00:00:03)
    +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.
    +ADD_OVS_TUNNEL([gre], [br0], [at_gre0], [172.31.1.1], [10.1.1.100/24])
    +
    +ip netns exec at_ns0 tcpdump -U -i p0 -w p0.pcap &
    +sleep 1
    +
    +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 We don't actually add gretap port as below, instead, we will
    +dnl emulate one that sends out packets. Suppose its mac address is 
f2:ff:00:00:00:04.
    +dnl ADD_NATIVE_TUNNEL([gretap], [ns_gre0], [at_ns0], [172.31.1.100], 
[10.1.1.1/24])
    +
    +dnl Now, check the overlay by sending out raw arp and icmp packets.
    +ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 
packet=f2ff00000002f2ff00000003080045000042ec2c4000402ff3bcac1f0101ac1f016400006558fffffffffffff2ff0000000408060001080006040001f2ff000000040a0101010000000000000a010164
 actions=NORMAL"
    +
    +sleep 1
    +AT_CHECK([tcpdump -xx -r p0.pcap 2>&1 | egrep "IP 172.31.1.100 > 
172.31.1.1: GREv0, length 46: ARP, Reply 10.1.1.100 is-at f2:ff:00:00:00:01 .* 
length 28" 2>&1 1>/dev/null])
    +
    +ovs-ofctl -O OpenFlow13 packet-out br-underlay "in_port=1 
packet=f2ff00000002f2ff0000000308004500007aec8e4000402ff322ac1f0101ac1f016400006558f2ff00000001f2ff00000004080045000054548f40004001cfb30a0101010a0101640800e6e829270003e1a3435b00000000ff1a050000000000101112131415161718191a1b1c1d1e1f202122232425262728292a2b2c2d2e2f3031323334353637
 actions=NORMAL"
    +
    +sleep 1
    +AT_CHECK([tcpdump -xx -r p0.pcap 2>&1 | egrep "IP 172.31.1.100 > 
172.31.1.1: GREv0, length 102: IP 10.1.1.100 > 10.1.1.1: ICMP echo reply, .* 
length 64$" 2>&1 1>/dev/null])
    +
    +OVS_TRAFFIC_VSWITCHD_STOP
    +AT_CLEANUP
    +
     AT_SETUP([datapath - clone action])
     OVS_TRAFFIC_VSWITCHD_START()
     
    -- 
    2.7.4
    
    _______________________________________________
    dev mailing list
    d...@openvswitch.org
    
https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.openvswitch.org%2Fmailman%2Flistinfo%2Fovs-dev&amp;data=02%7C01%7Cdball%40vmware.com%7C153e01662c0e401c4fa008d5fd87accb%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636693681528602321&amp;sdata=qKcxbM2PzEg%2BrNb61nZRScJboN%2B5a317WP4MVIlgobA%3D&amp;reserved=0
    

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to