diff options
author | Rao Shoaib <rao.shoaib@oracle.com> | 2020-01-13 16:41:19 -0800 |
---|---|---|
committer | Jason Gunthorpe <jgg@mellanox.com> | 2020-01-15 16:27:01 -0400 |
commit | 4e8d683f11767dc6cd8eaac6b599928f343b4cdb (patch) | |
tree | 94ddf3c12cd614343aedcd7b9b40f912324d6b7f /drivers/infiniband | |
parent | 0428c6ef8a3c167b852804756357425902766120 (diff) | |
download | linux-4e8d683f11767dc6cd8eaac6b599928f343b4cdb.tar.gz linux-4e8d683f11767dc6cd8eaac6b599928f343b4cdb.tar.bz2 linux-4e8d683f11767dc6cd8eaac6b599928f343b4cdb.zip |
Introduce maximum WQE size to check limits
Introduce maximum WQE size to impose limits on max SGE's and inline data
Link: https://lore.kernel.org/r/1578962480-17814-2-git-send-email-rao.shoaib@oracle.com
Signed-off-by: Rao Shoaib <rao.shoaib@oracle.com>
Reviewed-by: Jason Gunthorpe <jgg@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/sw/rxe/rxe_param.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/infiniband/sw/rxe/rxe_param.h b/drivers/infiniband/sw/rxe/rxe_param.h index 353c6668249e..f59616b02477 100644 --- a/drivers/infiniband/sw/rxe/rxe_param.h +++ b/drivers/infiniband/sw/rxe/rxe_param.h @@ -34,6 +34,8 @@ #ifndef RXE_PARAM_H #define RXE_PARAM_H +#include <uapi/rdma/rdma_user_rxe.h> + static inline enum ib_mtu rxe_mtu_int_to_enum(int mtu) { if (mtu < 256) @@ -64,7 +66,6 @@ enum rxe_device_param { RXE_PAGE_SIZE_CAP = 0xfffff000, RXE_MAX_QP = 0x10000, RXE_MAX_QP_WR = 0x4000, - RXE_MAX_INLINE_DATA = 400, RXE_DEVICE_CAP_FLAGS = IB_DEVICE_BAD_PKEY_CNTR | IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_AUTO_PATH_MIG @@ -77,6 +78,10 @@ enum rxe_device_param { | IB_DEVICE_MEM_MGT_EXTENSIONS | IB_DEVICE_ALLOW_USER_UNREG, RXE_MAX_SGE = 32, + RXE_MAX_WQE_SIZE = sizeof(struct rxe_send_wqe) + + sizeof(struct ib_sge) * RXE_MAX_SGE, + RXE_MAX_INLINE_DATA = RXE_MAX_WQE_SIZE - + sizeof(struct rxe_send_wqe), RXE_MAX_SGE_RD = 32, RXE_MAX_CQ = 16384, RXE_MAX_LOG_CQE = 15, |