diff mbox

bridging: fix rx_handlers return code

Message ID 1362762218-5198-1-git-send-email-B43982@freescale.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Cristian Bercaru March 8, 2013, 5:03 p.m. UTC
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(+)

Comments

Eric Dumazet March 8, 2013, 5:14 p.m. UTC | #1
On Fri, 2013-03-08 at 19:03 +0200, Cristian Bercaru wrote:
> 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>
> ---

Signed-off-by: Eric Dumazet <edumazet@google.com>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller March 8, 2013, 5:20 p.m. UTC | #2
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Fri, 08 Mar 2013 09:14:10 -0800

> On Fri, 2013-03-08 at 19:03 +0200, Cristian Bercaru wrote:
>> 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>
>> ---
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;