DragonFly BSD
DragonFly submit List (threaded) for 2005-02
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kue0 not receiving patch


From: Scott Michel <scottm@xxxxxxxx>
Date: Tue, 15 Feb 2005 10:22:06 -0800

Matthew Dillon wrote:
Hmm. That doesn't look quite right.... the mbuf is being put on the
ifq but then it is also being passed to NETISR_USB. NETISR_USB
(usbintr() in usb/usb_ethersubr.c) takes the passed mbuf and IF_DEQUEUE's it... so far so good. But then it *LOOPS* on the ifq
to get the next mbuf... but that means the same mbuf may be IF_DEQUEUE'd
more then once since the other mbufs on the ifq also had an ISR queued
for them.

If usbintr gets called multiple times, it will find an empty queue. The loops empties out the queue, leaving no work the next time usbintr gets called.


It sounds like if more then one packet is queued to the NETISR, the system ought to crash :-(.

It doesn't. It will panic on shutdown, but after disks are sync-ed for completely different reasons.


It seems to me that instead of IF_ENQUEUE'ing the mbuf in usb_ether_input() and usb_tx_done() we should have the usbintr() code
not try to dequeue it.

There should be two functions, usbintr_rx and usbintr_tx. The messaging functions already create an implicit queue for us, so why not take advantage of it? But at least this patch gets me operational enough, so I can actually set up a proper CVS repo and generate proper diffs and a proper solution.



-scooter




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]