]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
mlx4: use napi_consume_skb API to get bulk free operations
authorJesper Dangaard Brouer <brouer@redhat.com>
Fri, 11 Mar 2016 08:44:08 +0000 (09:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Mar 2016 02:35:35 +0000 (22:35 -0400)
commitb4a53379a0c19df784e30b1f35af5841f2b74f30
tree7301142666ec1441873a2c432e89ac41545738d5
parent885eb0a516e4d686849b91c5a1ba25c70b7a6540
mlx4: use napi_consume_skb API to get bulk free operations

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: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_tx.c