From: Yuval Shaia <yuval.shaia@oracle.com>
To: tariqt@mellanox.com, davem@davemloft.net, netdev@vger.kernel.org,
linux-rdma@vger.kernel.org, dotanb@dev.mellanox.co.il,
eli@mellanox.co.il, vlad@mellanox.com
Cc: Yuval Shaia <yuval.shaia@oracle.com>
Subject: [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes
Date: Sun, 3 Nov 2019 11:11:35 +0200 [thread overview]
Message-ID: <20191103091135.1891-1-yuval.shaia@oracle.com> (raw)
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
next reply other threads:[~2019-11-03 9:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-03 9:11 Yuval Shaia [this message]
2019-11-03 11:41 ` [PATCH v1] mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes Tariq Toukan
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=20191103091135.1891-1-yuval.shaia@oracle.com \
--to=yuval.shaia@oracle.com \
--cc=davem@davemloft.net \
--cc=dotanb@dev.mellanox.co.il \
--cc=eli@mellanox.co.il \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.com \
--cc=vlad@mellanox.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