Netdev List
 help / color / mirror / Atom feed
* [PATCH] openvswitch: distinguish between the dropped and consumed skb
@ 2014-09-02 12:52 roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w
  2014-09-02 13:14 ` [ovs-dev] " Thomas Graf
  0 siblings, 1 reply; 3+ messages in thread
From: roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w @ 2014-09-02 12:52 UTC (permalink / raw)
  To: netdev-u79uwXL29TY76Z2rM5mHXA, dev-yBygre7rU0TnMu66kgdUjQ,
	pshelar-l0M0P4e3n4LQT0dZR+AlfA

From: Li RongQing <roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

distinguish between the dropped and consumed skb, not assume the skb
is consumed always

Cc: Pravin Shelar <pshelar-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Li RongQing <roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 net/openvswitch/datapath.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 35d866f..dacf56f 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -266,7 +266,6 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)
 		upcall.userdata = NULL;
 		upcall.portid = ovs_vport_find_upcall_portid(p, skb);
 		ovs_dp_upcall(dp, skb, &upcall);
-		consume_skb(skb);
 		stats_counter = &stats->n_missed;
 		goto out;
 	}
@@ -304,9 +303,11 @@ int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,
 	if (err)
 		goto err;
 
+	consume_skb(skb);
 	return 0;
 
 err:
+	kfree_skb(skb);
 	stats = this_cpu_ptr(dp->stats_percpu);
 
 	u64_stats_update_begin(&stats->syncp);
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-02 20:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-02 12:52 [PATCH] openvswitch: distinguish between the dropped and consumed skb roy.qing.li-Re5JQEeQqe8AvxtiuMwx3w
2014-09-02 13:14 ` [ovs-dev] " Thomas Graf
2014-09-02 20:20   ` Pravin Shelar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox