Thread (7 messages) 7 messages, 3 authors, 2003-10-30

Re: [PATCH] Updated 8139too with NAPI

From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Date: 2003-10-30 17:12:41

Possibly related (same subject, not in this thread)

Jeff Garzik [off-list ref] writes:
I'd like to apply this to net-drivers-2.[45]-exp, but it doesn't apply
cleanly.  Can you wait a bit, for my posting of those queues, and then
resend?
Probably more tester/reviewer is always welcome, so I think it's good.


Stephen Hemminger [off-list ref] writes:
+	/* Receive packets are processed by poll routine.
+	   If not running start it now. */
+	if (status & RxAckBits){
+		if (netif_rx_schedule_prep(dev)) {
+			RTL_W16_F (IntrMask, rtl8139_norx_intr_mask);
+			__netif_rx_schedule (dev);
 		}
I think that this style is common issues of NIC drivers for "NAPI
support and intr-mask" handling. Looks like __netif_poll_disable()
also has the following problem.

For example,

	in ISR
		[...]
		if (status & RxAckBits){
			if (netif_rx_schedule_prep(dev)) {
				RTL_W16_F (IntrMask, rtl8139_norx_intr_mask);
				__netif_rx_schedule (dev);
			}
		}
		[...]

	in dev_close()
		[...]
		while (test_bit(__LINK_STATE_RX_SCHED, &dev->state)) {
			/* No hurry. */
			current->state = TASK_INTERRUPTIBLE;
			schedule_timeout(1);
		}
		  --------- (*)
		if (dev->stop)
			dev->stop(dev);
		[...]

If Rx interrupt happen on (*) point, ISR can't ack or disable.
Then it will start busy Rx interrupt loop. So if this happen, it's
seriously problem on UP system.
-- 
OGAWA Hirofumi [off-list ref]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help