Change code base to Nicira's for-nox/0.4 branch

Remove monolithic OpenFlow switch.
Add userspace datapath.
Fix BUG#13: Revise check wildcards for in_port != out_port output
validation.
Fix BUG#30: Made use of get_jiffies_64 instead of jiffies.
Fix BUG#31: Fix NetFPGA crash in case of test_delete test harness run.
Fix BUG#32: Add stack depth limitation to avoid inifinite loop in
log_backtrace.
Fix BUG#33: Improve NetFPGA kernel extension and NetFPGA image to
support MAC address rewrite features (two actions) on NetFPGA enabled
OpenFlow switch.
Fix BUG#34: Add NetFPGA kernel extension source codes to create
distribution package with NetFPGA correctly.
Fix BUG#38: Improve regression test for FLOW_MOD ACTION SET_DL_SRC and
SET_DL_DST.
Fix BUG#39: Correct misunderstanding of byte order ops for OFPAT_XXX.
This commit is contained in:
Mikio Hara committed 2009-06-29 05:02:16 -07:00
1 parent c4ea4fc18c
commit 695db2964e
119 files changed
+6202 -3393

No files matched your search

+82 -22
View File
@@ -159,6 +159,29 @@ configure_ssl() {
fi
}
check_int_var() {
eval value=\$$1
if test -n "$value"; then
if expr "X$value" : 'X[0-9][0-9]*$'; then
if test $value -lt $2; then
echo "warning: The $1 option may not be set to a value below $2, treating as $2" >&2
eval $1=$2
fi
else
echo "warning: The $1 option must be set to a number, ignoring" >&2
unset $1
fi
fi
}
check_new_option() {
case $DAEMON_OPTS in
*$1*)
echo "warning: The $1 option in DAEMON_OPTS may now be set with the $2 variable in $default. The setting in DAEMON_OPTS will override the $2 variable, which will prevent the switch UI from configuring $1." >&2
;;
esac
}
case "$1" in
start)
if test -z "$NETDEVS"; then
@@ -199,6 +222,24 @@ case "$1" in
echo "Run ofp-switch-setup (in the openflow-switch-config package) or edit /etc/default/openflow-switch to configure" >&2
exit 1
esac
case $DISCONNECTED_MODE in
''|switch|drop) ;;
*) echo "$default: warning: DISCONNECTED_MODE is not 'switch' or 'drop'" >&2 ;;
esac
check_int_var RATE_LIMIT 100
check_int_var INACTIVITY_PROBE 5
check_int_var MAX_BACKOFF 1
check_new_option --fail DISCONNECTED_MODE
check_new_option --stp STP
check_new_option --rate-limit RATE_LIMIT
check_new_option --inactivity INACTIVITY_PROBE
check_new_option --max-backoff MAX_BACKOFF
case $DAEMON_OPTS in
*--rate-limit*)
echo "$default: --rate-limit may now be set with RATE_LIMIT" >&2
esac
echo -n "Loading openflow_mod: "
if grep -q '^openflow_mod$' /proc/modules; then
@@ -218,6 +259,10 @@ case "$1" in
exit 1
fi
for netdev in $NETDEVS; do
check_op "Removing IP address from $netdev" ifconfig $netdev 0.0.0.0
done
must_succeed "Adding datapath" dpctl adddp nl:0
for netdev in $NETDEVS; do
must_succeed "Adding $netdev to datapath" dpctl addif nl:0 $netdev
@@ -257,34 +302,49 @@ case "$1" in
must_succeed "Disabling of0" ifconfig of0 down
fi
MGMT_OPTS=
for vconn in $MGMT_VCONNS; do
MGMT_OPTS="$MGMT_OPTS --listen=$vconn"
done
MONITOR_OPT=
if test -n "$MONITOR_VCONN"; then
MONITOR_OPT="--monitor=$MONITOR_VCONN"
fi
COMMAND_OPT=
if test -n "$COMMANDS"; then
COMMAND_OPT="--command-acl=$COMMANDS"
fi
if test "$MODE" = out-of-band; then
DAEMON_OPTS="$DAEMON_OPTS --out-of-band"
fi
if test -n "$CORE_LIMIT"; then
check_op "Setting core limit to $CORE_LIMIT" ulimit -c "$CORE_LIMIT"
fi
# Compose secchan options.
set --
set -- "$@" --verbose=ANY:console:emer --verbose=ANY:syslog:err
set -- "$@" --log-file
set -- "$@" --detach --pidfile=$PIDFILE
for vconn in $MGMT_VCONNS; do
set -- "$@" --listen="$vconn"
done
if test -n "$MONITOR_VCONN"; then
set -- "$@" --monitor="$MONITOR_VCONN"
fi
if test -n "$COMMANDS"; then
set -- "$@" --command-acl="$COMMANDS"
fi
case $STP in
yes) set -- "$@" --stp ;;
no) set -- "$@" --no-stp ;;
esac
case $DISCONNECTED_MODE in
switch) set -- "$@" --fail=open ;;
drop) set -- "$@" --fail=closed ;;
esac
if test -n "$RATE_LIMIT"; then
set -- "$@" --rate-limit=$RATE_LIMIT
fi
if test -n "$INACTIVITY_PROBE"; then
set -- "$@" --inactivity-probe=$INACTIVITY_PROBE
fi
if test -n "$MAX_BACKOFF"; then
set -- "$@" --max-backoff=$MAX_BACKOFF
fi
set -- "$@" $SSL_OPTS $DAEMON_OPTS
if test "$MODE" = out-of-band; then
set -- "$@" --out-of-band
fi
set -- "$@" nl:0 "$CONTROLLER"
echo -n "Starting $DESC: "
start-stop-daemon --start --quiet --pidfile $PIDFILE \
--exec $DAEMON -- nl:0 $CONTROLLER --detach --pidfile=$PIDFILE \
--verbose=ANY:console:emer --verbose=ANY:syslog:err --log-file \
$DAEMON_OPTS $MGMT_OPTS $MONITOR_OPT $SSL_OPTS "$COMMAND_OPT"
--exec $DAEMON -- "$@"
if running; then
echo "$NAME."
else