• M
    bnxt_en: Fix completion ring sizing with TPA enabled. · 27640ce6
    Michael Chan 提交于
    The current completion ring sizing formula is wrong with TPA enabled.
    The formula assumes that the number of TPA completions are bound by the
    RX ring size, but that's not true.  TPA_START completions are immediately
    recycled so they are not bound by the RX ring size.  We must add
    bp->max_tpa to the worst case maximum RX and TPA completions.
    
    The completion ring can overflow because of this mistake.  This will
    cause hardware to disable the completion ring when this happens,
    leading to RX and TX traffic to stall on that ring.  This issue is
    generally exposed only when the RX ring size is set very small.
    
    Fix the formula by adding bp->max_tpa to the number of RX completions
    if TPA is enabled.
    
    Fixes: c0c050c5 ("bnxt_en: New Broadcom ethernet driver.");
    Reviewed-by: NVasundhara Volam <vasundhara-v.volam@broadcom.com>
    Signed-off-by: NMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    27640ce6
bnxt.c 323.0 KB