aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/vport.c')
-rw-r--r--net/openvswitch/vport.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 2034c6d9cb5a..067a3fff1d2c 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -274,10 +274,8 @@ void ovs_vport_del(struct vport *vport)
274 ASSERT_OVSL(); 274 ASSERT_OVSL();
275 275
276 hlist_del_rcu(&vport->hash_node); 276 hlist_del_rcu(&vport->hash_node);
277
278 vport->ops->destroy(vport);
279
280 module_put(vport->ops->owner); 277 module_put(vport->ops->owner);
278 vport->ops->destroy(vport);
281} 279}
282 280
283/** 281/**
@@ -480,7 +478,8 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
480 stats = this_cpu_ptr(vport->percpu_stats); 478 stats = this_cpu_ptr(vport->percpu_stats);
481 u64_stats_update_begin(&stats->syncp); 479 u64_stats_update_begin(&stats->syncp);
482 stats->rx_packets++; 480 stats->rx_packets++;
483 stats->rx_bytes += skb->len + (vlan_tx_tag_present(skb) ? VLAN_HLEN : 0); 481 stats->rx_bytes += skb->len +
482 (skb_vlan_tag_present(skb) ? VLAN_HLEN : 0);
484 u64_stats_update_end(&stats->syncp); 483 u64_stats_update_end(&stats->syncp);
485 484
486 OVS_CB(skb)->input_vport = vport; 485 OVS_CB(skb)->input_vport = vport;
@@ -594,14 +593,7 @@ int ovs_tunnel_get_egress_info(struct ovs_tunnel_info *egress_tun_info,
594 * The process may need to be changed if the corresponding process 593 * The process may need to be changed if the corresponding process
595 * in vports ops changed. 594 * in vports ops changed.
596 */ 595 */
597 memset(&fl, 0, sizeof(fl)); 596 rt = ovs_tunnel_route_lookup(net, tun_key, skb_mark, &fl, ipproto);
598 fl.daddr = tun_key->ipv4_dst;
599 fl.saddr = tun_key->ipv4_src;
600 fl.flowi4_tos = RT_TOS(tun_key->ipv4_tos);
601 fl.flowi4_mark = skb_mark;
602 fl.flowi4_proto = ipproto;
603
604 rt = ip_route_output_key(net, &fl);
605 if (IS_ERR(rt)) 597 if (IS_ERR(rt))
606 return PTR_ERR(rt); 598 return PTR_ERR(rt);
607 599