two problems in dev/e1000/if_lem.c::lem_handle_rxtx()
Luigi Rizzo
rizzo at iet.unipi.it
Thu Jan 17 06:33:07 UTC 2013
On Tue, Jan 15, 2013 at 09:43:54PM -0800, Jack Vogel wrote:
> OK, will look at this as soon as I can.
>
> Jack
below is a short patch that reschedule the task if the queue
has not been drained. Tested on qemu. I can do the commit if you like.
cheers
luigi
Index: ../head/sys/dev/e1000/if_lem.c
===================================================================
--- ../head/sys/dev/e1000/if_lem.c (revision 245218)
+++ ../head/sys/dev/e1000/if_lem.c (working copy)
@@ -1337,12 +1411,16 @@
if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
- lem_rxeof(adapter, adapter->rx_process_limit, NULL);
+ bool more = lem_rxeof(adapter, adapter->rx_process_limit, NULL);
EM_TX_LOCK(adapter);
lem_txeof(adapter);
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
lem_start_locked(ifp);
EM_TX_UNLOCK(adapter);
+ if (more) {
+ taskqueue_enqueue(adapter->tq, &adapter->rxtx_task);
+ return;
+ }
}
if (ifp->if_drv_flags & IFF_DRV_RUNNING)
More information about the freebsd-net
mailing list