projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ofproto-dpif: Properly update tos and ttl fields.
[openvswitch]
/
datapath
/
dp_notify.c
diff --git
a/datapath/dp_notify.c
b/datapath/dp_notify.c
index 122b2fa989a9838f9d3940a6afae64c8a96c77c1..d040d46e7f11c185b948873a4f81645ba32bcbec 100644
(file)
--- a/
datapath/dp_notify.c
+++ b/
datapath/dp_notify.c
@@
-24,53
+24,50
@@
#include "vport-netdev.h"
static int dp_device_event(struct notifier_block *unused, unsigned long event,
#include "vport-netdev.h"
static int dp_device_event(struct notifier_block *unused, unsigned long event,
- void *ptr)
+
void *ptr)
{
struct net_device *dev = ptr;
struct vport *vport;
{
struct net_device *dev = ptr;
struct vport *vport;
- struct datapath *dp;
- if (is_internal_dev(dev))
- vport = internal_dev_get_vport(dev);
+ if (
ovs_
is_internal_dev(dev))
+ vport =
ovs_
internal_dev_get_vport(dev);
else
else
- vport = netdev_get_vport(dev);
+ vport =
ovs_
netdev_get_vport(dev);
if (!vport)
return NOTIFY_DONE;
if (!vport)
return NOTIFY_DONE;
- dp = vport->dp;
-
switch (event) {
case NETDEV_UNREGISTER:
switch (event) {
case NETDEV_UNREGISTER:
- if (!is_internal_dev(dev)) {
- struct sk_buff *
repl
y;
+ if (!
ovs_
is_internal_dev(dev)) {
+ struct sk_buff *
notif
y;
-
repl
y = ovs_vport_cmd_build_info(vport, 0, 0,
- OVS_VPORT_CMD_DEL);
- dp_detach_port(vport);
- if (IS_ERR(
repl
y)) {
+
notif
y = ovs_vport_cmd_build_info(vport, 0, 0,
+
OVS_VPORT_CMD_DEL);
+
ovs_
dp_detach_port(vport);
+ if (IS_ERR(
notif
y)) {
netlink_set_err(INIT_NET_GENL_SOCK, 0,
netlink_set_err(INIT_NET_GENL_SOCK, 0,
- dp_vport_multicast_group.id,
- PTR_ERR(
repl
y));
+
ovs_
dp_vport_multicast_group.id,
+ PTR_ERR(
notif
y));
break;
}
break;
}
- genl_notify(reply, dev_net(dev), 0,
- dp_vport_multicast_group.id, NULL,
- GFP_KERNEL);
+ genlmsg_multicast(notify, 0, ovs_dp_vport_multicast_group.id,
+ GFP_KERNEL);
}
break;
case NETDEV_CHANGENAME:
if (vport->port_no != OVSP_LOCAL) {
}
break;
case NETDEV_CHANGENAME:
if (vport->port_no != OVSP_LOCAL) {
- dp_sysfs_del_if(vport);
- dp_sysfs_add_if(vport);
+
ovs_
dp_sysfs_del_if(vport);
+
ovs_
dp_sysfs_add_if(vport);
}
break;
}
}
break;
}
+
return NOTIFY_DONE;
}
return NOTIFY_DONE;
}
-struct notifier_block dp_device_notifier = {
+struct notifier_block
ovs_
dp_device_notifier = {
.notifier_call = dp_device_event
};
.notifier_call = dp_device_event
};