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

Change default to vanilla Intf. Also edit comments.

parent 8688ca92
No related branches found
No related tags found
No related merge requests found
""" """
link.py: interface and link abstractions for mininet link.py: interface and link abstractions for mininet
It seems useful to bundle functionality for interfaces into a single It seems useful to bundle functionality for interfaces into a single
...@@ -19,6 +18,10 @@ ...@@ -19,6 +18,10 @@
Intfs: know how to configure themselves Intfs: know how to configure themselves
Links: know how to connect nodes together Links: know how to connect nodes together
Intf: basic interface object that can configure itself
TCIntf: interface with bandwidth limiting and delay via tc
Link: basic link class for creating veth pairs
""" """
from mininet.log import info, error, debug from mininet.log import info, error, debug
...@@ -26,7 +29,7 @@ ...@@ -26,7 +29,7 @@
from time import sleep from time import sleep
import re import re
class BasicIntf( object ): class Intf( object ):
"Basic interface object that can configure itself." "Basic interface object that can configure itself."
...@@ -146,7 +149,7 @@ def __str__( self ): ...@@ -146,7 +149,7 @@ def __str__( self ):
return self.name return self.name
class TCIntf( BasicIntf ): class TCIntf( Intf ):
"Interface customized by tc (traffic control) utility" "Interface customized by tc (traffic control) utility"
def config( self, bw=None, delay=None, loss=0, disable_gro=True, def config( self, bw=None, delay=None, loss=0, disable_gro=True,
...@@ -154,7 +157,7 @@ def config( self, bw=None, delay=None, loss=0, disable_gro=True, ...@@ -154,7 +157,7 @@ def config( self, bw=None, delay=None, loss=0, disable_gro=True,
enable_red=False, max_queue_size=1000, **params ): enable_red=False, max_queue_size=1000, **params ):
"Configure the port and set its properties." "Configure the port and set its properties."
result = BasicIntf.config( self, **params) result = Intf.config( self, **params)
# disable GRO # disable GRO
if disable_gro: if disable_gro:
...@@ -241,7 +244,6 @@ def doConfigPort(s): ...@@ -241,7 +244,6 @@ def doConfigPort(s):
result[ 'tcoutputs'] = tcoutputs result[ 'tcoutputs'] = tcoutputs
return result return result
Intf = TCIntf
class Link( object ): class Link( object ):
......
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