lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1386530536.30495.287.camel@edumazet-glaptop2.roam.corp.google.com>
Date:	Sun, 08 Dec 2013 11:22:16 -0800
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Amir Vadai <amirv@...lanox.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Or Gerlitz <ogerlitz@...lanox.com>,
	Yevgeny Petrilin <yevgenyp@...lanox.com>,
	netdev@...r.kernel.org, Eugenia Emantayev <eugenia@...lanox.com>
Subject: Re: [PATCH net-next 10/12] net/mlx4_en: Add NAPI support for
 transmit side

On Sun, 2013-12-08 at 14:35 +0200, Amir Vadai wrote:
> From: Eugenia Emantayev <eugenia@...lanox.com>
> 
> Add NAPI for TX side,
> implement its support and provide NAPI callback.
> 
> 
> Signed-off-by: Yevgeny Petrilin <yevgenyp@...lanox.com>
> Signed-off-by: Eugenia Emantayev <eugenia@...lanox.com>
> Signed-off-by: Amir Vadai <amirv@...lanox.com>
> ---
>  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@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ