aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2014-09-03 17:43:45 +0800
committerDavid S. Miller <davem@davemloft.net>2014-09-03 20:50:51 -0700
commitc5eba0b6f84eb4f0fdc1d8a4abc1c7d40db6e8a6 (patch)
treedadb7eee4a30c41aa95b37768af158556bc7e02a /net/openvswitch
parentamd-xgbe: Fix initialization of the wrong spin lock (diff)
downloadlinux-dev-c5eba0b6f84eb4f0fdc1d8a4abc1c7d40db6e8a6.tar.xz
linux-dev-c5eba0b6f84eb4f0fdc1d8a4abc1c7d40db6e8a6.zip
openvswitch: distinguish between the dropped and consumed skb
distinguish between the dropped and consumed skb, not assume the skb is consumed always Cc: Thomas Graf <tgraf@noironetworks.com> Cc: Pravin Shelar <pshelar@nicira.com> Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Acked-by: Pravin B Shelar <pshelar@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch')
-rw-r--r--net/openvswitch/datapath.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 35d866f036e7..91d66b7e64ac 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -265,8 +265,11 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)
upcall.key = &key;
upcall.userdata = NULL;
upcall.portid = ovs_vport_find_upcall_portid(p, skb);
- ovs_dp_upcall(dp, skb, &upcall);
- consume_skb(skb);
+ error = ovs_dp_upcall(dp, skb, &upcall);
+ if (unlikely(error))
+ kfree_skb(skb);
+ else
+ consume_skb(skb);
stats_counter = &stats->n_missed;
goto out;
}