dpif: Log port number of deleted port in dpif_port_del().
authorBen Pfaff <blp@nicira.com>
Fri, 3 Dec 2010 22:42:28 +0000 (14:42 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 3 Dec 2010 22:42:28 +0000 (14:42 -0800)
This made tracking down a particular bug easier for me.  (It's too bad that
we can't log the port name, but we don't have it here.)

lib/dpif.c

index 952e1a2db869db2361f9a6c57e9f8fb186f7f86a..03e13acc51b5877aa86eb367c9b2a7942bf979eb 100644 (file)
@@ -482,7 +482,12 @@ dpif_port_del(struct dpif *dpif, uint16_t port_no)
     COVERAGE_INC(dpif_port_del);
 
     error = dpif->dpif_class->port_del(dpif, port_no);
-    log_operation(dpif, "port_del", error);
+    if (!error) {
+        VLOG_DBG_RL(&dpmsg_rl, "%s: port_del(%"PRIu16")",
+                    dpif_name(dpif), port_no);
+    } else {
+        log_operation(dpif, "port_del", error);
+    }
     return error;
 }