netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes
@ 2019-11-03  9:11 Yuval Shaia
  2019-11-03 11:41 ` Tariq Toukan
  2019-11-06  2:01 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Yuval Shaia @ 2019-11-03  9:11 UTC (permalink / raw)
  To: tariqt, davem, netdev, linux-rdma, dotanb, eli, vlad; +Cc: Yuval Shaia

From: Dotan Barak <dotanb@dev.mellanox.co.il>

The reason for the pre-allocation of one CQE is to enable resizing of
the CQ.
Fix comment accordingly.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
---
v0 -> v1:
	* Add . at EOL
	* Add commit message
---
 drivers/net/ethernet/mellanox/mlx4/main.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index fce9b3a24347..69bb6bb06e76 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -514,8 +514,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
 	dev->caps.max_rq_desc_sz     = dev_cap->max_rq_desc_sz;
 	/*
 	 * Subtract 1 from the limit because we need to allocate a
-	 * spare CQE so the HCA HW can tell the difference between an
-	 * empty CQ and a full CQ.
+	 * spare CQE to enable resizing the CQ.
 	 */
 	dev->caps.max_cqes	     = dev_cap->max_cq_sz - 1;
 	dev->caps.reserved_cqs	     = dev_cap->reserved_cqs;
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes
  2019-11-03  9:11 [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes Yuval Shaia
@ 2019-11-03 11:41 ` Tariq Toukan
  2019-11-06  2:01 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Tariq Toukan @ 2019-11-03 11:41 UTC (permalink / raw)
  To: Yuval Shaia, Tariq Toukan, davem, netdev, linux-rdma, dotanb,
	Eli Cohen, Vladimir Sokolovsky



On 11/3/2019 11:11 AM, Yuval Shaia wrote:
> From: Dotan Barak <dotanb@dev.mellanox.co.il>
> 
> The reason for the pre-allocation of one CQE is to enable resizing of
> the CQ.
> Fix comment accordingly.
> 
> Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
> Signed-off-by: Eli Cohen <eli@mellanox.co.il>
> Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>
> ---
> v0 -> v1:
> 	* Add . at EOL
> 	* Add commit message
> ---
>   drivers/net/ethernet/mellanox/mlx4/main.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
> index fce9b3a24347..69bb6bb06e76 100644
> --- a/drivers/net/ethernet/mellanox/mlx4/main.c
> +++ b/drivers/net/ethernet/mellanox/mlx4/main.c
> @@ -514,8 +514,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
>   	dev->caps.max_rq_desc_sz     = dev_cap->max_rq_desc_sz;
>   	/*
>   	 * Subtract 1 from the limit because we need to allocate a
> -	 * spare CQE so the HCA HW can tell the difference between an
> -	 * empty CQ and a full CQ.
> +	 * spare CQE to enable resizing the CQ.
>   	 */
>   	dev->caps.max_cqes	     = dev_cap->max_cq_sz - 1;
>   	dev->caps.reserved_cqs	     = dev_cap->reserved_cqs;
> 

Reviewed-by: Tariq Toukan <tariqt@mellanox.com>

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes
  2019-11-03  9:11 [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes Yuval Shaia
  2019-11-03 11:41 ` Tariq Toukan
@ 2019-11-06  2:01 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2019-11-06  2:01 UTC (permalink / raw)
  To: yuval.shaia; +Cc: tariqt, netdev, linux-rdma, dotanb, eli, vlad

From: Yuval Shaia <yuval.shaia@oracle.com>
Date: Sun,  3 Nov 2019 11:11:35 +0200

> From: Dotan Barak <dotanb@dev.mellanox.co.il>
> 
> The reason for the pre-allocation of one CQE is to enable resizing of
> the CQ.
> Fix comment accordingly.
> 
> Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
> Signed-off-by: Eli Cohen <eli@mellanox.co.il>
> Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
> Signed-off-by: Yuval Shaia <yuval.shaia@oracle.com>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-06  2:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-03  9:11 [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes Yuval Shaia
2019-11-03 11:41 ` Tariq Toukan
2019-11-06  2:01 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).