diff options
author | Fan Du <fan.du@intel.com> | 2015-01-14 00:10:35 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-01-14 16:32:06 -0500 |
commit | 3f4c1d87af2a0c8a599b95bfebbc6338de343aca (patch) | |
tree | eb8a54a9c56cec232bbebf303c18f749965a1e59 /net/openvswitch/vport.c | |
parent | 2733135329e9bbc306be9f58af1b4be92b359d23 (diff) |
openvswitch: Introduce ovs_tunnel_route_lookup
Introduce ovs_tunnel_route_lookup to consolidate route lookup
shared by vxlan, gre, and geneve ports.
Signed-off-by: Fan Du <fan.du@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/vport.c')
-rw-r--r-- | net/openvswitch/vport.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c index 464739aac0f3..ec2954ffc690 100644 --- a/net/openvswitch/vport.c +++ b/net/openvswitch/vport.c | |||
@@ -595,14 +595,7 @@ int ovs_tunnel_get_egress_info(struct ovs_tunnel_info *egress_tun_info, | |||
595 | * The process may need to be changed if the corresponding process | 595 | * The process may need to be changed if the corresponding process |
596 | * in vports ops changed. | 596 | * in vports ops changed. |
597 | */ | 597 | */ |
598 | memset(&fl, 0, sizeof(fl)); | 598 | rt = ovs_tunnel_route_lookup(net, tun_key, skb_mark, &fl, ipproto); |
599 | fl.daddr = tun_key->ipv4_dst; | ||
600 | fl.saddr = tun_key->ipv4_src; | ||
601 | fl.flowi4_tos = RT_TOS(tun_key->ipv4_tos); | ||
602 | fl.flowi4_mark = skb_mark; | ||
603 | fl.flowi4_proto = ipproto; | ||
604 | |||
605 | rt = ip_route_output_key(net, &fl); | ||
606 | if (IS_ERR(rt)) | 599 | if (IS_ERR(rt)) |
607 | return PTR_ERR(rt); | 600 | return PTR_ERR(rt); |
608 | 601 | ||