Date: Thu, 17 Jan 2013 07:32:32 +0100 From: Luigi Rizzo <rizzo@iet.unipi.it> To: Jack Vogel <jfvogel@gmail.com> Cc: "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, head@freebsd.org Subject: Re: two problems in dev/e1000/if_lem.c::lem_handle_rxtx() Message-ID: <20130117063232.GA59734@onelab2.iet.unipi.it> In-Reply-To: <CAFOYbc=47CWhXw=Gb299BfgW8G_uCSAJC0EYeB4jc8ZBLFYL-g@mail.gmail.com> References: <CA%2BhQ2%2BjEETBeN%2BHx=5aThr3pzcuK2L-%2BRd3cd1qDnYR67WSyxA@mail.gmail.com> <CAFOYbc=47CWhXw=Gb299BfgW8G_uCSAJC0EYeB4jc8ZBLFYL-g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130117063232.GA59734>
