[controller,p4] add debug print into controller
This commit is contained in:
parent
e8e33c78ea
commit
949560c995
3 changed files with 31 additions and 2 deletions
|
|
@ -143,7 +143,7 @@ class L2Controller(object):
|
|||
|
||||
|
||||
def debug_print_pkg(self, pkg, msg="INCOMING"):
|
||||
log.info("{}: {}".format(msg, self.debug_format_pkg(pkg)))
|
||||
log.debug("{}: {}".format(msg, self.debug_format_pkg(pkg)))
|
||||
|
||||
def debug_format_pkg(self, pkg):
|
||||
packet = Ether(str(pkg))
|
||||
|
|
@ -169,6 +169,8 @@ class L2Controller(object):
|
|||
def recv_msg_cpu(self, pkg):
|
||||
packet = Ether(str(pkg))
|
||||
|
||||
debug_print_pkg(pkg)
|
||||
|
||||
if packet.type == 0x800:
|
||||
pass
|
||||
elif packet.type == 0x86dd:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue