aboutsummaryrefslogtreecommitdiff
path: root/lib/dpif-linux.c
diff options
context:
space:
mode:
authorEthan Jackson <ethan@nicira.com>2011-08-19 17:50:32 -0700
committerEthan Jackson <ethan@nicira.com>2011-08-22 13:06:04 -0700
commitd8abf60c72e9a2ec4be5c8a4bf481da9dcde043a (patch)
tree42613c4d1c4fc402f3dc1eea4f1a795034e0ead2 /lib/dpif-linux.c
parent4e77828b64c604d74dda44be76d57fb1b7c46302 (diff)
dpif-linux: Call rtnetlink_notifier_run() as required.
I don't think this actually fixes a bug, as netdev-linux calls this function. However, it seems stylistically more correct.
Diffstat (limited to 'lib/dpif-linux.c')
-rw-r--r--lib/dpif-linux.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/dpif-linux.c b/lib/dpif-linux.c
index 2bcf96e0..55d22b40 100644
--- a/lib/dpif-linux.c
+++ b/lib/dpif-linux.c
@@ -308,6 +308,18 @@ dpif_linux_destroy(struct dpif *dpif_)
return dpif_linux_dp_transact(&dp, NULL, NULL);
}
+static void
+dpif_linux_run(struct dpif *dpif OVS_UNUSED)
+{
+ rtnetlink_link_notifier_run();
+}
+
+static void
+dpif_linux_wait(struct dpif *dpif OVS_UNUSED)
+{
+ rtnetlink_link_notifier_wait();
+}
+
static int
dpif_linux_get_stats(const struct dpif *dpif_, struct ovs_dp_stats *stats)
{
@@ -589,8 +601,6 @@ dpif_linux_port_poll_wait(const struct dpif *dpif_)
struct dpif_linux *dpif = dpif_linux_cast(dpif_);
if (!sset_is_empty(&dpif->changed_ports) || dpif->change_error) {
poll_immediate_wake();
- } else {
- rtnetlink_link_notifier_wait();
}
}
@@ -1048,8 +1058,8 @@ const struct dpif_class dpif_linux_class = {
dpif_linux_open,
dpif_linux_close,
dpif_linux_destroy,
- NULL, /* run */
- NULL, /* wait */
+ dpif_linux_run,
+ dpif_linux_wait,
dpif_linux_get_stats,
dpif_linux_get_drop_frags,
dpif_linux_set_drop_frags,