• Jesper Dangaard Brouer's avatar
    mlx4: use napi_consume_skb API to get bulk free operations · b4a53379
    Jesper Dangaard Brouer authored
    Bulk free of SKBs happen transparently by the API call napi_consume_skb().
    The napi budget parameter is usually needed by napi_consume_skb()
    to detect if called from netpoll.  In this patch it has an extra meaning.
    
    For mlx4 driver, the mlx4_en_stop_port() call is done outside
    NAPI/softirq context, and cleanup the entire TX ring via
    mlx4_en_free_tx_buf().  The code mlx4_en_free_tx_desc() for
    freeing SKBs are shared with NAPI calls.
    
    To handle this shared use the zero budget indication is reused,
    and handled appropriately in napi_consume_skb(). To reflect this,
    variable is called napi_mode for the function call that needed
    this distinction.
    Signed-off-by: default avatarJesper Dangaard Brouer <brouer@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    b4a53379
en_tx.c 28.1 KB