datapath: iptunnels: remove net arg from iptunnel_xmit().
authorPravin B Shelar <pshelar@nicira.com>
Fri, 6 Sep 2013 18:39:09 +0000 (11:39 -0700)
committerPravin B Shelar <pshelar@nicira.com>
Sat, 7 Sep 2013 20:56:01 +0000 (13:56 -0700)
Backport of upstream commit 8b7ed2d91d6af (iptunnels: remove
net arg from iptunnel_xmit()).

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Acked-by: Jesse Gross <jesse@nicira.com>
datapath/linux/compat/include/net/ip_tunnels.h
datapath/linux/compat/ip_tunnels_core.c
datapath/linux/compat/vxlan.c
datapath/vport-gre.c
datapath/vport-lisp.c

index 14f55d0..a786aa9 100644 (file)
@@ -31,7 +31,7 @@ struct tnl_ptk_info {
 #define PACKET_RCVD    0
 #define PACKET_REJECT  1
 
-int iptunnel_xmit(struct net *net, struct rtable *rt,
+int iptunnel_xmit(struct rtable *rt,
                  struct sk_buff *skb,
                  __be32 src, __be32 dst, __u8 proto,
                  __u8 tos, __u8 ttl, __be16 df);
index f9f6cae..66d5e02 100644 (file)
@@ -34,7 +34,7 @@
 #include "compat.h"
 #include "gso.h"
 
-int iptunnel_xmit(struct net *net, struct rtable *rt,
+int iptunnel_xmit(struct rtable *rt,
                  struct sk_buff *skb,
                  __be32 src, __be32 dst, __u8 proto,
                  __u8 tos, __u8 ttl, __be16 df)
index d774b6c..74ac0d5 100644 (file)
@@ -259,8 +259,7 @@ int vxlan_xmit_skb(struct net *net, struct vxlan_sock *vs,
        if (err)
                return err;
 
-       return iptunnel_xmit(net, rt, skb, src, dst,
-                       IPPROTO_UDP, tos, ttl, df);
+       return iptunnel_xmit(rt, skb, src, dst, IPPROTO_UDP, tos, ttl, df);
 }
 
 static void rcu_free_vs(struct rcu_head *rcu)
index a49002f..b6c1d6f 100644 (file)
@@ -122,7 +122,6 @@ static int __send(struct vport *vport, struct sk_buff *skb,
                  int tunnel_hlen,
                  __be32 seq, __be16 gre64_flag)
 {
-       struct net *net = ovs_dp_get_net(vport->dp);
        struct rtable *rt;
        int min_headroom;
        __be16 df;
@@ -178,7 +177,7 @@ static int __send(struct vport *vport, struct sk_buff *skb,
 
        skb->local_df = 1;
 
-       return iptunnel_xmit(net, rt, skb, saddr,
+       return iptunnel_xmit(rt, skb, saddr,
                             OVS_CB(skb)->tun_key->ipv4_dst, IPPROTO_GRE,
                             OVS_CB(skb)->tun_key->ipv4_tos,
                             OVS_CB(skb)->tun_key->ipv4_ttl, df);
index b1581ef..c7da276 100644 (file)
@@ -393,7 +393,6 @@ static void handle_offloads(struct sk_buff *skb)
 
 static int lisp_send(struct vport *vport, struct sk_buff *skb)
 {
-       struct net *net = ovs_dp_get_net(vport->dp);
        int network_offset = skb_network_offset(skb);
        struct rtable *rt;
        int min_headroom;
@@ -453,7 +452,7 @@ static int lisp_send(struct vport *vport, struct sk_buff *skb)
 
        df = OVS_CB(skb)->tun_key->tun_flags &
                                  TUNNEL_DONT_FRAGMENT ?  htons(IP_DF) : 0;
-       sent_len = iptunnel_xmit(net, rt, skb,
+       sent_len = iptunnel_xmit(rt, skb,
                             saddr, OVS_CB(skb)->tun_key->ipv4_dst,
                             IPPROTO_UDP, OVS_CB(skb)->tun_key->ipv4_tos,
                             OVS_CB(skb)->tun_key->ipv4_ttl, df);