Subject: Re: [PATCH net-next] net/mlx4_en: remove NETDEV_TX_BUSY

From: Amir Vadai <[email-masked]>
Date: Tue, 07 Oct 2014 11:30:06 +0300

On 10/6/2014 7:30 PM, Eric Dumazet wrote:
> From: Eric Dumazet <[email-masked]>
> 
> Drivers should avoid NETDEV_TX_BUSY as much as possible.
> 
> They should stop the tx queue before qdisc even tries to push another
> packet, to avoid requeues.
> 
> For a driver supporting skb->xmit_more, this is likely to be a prereq
> anyway, otherwise we could have a tx deadlock : We need to force a
> doorbell if TX ring is full.
> 
> Signed-off-by: Eric Dumazet <[email-masked]>
> ---

Reviewed. Also verified that it fixes the deadlock (by sending a large
burst - larger than ring size). Before this fix, last packet of the
burst wasn't sent, therefore no doorbell was rang, and the queue was
stalled.

BTW, another nice optimization that we hope to send soon, is not to arm
the CQ unless ringing the doorbell.

Acked-by: Amir Vadai <[email-masked]>