Compare commits
10
Commits
7685e41a3e
...
d9c8f86889
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9c8f86889 | ||
|
|
6eb8973c0b | ||
|
|
0848c5f3c1 | ||
|
|
41ac7c4a6e | ||
|
|
5ae59fdbc9 | ||
|
|
ac7c68089b | ||
|
|
ba569f4d82 | ||
|
|
615f37dbbe | ||
|
|
aaa8886328 | ||
|
|
05ee42ee3c |
+1
-1
@@ -443,7 +443,7 @@ class Mininet( object ):
|
||||
host.configDefault( ip=None, mac=None )
|
||||
# You're low priority, dude!
|
||||
# BL: do we want to do this here or not?
|
||||
# May not make sense if we have CPU lmiting...
|
||||
# May not make sense if we have CPU limiting...
|
||||
# quietRun( 'renice +18 -p ' + repr( host.pid ) )
|
||||
# This may not be the right place to do this, but
|
||||
# it needs to be done somewhere.
|
||||
|
||||
+2
-2
@@ -99,7 +99,7 @@ class Node( object ):
|
||||
# Stash configuration parameters for future reference
|
||||
self.params = params
|
||||
|
||||
# dict of port numbers to interfacse
|
||||
# dict of port numbers to interfaces
|
||||
self.intfs = {}
|
||||
|
||||
# dict of interfaces to port numbers
|
||||
@@ -689,7 +689,7 @@ class CPULimitedHost( Host ):
|
||||
Host.__init__( self, name, **params )
|
||||
# BL: Setting the correct period/quota is tricky, particularly
|
||||
# for RT. RT allows very small quotas, but the overhead
|
||||
# seems to be high. CFS has a mininimum quota of 1 ms, but
|
||||
# seems to be high. CFS has a minimum quota of 1 ms, but
|
||||
# still does better with larger period values.
|
||||
self.period_us = params.get( 'period_us', 100000 )
|
||||
self.sched = sched
|
||||
|
||||
@@ -131,7 +131,7 @@ class testOptionsTopoCommon( object ):
|
||||
BW_TOLERANCE = 0.8 # BW fraction below which test should fail
|
||||
# Verify ability to create limited-link topo first;
|
||||
lopts = { 'bw': BW, 'use_htb': True }
|
||||
# Also verify correctness of limit limitng within a bound.
|
||||
# Also verify correctness of limit limiting within a bound.
|
||||
mn = Mininet( SingleSwitchOptionsTopo( n=N, lopts=lopts ),
|
||||
link=TCLink, switch=self.switchClass,
|
||||
waitConnected=True )
|
||||
|
||||
@@ -51,7 +51,7 @@ class TestSwitchDpidAssignmentOVS( unittest.TestCase ):
|
||||
|
||||
def testDefaultDpidAssignmentFailure( self ):
|
||||
"""Verify that Default dpid assignment raises an Exception if the
|
||||
name of the switch does not contin a digit. Also verify the
|
||||
name of the switch does not contain a digit. Also verify the
|
||||
exception message."""
|
||||
net = Mininet( Topo(), self.switchClass, Host, Controller )
|
||||
with self.assertRaises( Exception ) as raises_cm:
|
||||
@@ -80,7 +80,7 @@ class OVSUser( OVSSwitch):
|
||||
OVSSwitch.__init__( self, *args, **kwargs )
|
||||
|
||||
class testSwitchOVSUser( TestSwitchDpidAssignmentOVS ):
|
||||
"Test dpid assignnment of OVS User Switch."
|
||||
"Test dpid assignment of OVS User Switch."
|
||||
switchClass = OVSUser
|
||||
|
||||
@unittest.skipUnless( quietRun( 'which ivs-ctl' ),
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
"Setuptools params"
|
||||
|
||||
from setuptools import setup, find_packages
|
||||
from setuptools import setup
|
||||
from os.path import join
|
||||
|
||||
# Get version number from source tree
|
||||
|
||||
@@ -169,7 +169,7 @@ echo
|
||||
if $persistent; then
|
||||
echo '***Setting up persistent SSH configuration between all nodes'
|
||||
persistentSetup
|
||||
echo $'\n*** Sucessfully set up ssh throughout the cluster!'
|
||||
echo $'\n*** Successfully set up ssh throughout the cluster!'
|
||||
|
||||
else
|
||||
echo '*** Setting up temporary SSH configuration between all nodes'
|
||||
|
||||
+33
-18
@@ -17,7 +17,7 @@ MININET_DIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )/../.." && pwd -P )"
|
||||
# in which case we use the directory containing mininet
|
||||
BUILD_DIR="$(pwd -P)"
|
||||
case $BUILD_DIR in
|
||||
$MININET_DIR/*) BUILD_DIR=$MININET_DIR;; # currect directory is a subdirectory
|
||||
$MININET_DIR/*) BUILD_DIR=$MININET_DIR;; # current directory is a subdirectory
|
||||
*) BUILD_DIR=$BUILD_DIR;;
|
||||
esac
|
||||
|
||||
@@ -242,15 +242,22 @@ function of {
|
||||
fi
|
||||
# was: git clone git://openflowswitch.org/openflow.git
|
||||
# Use our own fork on github for now:
|
||||
git clone https://github.com/mininet/openflow
|
||||
if [ ! -d "openflow" ]; then
|
||||
git clone https://github.com/mininet/openflow
|
||||
fi
|
||||
cd $BUILD_DIR/openflow
|
||||
|
||||
# Patch controller to handle more than 16 switches
|
||||
patch -p1 < $MININET_DIR/mininet/util/openflow-patches/controller.patch
|
||||
# Patch controller to handle more than 16 switches and fix modern gcc/glibc issues
|
||||
if [ -f "$MININET_DIR/mininet/util/openflow-patches/controller.patch" ]; then
|
||||
patch -p1 -N -r - < "$MININET_DIR/mininet/util/openflow-patches/controller.patch" || true
|
||||
fi
|
||||
if [ -f "$MININET_DIR/mininet/util/openflow-patches/gcc-glibc.patch" ]; then
|
||||
patch -p1 -N -r - < "$MININET_DIR/mininet/util/openflow-patches/gcc-glibc.patch" || true
|
||||
fi
|
||||
|
||||
# Resume the install:
|
||||
./boot.sh
|
||||
./configure
|
||||
CFLAGS="-g -O2 -Wno-error=incompatible-pointer-types -Wno-error=int-conversion -Wno-error=format -Wno-error=implicit-function-declaration -Wno-error=address-of-packed-member -Wno-error=discarded-qualifiers" ./configure
|
||||
make
|
||||
sudo make install
|
||||
cd $BUILD_DIR
|
||||
@@ -300,7 +307,7 @@ function of13 {
|
||||
|
||||
|
||||
function install_wireshark {
|
||||
if ! which wireshark; then
|
||||
if ! which wireshark &>/dev/null && ! which tshark &>/dev/null; then
|
||||
echo "Installing Wireshark"
|
||||
if [ "$DIST" = "Fedora" -o "$DIST" = "RedHatEnterpriseServer" ]; then
|
||||
$install wireshark wireshark-gnome
|
||||
@@ -313,29 +320,37 @@ function install_wireshark {
|
||||
|
||||
# Copy coloring rules: OF is white-on-blue:
|
||||
echo "Optionally installing wireshark color filters"
|
||||
mkdir -p $HOME/.wireshark
|
||||
cp -n $MININET_DIR/mininet/util/colorfilters $HOME/.wireshark
|
||||
mkdir -p $HOME/.wireshark $HOME/.config/wireshark
|
||||
[ -f $MININET_DIR/mininet/util/colorfilters ] && cp -n $MININET_DIR/mininet/util/colorfilters $HOME/.wireshark/ || true
|
||||
[ -f $MININET_DIR/mininet/util/colorfilters ] && cp -n $MININET_DIR/mininet/util/colorfilters $HOME/.config/wireshark/ || true
|
||||
|
||||
echo "Checking Wireshark version"
|
||||
WSVER=`wireshark -v | egrep -o '[0-9\.]+' | head -1`
|
||||
if version_ge $WSVER 1.12; then
|
||||
WSVER=`(wireshark -v 2>/dev/null || tshark -v 2>/dev/null || true) | grep -i -E 'wireshark|tshark' | egrep -o '[0-9\.]+' | head -1`
|
||||
if [ -n "$WSVER" ] && version_ge "$WSVER" 1.12; then
|
||||
echo "Wireshark version $WSVER >= 1.12 - returning"
|
||||
return
|
||||
elif which wireshark &>/dev/null || which tshark &>/dev/null; then
|
||||
echo "Wireshark/TShark is already installed and modern versions include OpenFlow dissectors natively - returning"
|
||||
return
|
||||
fi
|
||||
|
||||
echo "Cloning LoxiGen and building openflow.lua dissector"
|
||||
cd $BUILD_DIR
|
||||
git clone https://github.com/floodlight/loxigen.git
|
||||
if [ ! -d "loxigen" ]; then
|
||||
git clone https://github.com/floodlight/loxigen.git
|
||||
fi
|
||||
cd loxigen
|
||||
make wireshark
|
||||
|
||||
# Copy into plugin directory
|
||||
# libwireshark0/ on 11.04; libwireshark1/ on later
|
||||
WSDIR=`find /usr/lib -type d -name 'libwireshark*' | head -1`
|
||||
WSPLUGDIR=$WSDIR/plugins/
|
||||
PLUGIN=loxi_output/wireshark/openflow.lua
|
||||
sudo cp $PLUGIN $WSPLUGDIR
|
||||
echo "Copied openflow plugin $PLUGIN to $WSPLUGDIR"
|
||||
if [ -n "$WSDIR" ]; then
|
||||
WSPLUGDIR=$WSDIR/plugins/
|
||||
PLUGIN=loxi_output/wireshark/openflow.lua
|
||||
sudo cp $PLUGIN $WSPLUGDIR
|
||||
echo "Copied openflow plugin $PLUGIN to $WSPLUGDIR"
|
||||
fi
|
||||
|
||||
cd $BUILD_DIR
|
||||
}
|
||||
@@ -798,7 +813,7 @@ function vm_clean {
|
||||
sudo rm -rf /tmp/*
|
||||
sudo rm -rf openvswitch*.tar.gz
|
||||
|
||||
# Remove sensistive files
|
||||
# Remove sensitive files
|
||||
history -c # note this won't work if you have multiple bash sessions
|
||||
rm -f ~/.bash_history # need to clear in memory and remove on disk
|
||||
rm -f ~/.ssh/id_rsa* ~/.ssh/known_hosts
|
||||
@@ -842,7 +857,7 @@ exit 0
|
||||
}
|
||||
|
||||
function usage {
|
||||
printf '\nUsage: %s [-abcdfhikmnprtvVwxy03]\n\n' $(basename $0) >&2
|
||||
printf '\nUsage: %s [-abcdefhikmnprtvVwxy03]\n\n' $(basename $0) >&2
|
||||
|
||||
printf 'This install script attempts to install useful packages\n' >&2
|
||||
printf 'for Mininet. It should (hopefully) work on Ubuntu 11.10+\n' >&2
|
||||
@@ -869,8 +884,8 @@ function usage {
|
||||
printf -- ' -v: install Open (V)switch\n' >&2
|
||||
printf -- ' -V <version>: install a particular version of Open (V)switch on Ubuntu\n' >&2
|
||||
printf -- ' -w: install OpenFlow (W)ireshark dissector\n' >&2
|
||||
printf -- ' -y: install R(y)u Controller\n' >&2
|
||||
printf -- ' -x: install NO(X) Classic OpenFlow controller\n' >&2
|
||||
printf -- ' -y: install R(y)u Controller\n' >&2
|
||||
printf -- ' -0: (default) -0[fx] installs OpenFlow 1.0 versions\n' >&2
|
||||
printf -- ' -3: -3[fx] installs OpenFlow 1.3 versions\n' >&2
|
||||
exit 2
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
diff --git a/lib/backtrace.c b/lib/backtrace.c
|
||||
index 5b61ffe..f77e489 100644
|
||||
--- a/lib/backtrace.c
|
||||
+++ b/lib/backtrace.c
|
||||
@@ -123,6 +123,6 @@ backtrace_capture(struct backtrace *bt)
|
||||
}
|
||||
bt->n_frames = n;
|
||||
#else
|
||||
- bt->n_frames = backtrace(bt->frames, BACKTRACE_MAX_FRAMES);
|
||||
+ bt->n_frames = backtrace((void **)bt->frames, BACKTRACE_MAX_FRAMES);
|
||||
#endif
|
||||
}
|
||||
diff --git a/lib/flow.c b/lib/flow.c
|
||||
index 523eff0..4a1bf7b 100644
|
||||
--- a/lib/flow.c
|
||||
+++ b/lib/flow.c
|
||||
@@ -44,11 +44,10 @@
|
||||
#include "vlog.h"
|
||||
#define THIS_MODULE VLM_flow
|
||||
|
||||
-static struct arp_header *
|
||||
+static struct arp_eth_header *
|
||||
pull_arp(struct ofpbuf *packet)
|
||||
{
|
||||
if (packet->size >= ARP_ETH_HEADER_LEN) {
|
||||
- struct arp_eth_header *arp = packet->data;
|
||||
return ofpbuf_pull(packet, ARP_ETH_HEADER_LEN);
|
||||
}
|
||||
return NULL;
|
||||
diff --git a/lib/socket-util.c b/lib/socket-util.c
|
||||
index c7b5d6d..5b3d602 100644
|
||||
--- a/lib/socket-util.c
|
||||
+++ b/lib/socket-util.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <sys/resource.h>
|
||||
+#include <sys/stat.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
#include "fatal-signal.h"
|
||||
diff --git a/lib/stp.c b/lib/stp.c
|
||||
index b638311..b81ae53 100644
|
||||
--- a/lib/stp.c
|
||||
+++ b/lib/stp.c
|
||||
@@ -34,6 +34,7 @@
|
||||
/* Based on sample implementation in 802.1D-1998. Above copyright and license
|
||||
* applies to all modifications. */
|
||||
|
||||
+#include <config.h>
|
||||
#include "stp.h"
|
||||
#include <arpa/inet.h>
|
||||
#include <assert.h>
|
||||
diff --git a/lib/util.c b/lib/util.c
|
||||
index 21cc28d..1f341b1 100644
|
||||
--- a/lib/util.c
|
||||
+++ b/lib/util.c
|
||||
@@ -138,6 +138,7 @@ xasprintf(const char *format, ...)
|
||||
return s;
|
||||
}
|
||||
|
||||
+#ifndef HAVE_STRLCPY
|
||||
void
|
||||
strlcpy(char *dst, const char *src, size_t size)
|
||||
{
|
||||
@@ -148,6 +149,7 @@ strlcpy(char *dst, const char *src, size_t size)
|
||||
dst[n_copy] = '\0';
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
void
|
||||
ofp_fatal(int err_no, const char *format, ...)
|
||||
diff --git a/lib/util.h b/lib/util.h
|
||||
index fde681f..dc4e71f 100644
|
||||
--- a/lib/util.h
|
||||
+++ b/lib/util.h
|
||||
@@ -34,6 +34,10 @@
|
||||
#ifndef UTIL_H
|
||||
#define UTIL_H 1
|
||||
|
||||
+#if HAVE_CONFIG_H
|
||||
+#include <config.h>
|
||||
+#endif
|
||||
+
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
+2
-2
@@ -64,7 +64,7 @@ VMImageDir = os.environ[ 'HOME' ] + '/vm-images'
|
||||
Prompt = '\$ ' # Shell prompt that pexpect will wait for
|
||||
|
||||
|
||||
# URLs for Ubunto .iso images
|
||||
# URLs for Ubuntu .iso images
|
||||
|
||||
def serverURL( version, arch ):
|
||||
"Return .iso URL for Ubuntu version and arch"
|
||||
@@ -227,7 +227,7 @@ def attachNBD( cow, flags='' ):
|
||||
|
||||
|
||||
def detachNBD( nbd ):
|
||||
"Detatch an nbd device"
|
||||
"Detach an nbd device"
|
||||
srun( 'qemu-nbd -d ' + nbd )
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user