• Matt Carlson's avatar
    tg3: Adjust rx prod ring bd replenish thresholds · eb07a940
    Matt Carlson authored
    The oldest tg3 devices had large rx producer ring BD caches.  Back then,
    it made sense to make the BD cache replenish threshold only a function
    of the number of rx buffers posted by the driver.  Since then, the BD
    cache sizes have shrunk to 25% of their original size and, in some
    cases, the ring sizes have quadrupled in size.  Under such conditions,
    static BD cache replenish thresholds no longer match the hardware
    constraints.
    
    This patch attempts to factor in the BD cache size into the bd cache
    replenish strategy, taking the existing hardware bugs into account.
    Signed-off-by: default avatarMatt Carlson <mcarlson@broadcom.com>
    Reviewed-by: default avatarMichael Chan <mchan@broadcom.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    eb07a940
tg3.c 411 KB