diff options
-rw-r--r-- | net/openvswitch/datapath.c | 3 | ||||
-rw-r--r-- | net/openvswitch/vport-internal_dev.c | 1 | ||||
-rw-r--r-- | net/openvswitch/vport-netdev.c | 7 | ||||
-rw-r--r-- | net/openvswitch/vport-netdev.h | 1 | ||||
-rw-r--r-- | net/openvswitch/vport.h | 2 |
5 files changed, 2 insertions, 12 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 74a5fe6feae3..d12d6b8b5e8b 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include "datapath.h" | 56 | #include "datapath.h" |
57 | #include "flow.h" | 57 | #include "flow.h" |
58 | #include "vport-internal_dev.h" | 58 | #include "vport-internal_dev.h" |
59 | #include "vport-netdev.h" | ||
59 | 60 | ||
60 | 61 | ||
61 | #define REHASH_FLOW_INTERVAL (10 * 60 * HZ) | 62 | #define REHASH_FLOW_INTERVAL (10 * 60 * HZ) |
@@ -151,7 +152,7 @@ static int get_dpifindex(struct datapath *dp) | |||
151 | 152 | ||
152 | local = ovs_vport_rcu(dp, OVSP_LOCAL); | 153 | local = ovs_vport_rcu(dp, OVSP_LOCAL); |
153 | if (local) | 154 | if (local) |
154 | ifindex = local->ops->get_ifindex(local); | 155 | ifindex = netdev_vport_priv(local)->dev->ifindex; |
155 | else | 156 | else |
156 | ifindex = 0; | 157 | ifindex = 0; |
157 | 158 | ||
diff --git a/net/openvswitch/vport-internal_dev.c b/net/openvswitch/vport-internal_dev.c index 73682de8dc69..84e0a0379186 100644 --- a/net/openvswitch/vport-internal_dev.c +++ b/net/openvswitch/vport-internal_dev.c | |||
@@ -232,7 +232,6 @@ const struct vport_ops ovs_internal_vport_ops = { | |||
232 | .create = internal_dev_create, | 232 | .create = internal_dev_create, |
233 | .destroy = internal_dev_destroy, | 233 | .destroy = internal_dev_destroy, |
234 | .get_name = ovs_netdev_get_name, | 234 | .get_name = ovs_netdev_get_name, |
235 | .get_ifindex = ovs_netdev_get_ifindex, | ||
236 | .send = internal_dev_recv, | 235 | .send = internal_dev_recv, |
237 | }; | 236 | }; |
238 | 237 | ||
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c index 40a89ae8e19f..4f01c6d2ffa4 100644 --- a/net/openvswitch/vport-netdev.c +++ b/net/openvswitch/vport-netdev.c | |||
@@ -150,12 +150,6 @@ const char *ovs_netdev_get_name(const struct vport *vport) | |||
150 | return netdev_vport->dev->name; | 150 | return netdev_vport->dev->name; |
151 | } | 151 | } |
152 | 152 | ||
153 | int ovs_netdev_get_ifindex(const struct vport *vport) | ||
154 | { | ||
155 | const struct netdev_vport *netdev_vport = netdev_vport_priv(vport); | ||
156 | return netdev_vport->dev->ifindex; | ||
157 | } | ||
158 | |||
159 | static unsigned int packet_length(const struct sk_buff *skb) | 153 | static unsigned int packet_length(const struct sk_buff *skb) |
160 | { | 154 | { |
161 | unsigned int length = skb->len - ETH_HLEN; | 155 | unsigned int length = skb->len - ETH_HLEN; |
@@ -206,6 +200,5 @@ const struct vport_ops ovs_netdev_vport_ops = { | |||
206 | .create = netdev_create, | 200 | .create = netdev_create, |
207 | .destroy = netdev_destroy, | 201 | .destroy = netdev_destroy, |
208 | .get_name = ovs_netdev_get_name, | 202 | .get_name = ovs_netdev_get_name, |
209 | .get_ifindex = ovs_netdev_get_ifindex, | ||
210 | .send = netdev_send, | 203 | .send = netdev_send, |
211 | }; | 204 | }; |
diff --git a/net/openvswitch/vport-netdev.h b/net/openvswitch/vport-netdev.h index 6478079b3417..a3cb3a32cd77 100644 --- a/net/openvswitch/vport-netdev.h +++ b/net/openvswitch/vport-netdev.h | |||
@@ -40,6 +40,5 @@ netdev_vport_priv(const struct vport *vport) | |||
40 | 40 | ||
41 | const char *ovs_netdev_get_name(const struct vport *); | 41 | const char *ovs_netdev_get_name(const struct vport *); |
42 | const char *ovs_netdev_get_config(const struct vport *); | 42 | const char *ovs_netdev_get_config(const struct vport *); |
43 | int ovs_netdev_get_ifindex(const struct vport *); | ||
44 | 43 | ||
45 | #endif /* vport_netdev.h */ | 44 | #endif /* vport_netdev.h */ |
diff --git a/net/openvswitch/vport.h b/net/openvswitch/vport.h index 7ba08c30b853..68a377bc0841 100644 --- a/net/openvswitch/vport.h +++ b/net/openvswitch/vport.h | |||
@@ -124,7 +124,6 @@ struct vport_parms { | |||
124 | * have any configuration. | 124 | * have any configuration. |
125 | * @get_name: Get the device's name. | 125 | * @get_name: Get the device's name. |
126 | * @get_config: Get the device's configuration. | 126 | * @get_config: Get the device's configuration. |
127 | * @get_ifindex: Get the system interface index associated with the device. | ||
128 | * May be null if the device does not have an ifindex. | 127 | * May be null if the device does not have an ifindex. |
129 | * @send: Send a packet on the device. Returns the length of the packet sent. | 128 | * @send: Send a packet on the device. Returns the length of the packet sent. |
130 | */ | 129 | */ |
@@ -141,7 +140,6 @@ struct vport_ops { | |||
141 | /* Called with rcu_read_lock or ovs_mutex. */ | 140 | /* Called with rcu_read_lock or ovs_mutex. */ |
142 | const char *(*get_name)(const struct vport *); | 141 | const char *(*get_name)(const struct vport *); |
143 | void (*get_config)(const struct vport *, void *); | 142 | void (*get_config)(const struct vport *, void *); |
144 | int (*get_ifindex)(const struct vport *); | ||
145 | 143 | ||
146 | int (*send)(struct vport *, struct sk_buff *); | 144 | int (*send)(struct vport *, struct sk_buff *); |
147 | }; | 145 | }; |