Subject: Re: [PATCH] net: bcmgenet: fix throughtput regression with TSO autosizing

From: Florian Fainelli <[email-masked]>
Date: Thu, 26 Feb 2015 09:29:46 -0800

On 26/02/15 09:27, Eric Dumazet wrote:
> On Thu, 2015-02-26 at 20:05 +0900, Jaedon Shin wrote:
>> This patch prevents the performance degradation of xmit after
>> 605ad7f ("tcp: refine TSO autosizing").
>>
>> Signed-off-by: Jaedon Shin <[email-masked]>
>> ---
>>  drivers/net/ethernet/broadcom/genet/bcmgenet.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
>> index ff83c46b..87eeff0 100644
>> --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
>> +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
>> @@ -1310,6 +1310,9 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
>>  out:
>>  	spin_unlock_irqrestore(&ring->lock, flags);
>>  
>> +	if (index != DESC_INDEX)
>> +		skb_orphan(skb);
>> +
> 
> Hmpff...
> 
> Can you elaborate on the regression ?
> 
> Is it because NIC delays TX completion irq or something ?
> 
> bcmgenet_poll() only drains TX packets on ring16 (DESC_INDEC)
> 
> Other tx completions seem to run from hard irq context (bcmgenet_isr1())
> 
> Your patch seems to imply a bug in hard irq signaling/handling.

Yes, there is a bug in how packets transmitted are reclaimed, I will
submit a fix for this shortly.
--
Florian