Only log unprocessed packets in the controller if debugging enabled.
authorBen Pfaff <blp@nicira.com>
Wed, 4 Jun 2008 17:54:01 +0000 (10:54 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 9 Jun 2008 17:27:49 +0000 (10:27 -0700)
Otherwise OFP_FLOW_EXPIRED messages tend to swamp the console after
a while.

controller/controller.c

index 387f8c74fd6ff486e105507df86dd2402de949c5..3a29043df729df269917ae950d1194f6338dfd4e 100644 (file)
@@ -347,7 +347,11 @@ process_packet(struct switch_ *sw, struct buffer *msg)
             process_packet_in(sw, opi);
         }
     } else {
-        ofp_print(stdout, msg->data, msg->size, 2); 
+        if (VLOG_IS_DBG_ENABLED()) {
+            char *p = ofp_to_string(msg->data, msg->size, 2);
+            VLOG_DBG("OpenFlow packet ignored: %s", p);
+            free(p);
+        }
     }
 }