All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next-2.6]  macvtap: Return error when macvlan drops the packet
@ 2010-07-12  8:47 Shirley Ma
  2010-07-12 10:44 ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Shirley Ma @ 2010-07-12  8:47 UTC (permalink / raw)
  To: Arnd Bergmann, sri; +Cc: netdev, davem

Return err when macvlan dropps the packet.

Signed-off-by: Shirley Ma <xma@us.ibm.com>
---
 drivers/net/macvtap.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c
index 2b4d59b..36d52b5 100644
--- a/drivers/net/macvtap.c
+++ b/drivers/net/macvtap.c
@@ -492,9 +492,11 @@ static ssize_t macvtap_get_user(struct
macvtap_queue *q,
 
 	rcu_read_lock_bh();
 	vlan = rcu_dereference(q->vlan);
-	if (vlan)
-		macvlan_start_xmit(skb, vlan->dev);
-	else
+	if (vlan) {
+		err = macvlan_start_xmit(skb, vlan->dev);
+		if (err)
+			count = err;
+	} else
 		kfree_skb(skb);
 	rcu_read_unlock_bh();
 



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next-2.6]  macvtap: Return error when macvlan drops the packet
  2010-07-12  8:47 [PATCH net-next-2.6] macvtap: Return error when macvlan drops the packet Shirley Ma
@ 2010-07-12 10:44 ` Arnd Bergmann
  2010-07-13 16:42   ` Shirley Ma
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2010-07-12 10:44 UTC (permalink / raw)
  To: Shirley Ma; +Cc: sri, netdev, davem

On Monday 12 July 2010, Shirley Ma wrote:
> 
> Return err when macvlan dropps the packet.

Can you be more specific why you think this is the right idea?

As far as I can tell, this will return '1' to user space for a dropped
packet (NET_XMIT_DROP) or another positive return value.
While this might be nice for a user application to know, neither does
qemu check for this nor does it match the read(2) documentation.

I fear if we want congestion control to improve, we need to do it
differently.

	Arnd

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net-next-2.6]  macvtap: Return error when macvlan drops the packet
  2010-07-12 10:44 ` Arnd Bergmann
@ 2010-07-13 16:42   ` Shirley Ma
  0 siblings, 0 replies; 3+ messages in thread
From: Shirley Ma @ 2010-07-13 16:42 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: sri, netdev, davem

Hello Arnd,

I am working on macvtap zero-copy patch. I found that the packet was
silently dropped and packet out of order when using zero-copy. That was
a reason I submitted this patch to switch to copy mode when that
happens. I think I might need more time to debug why first.

Thanks
Shirley


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-07-13 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-12  8:47 [PATCH net-next-2.6] macvtap: Return error when macvlan drops the packet Shirley Ma
2010-07-12 10:44 ` Arnd Bergmann
2010-07-13 16:42   ` Shirley Ma

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.