Skip to content
Snippets Groups Projects
Commit 804c4bbf authored by Bob Lantz's avatar Bob Lantz
Browse files

Workaround: add dpopts to UserSwitch

Currently, slicing on the user switch breaks bandwidth limits.
We don't yet have a good way of using both of them at the same time.
I'm inclined to turn off slicing by default, but I have to think
about it and also see if any one is using it...
parent 1a658054
No related branches found
No related tags found
No related merge requests found
...@@ -801,7 +801,7 @@ class UserSwitch( Switch ): ...@@ -801,7 +801,7 @@ class UserSwitch( Switch ):
dpidLen = 12 dpidLen = 12
def __init__( self, name, **kwargs ): def __init__( self, name, dpopts='', **kwargs ):
"""Init. """Init.
name: name for the switch""" name: name for the switch"""
Switch.__init__( self, name, **kwargs ) Switch.__init__( self, name, **kwargs )
...@@ -810,6 +810,7 @@ def __init__( self, name, **kwargs ): ...@@ -810,6 +810,7 @@ def __init__( self, name, **kwargs ):
'(openflow.org)' ) '(openflow.org)' )
if self.listenPort: if self.listenPort:
self.opts += ' --listen=ptcp:%i ' % self.listenPort self.opts += ' --listen=ptcp:%i ' % self.listenPort
self.dpopts = dpopts
@classmethod @classmethod
def setup( cls ): def setup( cls ):
...@@ -840,7 +841,8 @@ def start( self, controllers ): ...@@ -840,7 +841,8 @@ def start( self, controllers ):
self.cmd( 'ifconfig lo up' ) self.cmd( 'ifconfig lo up' )
intfs = [ str( i ) for i in self.intfList() if not i.IP() ] intfs = [ str( i ) for i in self.intfList() if not i.IP() ]
self.cmd( 'ofdatapath -i ' + ','.join( intfs ) + self.cmd( 'ofdatapath -i ' + ','.join( intfs ) +
' punix:/tmp/' + self.name + ' -d ' + self.dpid + ' punix:/tmp/' + self.name + ' -d %s ' % self.dpid +
self.dpopts +
' 1> ' + ofdlog + ' 2> ' + ofdlog + ' &' ) ' 1> ' + ofdlog + ' 2> ' + ofdlog + ' &' )
self.cmd( 'ofprotocol unix:/tmp/' + self.name + self.cmd( 'ofprotocol unix:/tmp/' + self.name +
' ' + clist + ' ' + clist +
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment