Subject: Re: [PATCH v1 4/6] net: fec: Increase buffer descriptor entry number

From: "[email-masked]" <[email-masked]>
Date: Fri, 30 May 2014 11:01:37 -0300

Hello Eric,

On 30 May 06:13 AM, Eric Dumazet wrote:
> On Fri, 2014-05-30 at 09:42 +0000, [email-masked] wrote:
> > From: David Laight <[email-masked]> Data: Friday, May 30, 2014 5:11 PM
> > >
> > >Does the driver support BQL (or similar) in order to limit the amount of
> > >queued tx traffic?
> > >Otherwise you've significantly increased the latency for connections other
> > >than one doing bulk tx.
> > >
> > >	David
> > >
> > The driver still don't support BQL.
> > I will add the feature to support FEC. Thanks for your advise.
> 
> Note that a full size TSO packet (44 or 45 MSS) requires about 88 or 90
> descriptors.
> 

What's the rationale behing those numbers?

Following the Solarflare commit you pointed me a while ago, I've set
gso_max_segs to limit the number of descriptors in the mvneta and
mv643xx_eth drivers.

My understanding reading the sfc commit 7e6d06f0de3f7 is that the
maximum number of required descriptors would be around ~250:

/* Header and payload descriptor for each output segment, plus
 * one for every input fragment boundary within a segment
 */
unsigned int max_descs = EFX_TSO_MAX_SEGS * 2 + MAX_SKB_FRAGS;

Maybe I've misunderstood something?

PS: I was also about to add BQL support to the drivers...
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com