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

From: "[email-masked]" <[email-masked]>
Date: Fri, 30 May 2014 13:35:15 -0300

On 30 May 08:58 AM, Eric Dumazet wrote:
> On Fri, 2014-05-30 at 15:34 +0000, David Laight wrote:
> 
> > Software TSO generates lots of separate ethernet frames, there is no
> > absolute requirement to be able to put all of them into the tx ring at once.
> 
> Yes there is absolute requirement. It is driver responsibility to block
> the queue if the available slots in TX ring would not allow the
> following packet to be sent.
> 
> Thats why a TSO emulation needs to set gso_max_segs to some sane value
> 
> (sfc sets it to 100)
> 
> In Fugang patch this part was a wrong way to deal with this :
> 
> +       if (tso_count_descs(skb) >= fec_enet_txdesc_entry_free(fep)) {
> +               if (net_ratelimit())
> +                       netdev_err(ndev, "tx queue full!\n");
> +               return NETDEV_TX_BUSY;
> +       }
> +
> 
> This was copy/pasted from buggy
> drivers/net/ethernet/marvell/mv643xx_eth.c
> 

Indeed. I'm just about to submit the fixes for those, which may be useful to
fix it in this driver as well.
-- 
Ezequiel García, Free Electrons
Embedded Linux, Kernel and Android Engineering
http://free-electrons.com