simple_switch_13: Added a logging when running in --verbose for truncated packets

Added a logging when running in --verbose as truncated packets in packet_in
have caused some confusion and this would hopefully help others

Signed-off-by: Benjamin Eggerstedt <benjamin.eggerstedt@gmail.com>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
Benjamin Eggerstedt 2014-10-29 21:01:11 +01:00 committed by FUJITA Tomonori
parent b6093c3049
commit 8fd7b9098a

View File

@ -60,6 +60,11 @@ class SimpleSwitch13(app_manager.RyuApp):
@set_ev_cls(ofp_event.EventOFPPacketIn, MAIN_DISPATCHER)
def _packet_in_handler(self, ev):
# If you hit this you might want to increase
# the "miss_send_length" of your switch
if ev.msg.msg_len < ev.msg.total_len:
self.logger.debug("packet truncated: only %s of %s bytes",
ev.msg.msg_len, ev.msg.total_len)
msg = ev.msg
datapath = msg.datapath
ofproto = datapath.ofproto