[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1409662369-2528-1-git-send-email-roy.qing.li@gmail.com>
Date: Tue, 2 Sep 2014 20:52:49 +0800
From: roy.qing.li@...il.com
To: netdev@...r.kernel.org, dev@...nvswitch.org, pshelar@...ira.com
Subject: [PATCH] openvswitch: distinguish between the dropped and consumed skb
From: Li RongQing <roy.qing.li@...il.com>
distinguish between the dropped and consumed skb, not assume the skb
is consumed always
Cc: Pravin Shelar <pshelar@...ira.com>
Signed-off-by: Li RongQing <roy.qing.li@...il.com>
---
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
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists