netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shirley Ma <mashirle@us.ibm.com>
To: Arnd Bergmann <arnd@arndb.de>, sri@us.ibm.com
Cc: netdev@vger.kernel.org, davem@davemloft.net
Subject: [PATCH net-next-2.6]  macvtap: Return error when macvlan drops the packet
Date: Mon, 12 Jul 2010 01:47:54 -0700	[thread overview]
Message-ID: <1278924474.7719.14.camel@localhost.localdomain> (raw)

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();
 



             reply	other threads:[~2010-07-12  8:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-12  8:47 Shirley Ma [this message]
2010-07-12 10:44 ` [PATCH net-next-2.6] macvtap: Return error when macvlan drops the packet Arnd Bergmann
2010-07-13 16:42   ` Shirley Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1278924474.7719.14.camel@localhost.localdomain \
    --to=mashirle@us.ibm.com \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sri@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).