• Ido Shamay's avatar
    net/mlx4_en: Wake TX queues only when there's enough room · 488a9b48
    Ido Shamay authored
    Indication of a single completed packet, marked by txbbs_skipped
    being bigger then zero, in not enough in order to wake up a
    stopped TX queue. The completed packet may contain a single TXBB,
    while next packet to be sent (after the wake up) may have multiple
    TXBBs (LSO/TSO packets for example), causing overflow in queue followed
    by WQE corruption and TX queue timeout.
    Instead, wake the stopped queue only when there's enough room for the
    worst case (maximum sized WQE) packet that we should need to handle after
    the queue is opened again.
    
    Also created an helper routine - mlx4_en_is_tx_ring_full, which checks
    if the current TX ring is full or not. It provides better code readability
    and removes code duplication.
    Signed-off-by: default avatarIdo Shamay <idos@mellanox.com>
    Signed-off-by: default avatarOr Gerlitz <ogerlitz@mellanox.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    488a9b48
mlx4_en.h 24.2 KB