diff mbox

|PATCH net-next-2.6] ifb: use netif_receive_skb() instead of netif_rx()

Message ID 1292402398.3427.6.camel@edumazet-laptop
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet Dec. 15, 2010, 8:39 a.m. UTC
In ri_tasklet(), we run from softirq, so can directly handle packet
through netif_receive_skb() instead of netif_rx().
There is no risk of recursion.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
 drivers/net/ifb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



--
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

Comments

Changli Gao Dec. 15, 2010, 8:51 a.m. UTC | #1
On Wed, Dec 15, 2010 at 4:39 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> In ri_tasklet(), we run from softirq, so can directly handle packet
> through netif_receive_skb() instead of netif_rx().
> There is no risk of recursion.
>
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
> ---

Acked-by: Changli Gao <xiaosuo@gmail.com>
jamal Dec. 15, 2010, 12:49 p.m. UTC | #2
On Wed, 2010-12-15 at 09:39 +0100, Eric Dumazet wrote:
> In ri_tasklet(), we run from softirq, so can directly handle packet
> through netif_receive_skb() instead of netif_rx().
> There is no risk of recursion.

Eric, did you do at least a simple test on this one? 
It used to be problematic (I cant remember why or
what use case was problematic).

cheers,
jamal

--
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
Eric Dumazet Dec. 15, 2010, 2:21 p.m. UTC | #3
Le mercredi 15 décembre 2010 à 07:49 -0500, jamal a écrit :
> On Wed, 2010-12-15 at 09:39 +0100, Eric Dumazet wrote:
> > In ri_tasklet(), we run from softirq, so can directly handle packet
> > through netif_receive_skb() instead of netif_rx().
> > There is no risk of recursion.
> 
> Eric, did you do at least a simple test on this one? 
> It used to be problematic (I cant remember why or
> what use case was problematic).

Yes, I run SFQ / IFB right now on my dev machine, and found SFQ bugs by
the way ;)



--
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
Stephen Hemminger Dec. 15, 2010, 4:14 p.m. UTC | #4
On Wed, 15 Dec 2010 07:49:23 -0500
jamal <hadi@cyberus.ca> wrote:

> On Wed, 2010-12-15 at 09:39 +0100, Eric Dumazet wrote:
> > In ri_tasklet(), we run from softirq, so can directly handle packet
> > through netif_receive_skb() instead of netif_rx().
> > There is no risk of recursion.
> 
> Eric, did you do at least a simple test on this one? 
> It used to be problematic (I cant remember why or
> what use case was problematic).

Only risk is stack overflow.
--
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
jamal Dec. 17, 2010, 12:55 p.m. UTC | #5
On Wed, 2010-12-15 at 15:21 +0100, Eric Dumazet wrote:
> Le mercredi 15 décembre 2010 à 07:49 -0500, jamal a écrit :

> > Eric, did you do at least a simple test on this one? 
> > It used to be problematic (I cant remember why or
> > what use case was problematic).
> 
> Yes, I run SFQ / IFB right now on my dev machine, and found SFQ bugs by
> the way ;)

Ok, thanks;->

cheers,
jamal


--
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/drivers/net/ifb.c b/drivers/net/ifb.c
index bfa03db..a44901b 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -96,7 +96,7 @@  static void ri_tasklet(unsigned long dev)
 			dev_queue_xmit(skb);
 		} else if (from & AT_INGRESS) {
 			skb_pull(skb, skb->dev->hard_header_len);
-			netif_rx(skb);
+			netif_receive_skb(skb);
 		} else
 			BUG();
 	}