]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
mlx4_core: fix wrong comment about the reason of subtract one from the max_cqes
authorDotan Barak <dotanb@dev.mellanox.co.il>
Sun, 3 Nov 2019 09:11:35 +0000 (11:11 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Nov 2019 02:01:01 +0000 (18:01 -0800)
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>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/main.c

index fce9b3a2434720ac3ec2f0a9562e8b5cc2176b0f..69bb6bb06e769a2b944d523980f31f7a491976e3 100644 (file)
@@ -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;