* [PATCH v2] openvswitch: distinguish between the dropped and consumed skb
@ 2014-09-03 9:43 roy.qing.li
2014-09-03 20:36 ` Pravin Shelar
2014-09-04 3:51 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: roy.qing.li @ 2014-09-03 9:43 UTC (permalink / raw)
To: netdev; +Cc: tgraf, pshelar
From: Li RongQing <roy.qing.li@gmail.com>
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>
---
net/openvswitch/datapath.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 35d866f..91d66b7 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;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] openvswitch: distinguish between the dropped and consumed skb
2014-09-03 9:43 [PATCH v2] openvswitch: distinguish between the dropped and consumed skb roy.qing.li
@ 2014-09-03 20:36 ` Pravin Shelar
2014-09-04 3:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Pravin Shelar @ 2014-09-03 20:36 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, Thomas Graf
On Wed, Sep 3, 2014 at 2:43 AM, <roy.qing.li@gmail.com> wrote:
> From: Li RongQing <roy.qing.li@gmail.com>
>
> 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>
Thanks.
> ---
> net/openvswitch/datapath.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
> index 35d866f..91d66b7 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;
> }
> --
> 1.7.10.4
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2] openvswitch: distinguish between the dropped and consumed skb
2014-09-03 9:43 [PATCH v2] openvswitch: distinguish between the dropped and consumed skb roy.qing.li
2014-09-03 20:36 ` Pravin Shelar
@ 2014-09-04 3:51 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-09-04 3:51 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, tgraf, pshelar
From: roy.qing.li@gmail.com
Date: Wed, 3 Sep 2014 17:43:45 +0800
> From: Li RongQing <roy.qing.li@gmail.com>
>
> 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>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-04 3:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-03 9:43 [PATCH v2] openvswitch: distinguish between the dropped and consumed skb roy.qing.li
2014-09-03 20:36 ` Pravin Shelar
2014-09-04 3:51 ` David Miller
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.