summaryrefslogtreecommitdiff
path: root/include/net/mana/mana.h
diff options
context:
space:
mode:
authorLong Li <longli@microsoft.com>2022-11-03 12:16:26 -0700
committerLeon Romanovsky <leonro@nvidia.com>2022-11-10 07:57:27 +0200
commitaa56549792fb348892fbbae67f6f0c71bb750b65 (patch)
tree0e81caf6a7659245adcf514ddcc690cf6fba1f88 /include/net/mana/mana.h
parentfd325cd648f15eb9a8b32a68de3bafc72bcfe753 (diff)
net: mana: Define max values for SGL entries
The number of maximum SGl entries should be computed from the maximum WQE size for the intended queue type and the corresponding OOB data size. This guarantees the hardware queue can successfully queue requests up to the queue depth exposed to the upper layer. Reviewed-by: Dexuan Cui <decui@microsoft.com> Signed-off-by: Long Li <longli@microsoft.com> Link: https://lore.kernel.org/r/1667502990-2559-9-git-send-email-longli@linuxonhyperv.com Acked-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Diffstat (limited to 'include/net/mana/mana.h')
-rw-r--r--include/net/mana/mana.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/include/net/mana/mana.h b/include/net/mana/mana.h
index 6e9e86fb4c02..713a8f8cca9a 100644
--- a/include/net/mana/mana.h
+++ b/include/net/mana/mana.h
@@ -265,8 +265,6 @@ struct mana_cq {
int budget;
};
-#define GDMA_MAX_RQE_SGES 15
-
struct mana_recv_buf_oob {
/* A valid GDMA work request representing the data buffer. */
struct gdma_wqe_request wqe_req;
@@ -276,7 +274,7 @@ struct mana_recv_buf_oob {
/* SGL of the buffer going to be sent has part of the work request. */
u32 num_sge;
- struct gdma_sge sgl[GDMA_MAX_RQE_SGES];
+ struct gdma_sge sgl[MAX_RX_WQE_SGL_ENTRIES];
/* Required to store the result of mana_gd_post_work_request.
* gdma_posted_wqe_info.wqe_size_in_bu is required for progressing the