mirror of
https://github.com/openvswitch/ovs
synced 2025-09-03 07:45:30 +00:00
netdev-linux: Rename "linux_netdev_*" to "rtnetlink_*".
It was getting to be too confusing to have both netdev_linux_* functions and linux_netdev_* functions. Rename the latter to make the distinction more obvious. "rtnetlink" seems to be a fairly good name because that's what the kernel calls it, so the name will be familiar at least to people who know about rtnetlink.
This commit is contained in:
@@ -52,7 +52,7 @@ struct dpif_linux {
|
||||
/* Change notification. */
|
||||
int local_ifindex; /* Ifindex of local port. */
|
||||
struct svec changed_ports; /* Ports that have changed. */
|
||||
struct linux_netdev_notifier port_notifier;
|
||||
struct rtnetlink_notifier port_notifier;
|
||||
bool change_error;
|
||||
};
|
||||
|
||||
@@ -64,7 +64,7 @@ static int finish_open(struct dpif *, const char *local_ifname);
|
||||
static int create_minor(const char *name, int minor, struct dpif **dpifp);
|
||||
static int open_minor(int minor, struct dpif **dpifp);
|
||||
static int make_openvswitch_device(int minor, char **fnp);
|
||||
static void dpif_linux_port_changed(const struct linux_netdev_change *,
|
||||
static void dpif_linux_port_changed(const struct rtnetlink_change *,
|
||||
void *dpif);
|
||||
|
||||
static struct dpif_linux *
|
||||
@@ -161,7 +161,7 @@ static void
|
||||
dpif_linux_close(struct dpif *dpif_)
|
||||
{
|
||||
struct dpif_linux *dpif = dpif_linux_cast(dpif_);
|
||||
linux_netdev_notifier_unregister(&dpif->port_notifier);
|
||||
rtnetlink_notifier_unregister(&dpif->port_notifier);
|
||||
svec_destroy(&dpif->changed_ports);
|
||||
free(dpif->local_ifname);
|
||||
close(dpif->fd);
|
||||
@@ -294,7 +294,7 @@ dpif_linux_port_poll_wait(const struct dpif *dpif_)
|
||||
if (dpif->changed_ports.n || dpif->change_error) {
|
||||
poll_immediate_wake();
|
||||
} else {
|
||||
linux_netdev_notifier_wait();
|
||||
rtnetlink_notifier_wait();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -698,8 +698,8 @@ open_minor(int minor, struct dpif **dpifp)
|
||||
fd = open(fn, O_RDONLY | O_NONBLOCK);
|
||||
if (fd >= 0) {
|
||||
struct dpif_linux *dpif = xmalloc(sizeof *dpif);
|
||||
error = linux_netdev_notifier_register(&dpif->port_notifier,
|
||||
dpif_linux_port_changed, dpif);
|
||||
error = rtnetlink_notifier_register(&dpif->port_notifier,
|
||||
dpif_linux_port_changed, dpif);
|
||||
if (!error) {
|
||||
char *name;
|
||||
|
||||
@@ -727,7 +727,7 @@ open_minor(int minor, struct dpif **dpifp)
|
||||
}
|
||||
|
||||
static void
|
||||
dpif_linux_port_changed(const struct linux_netdev_change *change, void *dpif_)
|
||||
dpif_linux_port_changed(const struct rtnetlink_change *change, void *dpif_)
|
||||
{
|
||||
struct dpif_linux *dpif = dpif_;
|
||||
|
||||
|
Reference in New Issue
Block a user