bridge: improve vlan mode related error messages when adding port
authorThomas Graf <tgraf@redhat.com>
Wed, 9 Apr 2014 15:19:17 +0000 (17:19 +0200)
committerBen Pfaff <blp@nicira.com>
Wed, 9 Apr 2014 16:57:42 +0000 (09:57 -0700)
Inform about fallback to trunk mode and convert errors to warnings
when we are not failing.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
vswitchd/bridge.c

index 24b3602..f46d002 100644 (file)
@@ -839,15 +839,16 @@ port_configure(struct port *port)
             s.vlan_mode = PORT_VLAN_NATIVE_UNTAGGED;
         } else {
             /* This "can't happen" because ovsdb-server should prevent it. */
-            VLOG_ERR("unknown VLAN mode %s", cfg->vlan_mode);
+            VLOG_WARN("port %s: unknown VLAN mode %s, falling "
+                      "back to trunk mode", port->name, cfg->vlan_mode);
             s.vlan_mode = PORT_VLAN_TRUNK;
         }
     } else {
         if (s.vlan >= 0) {
             s.vlan_mode = PORT_VLAN_ACCESS;
             if (cfg->n_trunks) {
-                VLOG_ERR("port %s: ignoring trunks in favor of implicit vlan",
-                         port->name);
+                VLOG_WARN("port %s: ignoring trunks in favor of implicit vlan",
+                          port->name);
             }
         } else {
             s.vlan_mode = PORT_VLAN_TRUNK;