diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2014-09-03 17:43:45 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-03 20:50:51 -0700 |
commit | c5eba0b6f84eb4f0fdc1d8a4abc1c7d40db6e8a6 (patch) | |
tree | dadb7eee4a30c41aa95b37768af158556bc7e02a /net | |
parent | bec6bfb2437f4676dbaaacba6019e9dafef18962 (diff) | |
download | blackbird-op-linux-c5eba0b6f84eb4f0fdc1d8a4abc1c7d40db6e8a6.tar.gz blackbird-op-linux-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')
-rw-r--r-- | net/openvswitch/datapath.c | 7 |
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; } |