[ovs-dev] [PATCH] netdev-vport: Report carrier state of tunnel egress interfaces.

Andrew Evans aevans at nicira.com
Wed Jan 19 22:56:41 UTC 2011


Record carrier state of tunnel egress interface in
"tunnel_egress_iface_carrier" key in "status" map of Interface table.
---
 lib/netdev-vport.c   |    2 ++
 vswitchd/vswitch.xml |    6 ++++++
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/lib/netdev-vport.c b/lib/netdev-vport.c
index 2d0d984..037590e 100644
--- a/lib/netdev-vport.c
+++ b/lib/netdev-vport.c
@@ -363,6 +363,8 @@ netdev_vport_get_status(const struct netdev *netdev, struct shash *sh)
 
     if (iface) {
         shash_add(sh, "tunnel_egress_iface", xstrdup(iface));
+        shash_add(sh, "tunnel_egress_iface_carrier",
+                  xstrdup(netdev_get_carrier(netdev) ? "up" : "down"));
     }
 
     return 0;
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index d92489c..dfa3f20 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -1062,6 +1062,12 @@
                 traffic destined for the configured <code>remote_ip</code>.
                 This could be an internal interface such as a bridge port.</dd>
         </dl>
+        <dl>
+            <dt><code>tunnel_egress_iface_carrier</code></dt>
+            <dd>Whether a carrier is detected on <ref
+            column="tunnel_egress_iface"/>.  Valid values are <code>down</code>
+            and <code>up</code>.</dd>
+        </dl>
       </column>
     </group>
 
-- 
1.7.2.3





More information about the dev mailing list