openvswitch: distinguish between the dropped and consumed skb
Subsystems (3)
PATCH v2 1/1 openvswitch: distinguish between the dropped and consumed skb
From: Li RongQing <[email protected]>
distinguish between the dropped and consumed skb, not assume the skb is consumed always
Cc Thomas Graf <[email protected]>
Cc Pravin Shelar <[email protected]>
Signed-off-by Li RongQing <[email protected]>
--- net/openvswitch/datapath.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
net/openvswitch/datapath.c +5 -2
@@ -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; }
Signature · 1 line
1.7.10.4
Quoted 8 lines · On Wed, Sep 3, 2014 at 2:43 AM, <[email protected]> wrote:
From: Li RongQing <[email protected]>
distinguish between the dropped and consumed skb, not assume the skb is consumed always
Cc Thomas Graf <[email protected]>Cc Pravin Shelar <[email protected]>Signed-off-by Li RongQing <[email protected]>
Acked-by Pravin B Shelar <[email protected]>
Thanks.
Quoted 25 lines
--- net/openvswitch/datapath.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)net/openvswitch/datapath.c +5
-3@@ -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; } --1.7.10.4
From: [email protected]
Date: Wed, 3 Sep 2014 17:43:45 +0800
Quoted 8 lines
From: Li RongQing <[email protected]>
distinguish between the dropped and consumed skb, not assume the skb is consumed always
Cc Thomas Graf <[email protected]>Cc Pravin Shelar <[email protected]>Signed-off-by Li RongQing <[email protected]>
Applied, thank you.