netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Bercaru <B43982@freescale.com>
To: <davem@davemloft.net>
Cc: Cristian Bercaru <B43982@freescale.com>, <eric.dumazet@gmail.com>,
	<netdev@vger.kernel.org>
Subject: [PATCH] bridging: fix rx_handlers return code
Date: Fri, 8 Mar 2013 19:03:38 +0200	[thread overview]
Message-ID: <1362762218-5198-1-git-send-email-B43982@freescale.com> (raw)

The frames for which rx_handlers return RX_HANDLER_CONSUMED are no longer
counted as dropped. They are counted as successfully received by
'netif_receive_skb'.

This allows network interface drivers to correctly update their RX-OK and
RX-DRP counters based on the result of 'netif_receive_skb'.

Signed-off-by: Cristian Bercaru <B43982@freescale.com>
---
 net/core/dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 9610389..609ac45 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3444,6 +3444,7 @@ ncls:
 		}
 		switch (rx_handler(&skb)) {
 		case RX_HANDLER_CONSUMED:
+			ret = NET_RX_SUCCESS;
 			goto unlock;
 		case RX_HANDLER_ANOTHER:
 			goto another_round;
-- 
1.7.11.7

             reply	other threads:[~2013-03-08 17:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-08 17:03 Cristian Bercaru [this message]
2013-03-08 17:14 ` [PATCH] bridging: fix rx_handlers return code Eric Dumazet
2013-03-08 17:20   ` David Miller

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=1362762218-5198-1-git-send-email-B43982@freescale.com \
    --to=b43982@freescale.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=netdev@vger.kernel.org \
    /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).