diff options
author | Benjamin Eggerstedt <benjamin.eggerstedt@gmail.com> | 2014-10-29 21:01:11 +0100 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2014-11-01 05:05:01 +0100 |
commit | 8fd7b9098aa347fb0193fcc77650a9f544242fff (patch) | |
tree | a22deca469cf9bf9a4b8426a5f75708a8155a2db | |
parent | b6093c304987cfc71901cb1c4ae9ee5779f83317 (diff) |
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>
-rw-r--r-- | ryu/app/simple_switch_13.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ryu/app/simple_switch_13.py b/ryu/app/simple_switch_13.py index 14bf2a44..0e1574fd 100644 --- a/ryu/app/simple_switch_13.py +++ b/ryu/app/simple_switch_13.py @@ -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 |