From: Matt Mackall <hidden> Date: 2005-08-12 02:20:58
This patch series cleans up a few outstanding bugs in netpoll:
- two bugfixes from Jeff Moyer's netpoll bonding
- a tweak to e1000's netpoll stub
- timeout handling for e1000 with carrier loss
- prefilling SKBs at init
- a fix-up for a race discovered in initialization
- an unused variable warning
This patch set was tested over repeated rebooting with both tg3 and
e1000 and random cable disconnection, with and without SMP and
preempt. Please apply.
From: Matt Mackall <hidden> Date: 2005-08-12 02:19:46
This fixes a race during initialization with the NAPI softirq
processing by using an RCU approach.
This race was discovered when refill_skbs() was added to
the setup code.
Signed-off-by: Matt Mackall <redacted>
Index: l/net/core/netpoll.c
===================================================================
@@ -731,6 +731,9 @@ int netpoll_setup(struct netpoll *np)/* last thing to do is link it to the net device structure */ndev->npinfo=npinfo;+/* avoid racing with NAPI reading npinfo */+synchronize_rcu();+return0;release:
From: Matt Mackall <hidden> Date: 2005-08-12 02:20:13
Add limited retry logic to netpoll_send_skb
Each time we attempt to send, decrement our per-device retry counter.
On every successful send, we reset the counter.
We delay 50us between attempts with up to 20000 retries for a total of
1 second. After we've exhausted our retries, subsequent failed
attempts will try only once until reset by success.
Signed-off-by: Matt Mackall <redacted>
Index: lhg/net/core/netpoll.c
===================================================================
From: Matt Mackall <hidden> Date: 2005-08-12 02:20:15
we could do one thing (see the patch below): i think it would be useful
to fill up the netlogging skb queue straight at initialization time.
Especially if netpoll is used for dumping alone, the system might not be
in a situation to fill up the queue at the point of crash, so better be
a bit more prepared and keep the pipeline filled.
Ingo
Signed-off-by: Ingo Molnar <redacted>
I've modified this to be called earlier - mpm
Signed-off-by: Matt Mackall <redacted>
Index: l/net/core/netpoll.c
===================================================================
@@ -724,6 +724,10 @@ int netpoll_setup(struct netpoll *np)npinfo->rx_np=np;spin_unlock_irqrestore(&npinfo->rx_lock,flags);}++/* fill up the skb queue */+refill_skbs();+/* last thing to do is link it to the net device structure */ndev->npinfo=npinfo;
From: Matt Mackall <hidden> Date: 2005-08-12 02:20:58
Minor netpoll_send_skb restructuring
Restructure to avoid confusing goto and move some bits out of the
retry loop.
Signed-off-by: Matt Mackall <redacted>
Index: l/net/core/netpoll.c
===================================================================
From: Matt Mackall <hidden> Date: 2005-08-12 02:20:58
Suggested by Steven Rostedt, matches his patch included in e100.
Signed-off-by: Matt Mackall <redacted>
Index: l/drivers/net/e1000/e1000_main.c
===================================================================
From: Matt Mackall <hidden> Date: 2005-08-12 02:21:48
This fixes an obvious deadlock in the netpoll code. netpoll_rx takes the
npinfo->rx_lock. netpoll_rx is also the only caller of arp_reply (through
__netpoll_rx). As such, it is not necessary to take this lock.
Signed-off-by: Jeff Moyer <redacted>
Signed-off-by: Matt Mackall <redacted>
Index: l/net/core/netpoll.c
===================================================================
From: Matt Mackall <hidden> Date: 2005-08-12 02:21:48
Initialize npinfo->rx_flags. The way it stands now, this will have random
garbage, and so will incur a locking penalty even when an rx_hook isn't
registered and we are not active in the netpoll polling code.
Signed-off-by: Jeff Moyer <redacted>
Signed-off-by: Matt Mackall <redacted>
From: "David S. Miller" <davem@davemloft.net> Date: 2005-08-12 02:42:17
From: Matt Mackall <redacted>
Date: Thu, 11 Aug 2005 21:18:28 -0500
This patch series cleans up a few outstanding bugs in netpoll:
- two bugfixes from Jeff Moyer's netpoll bonding
- a tweak to e1000's netpoll stub
- timeout handling for e1000 with carrier loss
- prefilling SKBs at init
- a fix-up for a race discovered in initialization
- an unused variable warning
This patch set was tested over repeated rebooting with both tg3 and
e1000 and random cable disconnection, with and without SMP and
preempt. Please apply.
All applied, thanks a lot for putting this patch set together.
I'll push this to Linus after some smoke testing.
From: Olaf Hering <hidden> Date: 2005-08-12 17:21:51
On Thu, Aug 11, Matt Mackall wrote:
This patch series cleans up a few outstanding bugs in netpoll:
- two bugfixes from Jeff Moyer's netpoll bonding
- a tweak to e1000's netpoll stub
- timeout handling for e1000 with carrier loss
- prefilling SKBs at init
- a fix-up for a race discovered in initialization
- an unused variable warning
Matt, I have tested them, the sender doesnt lockup anymore. But a
task dump doesnt work, I get only the first task. This is on a 3GHz xeon
with tg3 card.
From: John Ronciak <hidden> Date: 2005-08-12 19:02:03
Sorry this reply was to go to the whole list but only made it to Matt.
The e1000_intr() routine already calls e1000_clean_tx_irq(). So
what's the point of this patch? Am I missing something?
On 8/11/05, Matt Mackall [off-list ref] wrote:
quoted hunk
Suggested by Steven Rostedt, matches his patch included in e100.
Signed-off-by: Matt Mackall <redacted>
Index: l/drivers/net/e1000/e1000_main.c
===================================================================