From: Tariq Toukan <tariqt@mellanox.com>
To: Yuval Shaia <yuval.shaia@oracle.com>,
Tariq Toukan <tariqt@mellanox.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"dotanb@dev.mellanox.co.il" <dotanb@dev.mellanox.co.il>,
Eli Cohen <eli@mellanox.com>,
Vladimir Sokolovsky <vlad@mellanox.com>
Subject: Re: [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes
Date: Sun, 3 Nov 2019 11:41:11 +0000 [thread overview]
Message-ID: <68efcf5b-0c05-a626-d164-bf8bcbb60642@mellanox.com> (raw)
In-Reply-To: <20191103091135.1891-1-yuval.shaia@oracle.com>
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.
next prev parent reply other threads:[~2019-11-03 11:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2019-11-06 2:01 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=68efcf5b-0c05-a626-d164-bf8bcbb60642@mellanox.com \
--to=tariqt@mellanox.com \
--cc=davem@davemloft.net \
--cc=dotanb@dev.mellanox.co.il \
--cc=eli@mellanox.com \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vlad@mellanox.com \
--cc=yuval.shaia@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox