[ovs-dev] [link_resets 3/7] vswitchd: Remove iface_get_carrier().
Ethan Jackson
ethan at nicira.com
Mon Oct 17 19:10:20 UTC 2011
It has only one caller, and doesn't improve the code's readability.
---
vswitchd/bridge.c | 16 +++-------------
1 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index 186f250..d6a437f 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -201,7 +201,6 @@ static void iface_configure_cfm(struct iface *);
static void iface_refresh_cfm_stats(struct iface *);
static void iface_refresh_stats(struct iface *);
static void iface_refresh_status(struct iface *);
-static bool iface_get_carrier(const struct iface *);
static bool iface_is_synthetic(const struct iface *);
static void shash_from_ovs_idl_map(char **keys, char **values, size_t n,
@@ -1269,7 +1268,9 @@ iface_refresh_status(struct iface *iface)
}
ovsrec_interface_set_link_state(iface->cfg,
- iface_get_carrier(iface) ? "up" : "down");
+ (netdev_get_carrier(iface->netdev)
+ ? "up"
+ : "down"));
error = netdev_get_mtu(iface->netdev, &mtu);
if (!error) {
@@ -2693,17 +2694,6 @@ iface_configure_cfm(struct iface *iface)
ofproto_port_set_cfm(iface->port->bridge->ofproto, iface->ofp_port, &s);
}
-/* Read carrier or miimon status directly from 'iface''s netdev, according to
- * how 'iface''s port is configured.
- *
- * Returns true if 'iface' is up, false otherwise. */
-static bool
-iface_get_carrier(const struct iface *iface)
-{
- /* XXX */
- return netdev_get_carrier(iface->netdev);
-}
-
/* Returns true if 'iface' is synthetic, that is, if we constructed it locally
* instead of obtaining it from the database. */
static bool
--
1.7.6.1
More information about the dev
mailing list