aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/openvswitch/datapath.c')
-rw-r--r--net/openvswitch/datapath.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 2c74daa5aca5..d8277d29e710 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2007-2012 Nicira Networks. 2 * Copyright (c) 2007-2012 Nicira, Inc.
3 * 3 *
4 * This program is free software; you can redistribute it and/or 4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public 5 * modify it under the terms of version 2 of the GNU General Public
@@ -263,14 +263,15 @@ err:
263static int queue_gso_packets(int dp_ifindex, struct sk_buff *skb, 263static int queue_gso_packets(int dp_ifindex, struct sk_buff *skb,
264 const struct dp_upcall_info *upcall_info) 264 const struct dp_upcall_info *upcall_info)
265{ 265{
266 unsigned short gso_type = skb_shinfo(skb)->gso_type;
266 struct dp_upcall_info later_info; 267 struct dp_upcall_info later_info;
267 struct sw_flow_key later_key; 268 struct sw_flow_key later_key;
268 struct sk_buff *segs, *nskb; 269 struct sk_buff *segs, *nskb;
269 int err; 270 int err;
270 271
271 segs = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM); 272 segs = skb_gso_segment(skb, NETIF_F_SG | NETIF_F_HW_CSUM);
272 if (IS_ERR(skb)) 273 if (IS_ERR(segs))
273 return PTR_ERR(skb); 274 return PTR_ERR(segs);
274 275
275 /* Queue all of the segments. */ 276 /* Queue all of the segments. */
276 skb = segs; 277 skb = segs;
@@ -279,7 +280,7 @@ static int queue_gso_packets(int dp_ifindex, struct sk_buff *skb,
279 if (err) 280 if (err)
280 break; 281 break;
281 282
282 if (skb == segs && skb_shinfo(skb)->gso_type & SKB_GSO_UDP) { 283 if (skb == segs && gso_type & SKB_GSO_UDP) {
283 /* The initial flow key extracted by ovs_flow_extract() 284 /* The initial flow key extracted by ovs_flow_extract()
284 * in this case is for a first fragment, so we need to 285 * in this case is for a first fragment, so we need to
285 * properly mark later fragments. 286 * properly mark later fragments.
@@ -1649,7 +1650,9 @@ static int ovs_vport_cmd_set(struct sk_buff *skb, struct genl_info *info)
1649 1650
1650 if (!err && a[OVS_VPORT_ATTR_OPTIONS]) 1651 if (!err && a[OVS_VPORT_ATTR_OPTIONS])
1651 err = ovs_vport_set_options(vport, a[OVS_VPORT_ATTR_OPTIONS]); 1652 err = ovs_vport_set_options(vport, a[OVS_VPORT_ATTR_OPTIONS]);
1652 if (!err && a[OVS_VPORT_ATTR_UPCALL_PID]) 1653 if (err)
1654 goto exit_unlock;
1655 if (a[OVS_VPORT_ATTR_UPCALL_PID])
1653 vport->upcall_pid = nla_get_u32(a[OVS_VPORT_ATTR_UPCALL_PID]); 1656 vport->upcall_pid = nla_get_u32(a[OVS_VPORT_ATTR_UPCALL_PID]);
1654 1657
1655 reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq, 1658 reply = ovs_vport_cmd_build_info(vport, info->snd_pid, info->snd_seq,