summaryrefslogtreecommitdiffstats
path: root/net/openvswitch/vport.c
diff options
context:
space:
mode:
authorPravin B Shelar <pshelar@nicira.com>2014-09-16 04:28:44 +0200
committerPravin B Shelar <pshelar@nicira.com>2014-09-16 08:28:13 +0200
commit8c8b1b83fcdd0f05e1f66ed6f8a2e831d5d374a2 (patch)
tree639e2202b5ded18df0c38daabedcdeeb3e6c2482 /net/openvswitch/vport.c
parentopenvswitch: refactor ovs flow extract API. (diff)
downloadlinux-8c8b1b83fcdd0f05e1f66ed6f8a2e831d5d374a2.tar.xz
linux-8c8b1b83fcdd0f05e1f66ed6f8a2e831d5d374a2.zip
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.c12
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,
struct ovs_key_ipv4_tunnel *tun_key)
{
struct pcpu_sw_netstats *stats;
+ struct sw_flow_key key;
+ int error;
stats = this_cpu_ptr(vport->percpu_stats);
u64_stats_update_begin(&stats->syncp);
@@ -442,9 +444,15 @@ void ovs_vport_receive(struct vport *vport, struct sk_buff *skb,
stats->rx_bytes += skb->len;
u64_stats_update_end(&stats->syncp);
- OVS_CB(skb)->tun_key = tun_key;
OVS_CB(skb)->input_vport = vport;
- ovs_dp_process_received_packet(skb);
+ OVS_CB(skb)->egress_tun_key = NULL;
+ /* Extract flow from 'skb' into 'key'. */
+ error = ovs_flow_key_extract(tun_key, skb, &key);
+ if (unlikely(error)) {
+ kfree_skb(skb);
+ return;
+ }
+ ovs_dp_process_packet(skb, &key);
}
/**