mirror of
https://github.com/openvswitch/ovs
synced 2025-10-07 13:40:45 +00:00
datapath: 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> Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
This commit is contained in:
committed by
Pravin B Shelar
parent
f1112037df
commit
a7d607c58d
@@ -269,13 +269,19 @@ void ovs_dp_process_packet(struct sk_buff *skb)
|
||||
&n_mask_hit);
|
||||
if (unlikely(!flow)) {
|
||||
struct dp_upcall_info upcall;
|
||||
int error;
|
||||
|
||||
upcall.cmd = OVS_PACKET_CMD_MISS;
|
||||
upcall.userdata = NULL;
|
||||
upcall.portid = ovs_vport_find_upcall_portid(p, skb);
|
||||
upcall.egress_tun_info = NULL;
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user