summaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2015-09-14 20:08:51 -0500
committerEric W. Biederman <ebiederm@xmission.com>2015-09-30 01:45:01 -0500
commit188515fbc6b18e6bc6f2fa4629f1a77308197371 (patch)
tree61920f4b45a6c55c3700da51ee33bee7c2c4ae9f /net/openvswitch
parent4bf1b54f9df7ced4869f7dfd0bdf5eb22aa98447 (diff)
downloadlinux-stable-188515fbc6b18e6bc6f2fa4629f1a77308197371.tar.gz
linux-stable-188515fbc6b18e6bc6f2fa4629f1a77308197371.tar.bz2
linux-stable-188515fbc6b18e6bc6f2fa4629f1a77308197371.zip
openvswitch: Pass net into ovs_vport_output
When struct net starts being passed through the ipv4 and ipv6 fragment routines ovs_vport_output will need to take a net parameter. Prepare ovs_vport_output before that is needed and introduce ovs_vport_output_skk for the call sites that still need the old calling conventions. Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/actions.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 315f5330b6e5..f00c641ecd93 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -620,7 +620,7 @@ static int set_sctp(struct sk_buff *skb, struct sw_flow_key *flow_key,
return 0;
}
-static int ovs_vport_output(struct sock *sock, struct sk_buff *skb)
+static int ovs_vport_output(struct net *net, struct sock *sk, struct sk_buff *skb)
{
struct ovs_frag_data *data = this_cpu_ptr(&ovs_frag_data_storage);
struct vport *vport = data->vport;
@@ -645,6 +645,11 @@ static int ovs_vport_output(struct sock *sock, struct sk_buff *skb)
ovs_vport_send(vport, skb);
return 0;
}
+static int ovs_vport_output_sk(struct sock *sk, struct sk_buff *skb)
+{
+ struct net *net = dev_net(skb_dst(skb)->dev);
+ return ovs_vport_output(net, sk, skb);
+}
static unsigned int
ovs_dst_get_mtu(const struct dst_entry *dst)
@@ -700,7 +705,7 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
skb_dst_set_noref(skb, &ovs_dst);
IPCB(skb)->frag_max_size = mru;
- ip_do_fragment(skb->sk, skb, ovs_vport_output);
+ ip_do_fragment(skb->sk, skb, ovs_vport_output_sk);
refdst_drop(orig_dst);
} else if (ethertype == htons(ETH_P_IPV6)) {
const struct nf_ipv6_ops *v6ops = nf_get_ipv6_ops();
@@ -722,7 +727,7 @@ static void ovs_fragment(struct vport *vport, struct sk_buff *skb, u16 mru,
skb_dst_set_noref(skb, &ovs_rt.dst);
IP6CB(skb)->frag_max_size = mru;
- v6ops->fragment(skb->sk, skb, ovs_vport_output);
+ v6ops->fragment(skb->sk, skb, ovs_vport_output_sk);
refdst_drop(orig_dst);
} else {
WARN_ONCE(1, "Failed fragment ->%s: eth=%04x, MRU=%d, MTU=%d.",