Skip to content
  • Michael Chan's avatar
    bnxt_en: Fix completion ring sizing with TPA enabled. · 27640ce6
    Michael Chan authored
    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: default avatarVasundhara Volam <vasundhara-v.volam@broadcom.com>
    Signed-off-by: default avatarMichael Chan <michael.chan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    27640ce6