diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2014-09-15 22:28:44 -0400 |
---|---|---|
committer | Pravin B Shelar <pshelar@nicira.com> | 2014-09-16 02:28:13 -0400 |
commit | 8c8b1b83fcdd0f05e1f66ed6f8a2e831d5d374a2 (patch) | |
tree | 639e2202b5ded18df0c38daabedcdeeb3e6c2482 /net/openvswitch/vport.c | |
parent | 83c8df26a3b654871c0503fcf6eac61777e12ea1 (diff) |
openvswitch: Use tun_key only for egress tunnel path.
Currently tun_key is used for passing tunnel information
on ingress and egress path, this cause confusion. Following
patch removes its use on ingress path make it egress only parameter.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
Diffstat (limited to 'net/openvswitch/vport.c')
-rw-r--r-- | net/openvswitch/vport.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index acf31aa89e01..5df8377fcfb1 100644 --- a/net/openvswitch/vport.c +++ b/net/openvswitch/vport.c | |||
@@ -435,6 +435,8 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb, | |||
435 | struct ovs_key_ipv4_tunnel *tun_key) | 435 | struct ovs_key_ipv4_tunnel *tun_key) |
436 | { | 436 | { |
437 | struct pcpu_sw_netstats *stats; | 437 | struct pcpu_sw_netstats *stats; |
438 | struct sw_flow_key key; | ||
439 | int error; | ||
438 | 440 | ||
439 | stats = this_cpu_ptr(vport->percpu_stats); | 441 | stats = this_cpu_ptr(vport->percpu_stats); |
440 | u64_stats_update_begin(&stats->syncp); | 442 | u64_stats_update_begin(&stats->syncp); |
@@ -442,9 +444,15 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb, | |||
442 | stats->rx_bytes += skb->len; | 444 | stats->rx_bytes += skb->len; |
443 | u64_stats_update_end(&stats->syncp); | 445 | u64_stats_update_end(&stats->syncp); |
444 | 446 | ||
445 | OVS_CB(skb)->tun_key = tun_key; | ||
446 | OVS_CB(skb)->input_vport = vport; | 447 | OVS_CB(skb)->input_vport = vport; |
447 | ovs_dp_process_received_packet(skb); | 448 | OVS_CB(skb)->egress_tun_key = NULL; |
449 | /* Extract flow from 'skb' into 'key'. */ | ||
450 | error = ovs_flow_key_extract(tun_key, skb, &key); | ||
451 | if (unlikely(error)) { | ||
452 | kfree_skb(skb); | ||
453 | return; | ||
454 | } | ||
455 | ovs_dp_process_packet(skb, &key); | ||
448 | } | 456 | } |
449 | 457 | ||
450 | /** | 458 | /** |