Subject: Re: new NAPI interface broken

From: Jan-Bernd Themann <[email-masked]>
Date: Tue, 18 Sep 2007 18:15:45 +0200

Hi,

On Saturday 15 September 2007 00:12, David Miller wrote:
> Ok, for now I'm going to try and deal with this by reverting
> the list handling to something approximating the old NAPI
> code, as per the patch below.
> 
> I've only quickly test booted into this kernel on my workstation.
> So take care when trying it out.
> 
> I took the liberty to add some assertions and comments all over
> wrt. list and quota handling.  One thing to note that (and this
> was true previously too) that if ->poll() uses the whole quota
> it _MUST_ _NOT_ modify the NAPI state by doing a complete or
> reschedule.  The net_rx_action code still owns the NAPI state in
> that case, and therefore is allowed to make modifications to the
> ->poll_list.

I'm currently updating the eHEA polling function to work with this
scheme. Up to now we had sort of a quota for or TX refill part as well,
which was also done in the poll function. This was possible as the device
could be scheduled again even if the quota has not been used
completely. If I got it right this is not longer possible. 
The idea was to benefit from the same "fairness" scheme of NAPI as it is
done for the RX side.

One other thing I observed is that I can not unload the module as the
ref counter of the eth device is too low. I haven't tracked down the 
source of this problem yet.

Regards,
Jan-Bernd