From: Ben Pfaff Date: Wed, 4 Jun 2008 17:54:01 +0000 (-0700) Subject: Only log unprocessed packets in the controller if debugging enabled. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f4da69c169f4a69d8563ebf8dbe8934748fb969;p=openvswitch Only log unprocessed packets in the controller if debugging enabled. Otherwise OFP_FLOW_EXPIRED messages tend to swamp the console after a while. --- diff --git a/controller/controller.c b/controller/controller.c index 387f8c74..3a29043d 100644 --- a/controller/controller.c +++ b/controller/controller.c @@ -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); + } } }