aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/datapath.c
diff options
context:
space:
mode:
authorLi RongQing <roy.qing.li@gmail.com>2014-09-03 05:43:45 -0400
committerDavid S. Miller <davem@davemloft.net>2014-09-03 23:50:51 -0400
commitc5eba0b6f84eb4f0fdc1d8a4abc1c7d40db6e8a6 (patch)
treedadb7eee4a30c41aa95b37768af158556bc7e02a /net/openvswitch/datapath.c
parentbec6bfb2437f4676dbaaacba6019e9dafef18962 (diff)
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/datapath.c')
-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)
265 upcall.key = &key; 265 upcall.key = &key;
266 upcall.userdata = NULL; 266 upcall.userdata = NULL;
267 upcall.portid = ovs_vport_find_upcall_portid(p, skb); 267 upcall.portid = ovs_vport_find_upcall_portid(p, skb);
268 ovs_dp_upcall(dp, skb, &upcall); 268 error = ovs_dp_upcall(dp, skb, &upcall);
269 consume_skb(skb); 269 if (unlikely(error))
270 kfree_skb(skb);
271 else
272 consume_skb(skb);
270 stats_counter = &stats->n_missed; 273 stats_counter = &stats->n_missed;
271 goto out; 274 goto out;
272 } 275 }