Re: [PATCH net-next 10/12] net/mlx4_en: Add NAPI support for transmit side

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2013-12-08 at 14:35 +0200, Amir Vadai wrote:
> From: Eugenia Emantayev <eugenia@xxxxxxxxxxxx>
> 
> Add NAPI for TX side,
> implement its support and provide NAPI callback.
> 
> 
> Signed-off-by: Yevgeny Petrilin <yevgenyp@xxxxxxxxxxxx>
> Signed-off-by: Eugenia Emantayev <eugenia@xxxxxxxxxxxx>
> Signed-off-by: Amir Vadai <amirv@xxxxxxxxxxxx>
> ---
>  drivers/net/ethernet/mellanox/mlx4/en_cq.c   | 12 ++++++---
>  drivers/net/ethernet/mellanox/mlx4/en_tx.c   | 39 +++++++++++++++++++++++-----
>  drivers/net/ethernet/mellanox/mlx4/mlx4_en.h |  3 +++
>  3 files changed, 43 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/en_cq.c b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
> index 3a098cc..2c60f0c 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/en_cq.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/en_cq.c
> @@ -161,12 +161,16 @@ int mlx4_en_activate_cq(struct mlx4_en_priv *priv, struct mlx4_en_cq *cq,
>  	cq->mcq.comp  = cq->is_tx ? mlx4_en_tx_irq : mlx4_en_rx_irq;
>  	cq->mcq.event = mlx4_en_cq_event;
>  
> -	if (!cq->is_tx) {
> +	if (cq->is_tx) {
> +		netif_napi_add(cq->dev, &cq->napi, mlx4_en_poll_tx_cq,
> +			       MLX4_EN_TX_BUDGET);
> +	} else {

TX completion is not supposed to have a 'budget'.

You should consume all completed descriptors.

BQL should already drive the dynamic of the TX queue.



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Discussion]     [TCP Instrumentation]     [Ethernet Bridging]     [Linux Wireless Networking]     [Linux WPAN Networking]     [Linux Host AP]     [Linux WPAN Networking]     [Linux Bluetooth Networking]     [Linux ATH6KL Networking]     [Linux Networking Users]     [Linux Coverity]     [VLAN]     [Git]     [IETF Annouce]     [Linux Assembly]     [Security]     [Bugtraq]     [Yosemite Information]     [MIPS Linux]     [ARM Linux Kernel]     [ARM Linux]     [Linux Virtualization]     [Linux IDE]     [Linux RAID]     [Linux SCSI]