This brings in STT.
Conflicts:
tutorial/ovs-sandbox
Aryan TaheriMonfared aryan.taherimonfared@uis.no
Ashwin Swaminathan ashwinds@arista.com
Ben Pfaff blp@nicira.com
+ Billy O'Mahony billy.o.mahony@intel.com
Brian Kruger bkruger+ovsdev@gmail.com
Bruce Davie bsd@nicira.com
Bryan Phillippe bp@toroki.com
Francesco Fusco ffusco@redhat.com
FUJITA Tomonori fujita.tomonori@lab.ntt.co.jp
Gaetano Catalli gaetano.catalli@gmail.com
+Gal Sagie gal.sagie@gmail.com
Geoffrey Wossum gwossum@acm.org
Gianluca Merlo gianluca.merlo@gmail.com
Giuseppe Lettieri g.lettieri@iet.unipi.it
Todd Deshane deshantm@gmail.com
Tom Everman teverman@google.com
Tsvi Slonim tsvi@toroki.com
+ Tuan Nguyen tuan.nguyen@veriksystems.com
Tyler Coumbes coumbes@gmail.com
Valient Gough vgough@pobox.com
Vivien Bernet-Rollande vbr@soprive.net
Ciara Loftus ciara.loftus@intel.com
Daniel Badea daniel.badea@windriver.com
Dave Walker DaveWalker@ubuntu.com
+ David Evans davidjoshuaevans@gmail.com
David Palma palma@onesource.pt
Derek Cormier derek.cormier@lab.ntt.co.jp
Dhaval Badiani dbadiani@vmware.com
Hiroshi Tanaka htanaka@nicira.com
Hiroshi Miyata miyahiro.dazu@gmail.com
Hyojoon Kim joonk@gatech.edu
+ Ian Stokes ian.stokes@intel.com
Igor Ganichev iganichev@nicira.com
Igor Sever igor@xorops.com
Jacob Cherkas jcherkas@nicira.com
rahim entezari rahim.entezari@gmail.com
冯全树(Crab) fqs888@126.com
胡靖飞 hujingfei914@msn.com
+ 张伟 zhangwqh@126.com
Thanks to all Open vSwitch contributors. If you are not listed above
but believe that you should be, please write to dev@openvswitch.org.
-# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014 Nicira, Inc.
+# Copyright (c) 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Nicira, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# replacement, but programs using the new version may use APIs not
# present in the previous one. In other words, new symbols have been
# added and a program linking against the new version may fail with
- # “unresolved symbols.” If linking against the old version at runtime:
+ # "unresolved symbols." If linking against the old version at runtime:
# set revision to 0, bump current and age.
#
# 3. Programs may need to be changed, recompiled, relinked in order to use
AC_SEARCH_LIBS([pow], [m])
AC_SEARCH_LIBS([clock_gettime], [rt])
AC_SEARCH_LIBS([timer_create], [rt])
- AC_SEARCH_LIBS([pthread_sigmask], [pthread])
+ AC_SEARCH_LIBS([pthread_create], [pthread])
AC_FUNC_STRERROR_R
OVS_CHECK_ESX
OVS_CHECK_RUNDIR
OVS_CHECK_DBDIR
OVS_CHECK_BACKTRACE
+ OVS_CHECK_PERF_EVENT
OVS_CHECK_VALGRIND
OVS_CHECK_SOCKET_LIBS
OVS_CHECK_XENSERVER_VERSION
ofproto/libofproto.sym
lib/libsflow.sym
lib/libopenvswitch.sym
+ ovn/lib/libovn.sym
vtep/libvtep.sym])
OVS_ENABLE_OPTION([-Wall])
OVS_ENABLE_OPTION([-Wmissing-field-initializers])
OVS_ENABLE_OPTION([-Wthread-safety])
OVS_ENABLE_OPTION([-fno-strict-aliasing])
+ OVS_ENABLE_OPTION([-Qunused-arguments])
OVS_CONDITIONAL_CC_OPTION([-Wno-unused], [HAVE_WNO_UNUSED])
OVS_CONDITIONAL_CC_OPTION([-Wno-unused-parameter], [HAVE_WNO_UNUSED_PARAMETER])
OVS_ENABLE_WERROR
AC_CONFIG_COMMANDS([include/openflow/openflow.h.stamp])
AC_CONFIG_COMMANDS([utilities/bugtool/dummy], [:])
+AC_CONFIG_COMMANDS([ovn/dummy], [:])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
tests/reconnect.at \
tests/ovs-vswitchd.at \
tests/dpif-netdev.at \
+ tests/dpctl.at \
tests/ofproto-dpif.at \
tests/bridge.at \
tests/vlan-splinters.at \
tests/interface-reconfigure.at \
tests/vlog.at \
tests/vtep-ctl.at \
- tests/auto-attach.at
+ tests/auto-attach.at \
+ tests/ovn.at
KMOD_TESTSUITE_AT = \
tests/kmod-testsuite.at \
test ! -f '$(TESTSUITE)' || $(SHELL) '$(TESTSUITE)' -C tests --clean
AUTOTEST = $(AUTOM4TE) --language=autotest
+
+ if WIN32
$(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT) $(TESTSUITE_PATCH)
$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o testsuite.tmp $@.at
patch -p0 testsuite.tmp $(TESTSUITE_PATCH)
$(AM_V_at)mv testsuite.tmp $@
+ else
+ $(TESTSUITE): package.m4 $(TESTSUITE_AT) $(COMMON_MACROS_AT)
+ $(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
+ $(AM_V_at)mv $@.tmp $@
+ endif
$(KMOD_TESTSUITE): package.m4 $(KMOD_TESTSUITE_AT) $(COMMON_MACROS_AT)
$(AM_V_GEN)$(AUTOTEST) -I '$(srcdir)' -o $@.tmp $@.at
tests/test-multipath.c \
tests/test-netflow.c \
tests/test-odp.c \
+ tests/test-ovn.c \
tests/test-packets.c \
tests/test-random.c \
tests/test-reconnect.c \
tests/test-unix-socket.c
endif
-tests_ovstest_LDADD = lib/libopenvswitch.la
+tests_ovstest_LDADD = lib/libopenvswitch.la ovn/lib/libovn.la
dist_check_SCRIPTS = tests/flowgen.pl
noinst_PROGRAMS += tests/test-strtok_r
m4_include([tests/ovs-vswitchd.at])
m4_include([tests/ofproto.at])
m4_include([tests/dpif-netdev.at])
+ m4_include([tests/dpctl.at])
m4_include([tests/ofproto-dpif.at])
m4_include([tests/bridge.at])
m4_include([tests/vlan-splinters.at])
m4_include([tests/vlog.at])
m4_include([tests/vtep-ctl.at])
m4_include([tests/auto-attach.at])
+m4_include([tests/ovn.at])
rungdb() {
under_gdb=$1
+ gdb_run=$2
shift
+ shift
+
# Remove the --detach and to put the process under gdb control.
# Also remove --vconsole:off to allow error message to show up
# on the console.
if $under_gdb && [ "$DISPLAY" ]; then
args=`echo $@ |sed s/--detach//g | sed s/--vconsole:off//g`
xterm_title=$1
- run_xterm $xterm_title gdb -ex run --args $args
+
+ gdb_cmd=""
+ if $gdb_run; then
+ gdb_cmd="-ex run"
+ fi
+
+ run_xterm $xterm_title gdb $gdb_cmd --args $args
else
run $@
fi
gdb_vswitchd=false
gdb_ovsdb=false
+ gdb_vswitchd_ex=false
+ gdb_ovsdb_ex=false
+gdb_ovn_northd=false
+gdb_ovn_controller=false
builddir=
srcdir=
schema=
installed=false
built=false
+ovn=false
+ovnsb_schema=
+ovnnb_schema=
for option; do
# This option-parsing mechanism borrowed from a Autoconf-generated
-i, --installed use installed Open vSwitch
-g, --gdb-vswitchd run ovs-vswitchd under gdb
-d, --gdb-ovsdb run ovsdb-server under gdb
+ --gdb-ovn-northd run ovn-northd under gdb
+ --gdb-ovn-controller run ovn-controller under gdb
-S, --schema=FILE use FILE as vswitch.ovsschema
+ -o, --ovn enable OVN
Other options:
-h, --help Print this usage message.
;;
-g|--gdb-v*)
gdb_vswitchd=true
+ gdb_vswitchd_ex=false
+ ;;
+ -e|--gdb-ex-v*)
+ gdb_vswitchd=true
+ gdb_vswitchd_ex=true
;;
- -d|--gdb-o*)
+ -d|--gdb-ovsdb)
gdb_ovsdb=true
+ gdb_ovsdb_ex=false
+ ;;
+ -r|--gdb-ex-o*)
+ gdb_ovsdb=true
+ gdb_ovsdb_ex=true
;;
+ --gdb-ovn-northd)
+ gdb_ovn_northd=true
+ ;;
+ --gdb-ovn-controller)
+ gdb_ovn_controller=true
+ ;;
+ -o|--ovn)
+ ovn=true
+ ;;
-*)
echo "unrecognized option $option (use --help for help)" >&2
exit 1
echo >&2 'source directory not found, please use --srcdir'
exit 1
fi
+ if $ovn; then
+ ovnsb_schema=$srcdir/ovn/ovn-sb.ovsschema
+ if test ! -e "$ovnsb_schema"; then
+ echo >&2 'source directory not found, please use --srcdir'
+ exit 1
+ fi
+ ovnnb_schema=$srcdir/ovn/ovn-nb.ovsschema
+ if test ! -e "$ovnnb_schema"; then
+ echo >&2 'source directory not found, please use --srcdir'
+ exit 1
+ fi
+ fi
# Put built tools early in $PATH.
if test ! -e $builddir/vswitchd/ovs-vswitchd; then
exit 1
fi
PATH=$builddir/ovsdb:$builddir/vswitchd:$builddir/utilities:$PATH
+ if $ovn; then
+ PATH=$builddir/ovn:$builddir/ovn/controller:$builddir/ovn/northd:$PATH
+ fi
export PATH
else
case $schema in
echo "can't find vswitch.ovsschema, please specify --schema" >&2
exit 1
fi
+ if $ovn; then
+ echo "running with ovn is only supported from the build dir." >&2
+ exit 1
+ fi
fi
# Create sandbox.
# Create database and start ovsdb-server.
touch "$sandbox"/.conf.db.~lock~
run ovsdb-tool create conf.db "$schema"
- rungdb $gdb_ovsdb ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \
+ovsdb_server_args=
+if $ovn; then
+ touch "$sandbox"/.ovnsb.db.~lock~
+ touch "$sandbox"/.ovnnb.db.~lock~
+ run ovsdb-tool create ovnsb.db "$ovnsb_schema"
+ run ovsdb-tool create ovnnb.db "$ovnnb_schema"
+ ovsdb_server_args="ovnsb.db ovnnb.db conf.db"
+fi
- --remote=punix:"$sandbox"/db.sock
+ rungdb $gdb_ovsdb $gdb_ovsdb_ex ovsdb-server --detach --no-chdir --pidfile -vconsole:off --log-file \
+ --remote=punix:"$sandbox"/db.sock $ovsdb_server_args
+ #Add a small delay to allow ovsdb-server to launch.
+ sleep 0.1
+
+ #Wait for ovsdb-server to finish launching.
+ if test ! -e "$sandbox"/db.sock; then
+ echo -n "Waiting for ovsdb-server to start..."
+ while test ! -e "$sandbox"/db.sock; do
+ sleep 1;
+ done
+ echo " Done"
+ fi
+
# Initialize database.
run ovs-vsctl --no-wait -- init
# Start ovs-vswitchd.
- rungdb $gdb_vswitchd ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file \
+ rungdb $gdb_vswitchd $gdb_vswitchd_ex ovs-vswitchd --detach --no-chdir --pidfile -vconsole:off --log-file \
--enable-dummy=override -vvconn -vnetdev_dummy
+if $ovn; then
+ ovs-vsctl set open . external-ids:system-id=56b18105-5706-46ef-80c4-ff20979ab068
+ ovs-vsctl set open . external-ids:ovn-remote=unix:"$sandbox"/db.sock
+ ovs-vsctl set open . external-ids:ovn-encap-type=geneve
+ ovs-vsctl set open . external-ids:ovn-encap-ip=127.0.0.1
+ ovs-vsctl add-br br-int \
+ -- set bridge br-int fail-mode=secure other-config:disable-in-band=true
+
+ rungdb $gdb_ovn_northd ovn-northd --detach --no-chdir --pidfile -vconsole:off --log-file
+ rungdb $gdb_ovn_controller ovn-controller --detach --no-chdir --pidfile -vconsole:off --log-file
+fi
+
cat <<EOF