Thread (35 messages) 35 messages, 9 authors, 2008-04-21

Re: [RFC,PATCH] loopback: calls netif_receive_skb() instead of netif_rx()

From: David Miller <davem@davemloft.net>
Date: 2008-02-27 02:20:35

From: Eric Dumazet <redacted>
Date: Thu, 21 Feb 2008 19:51:52 +0100
Following patch directly calls netif_receive_skb() and avoids lot of 
atomic operations.
(atomic_inc(&dev->refcnt), set_and_set_bit(NAPI_STATE_SCHED, &n->state), ...
  atomic_dec(&dev->refcnt)...), cache line ping-pongs on device refcnt, 
but also softirq overhead.

This gives a nice boost on tbench for example (5 % on my machine)
My only concern is stack usage.

Note that packet reception can elicit a response and go all the way
back into this driver and all the way down into netif_receive_skb()
again.  And so on and so forth.

If there is some bug in the stack (ACK'ing ACKs, stuff like that) we
could get into a loop and overrun the kernel stack in no time at all.

So, if anything, this change could make inconvenient errors become
catastrophic and hard to diagnose.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help