Commit 4e8d683f authored by Rao Shoaib's avatar Rao Shoaib Committed by Jason Gunthorpe

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.comSigned-off-by: default avatarRao Shoaib <rao.shoaib@oracle.com>
Reviewed-by: default avatarJason Gunthorpe <jgg@mellanox.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent 0428c6ef
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#ifndef RXE_PARAM_H #ifndef RXE_PARAM_H
#define 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) static inline enum ib_mtu rxe_mtu_int_to_enum(int mtu)
{ {
if (mtu < 256) if (mtu < 256)
...@@ -64,7 +66,6 @@ enum rxe_device_param { ...@@ -64,7 +66,6 @@ enum rxe_device_param {
RXE_PAGE_SIZE_CAP = 0xfffff000, RXE_PAGE_SIZE_CAP = 0xfffff000,
RXE_MAX_QP = 0x10000, RXE_MAX_QP = 0x10000,
RXE_MAX_QP_WR = 0x4000, RXE_MAX_QP_WR = 0x4000,
RXE_MAX_INLINE_DATA = 400,
RXE_DEVICE_CAP_FLAGS = IB_DEVICE_BAD_PKEY_CNTR RXE_DEVICE_CAP_FLAGS = IB_DEVICE_BAD_PKEY_CNTR
| IB_DEVICE_BAD_QKEY_CNTR | IB_DEVICE_BAD_QKEY_CNTR
| IB_DEVICE_AUTO_PATH_MIG | IB_DEVICE_AUTO_PATH_MIG
...@@ -77,6 +78,10 @@ enum rxe_device_param { ...@@ -77,6 +78,10 @@ enum rxe_device_param {
| IB_DEVICE_MEM_MGT_EXTENSIONS | IB_DEVICE_MEM_MGT_EXTENSIONS
| IB_DEVICE_ALLOW_USER_UNREG, | IB_DEVICE_ALLOW_USER_UNREG,
RXE_MAX_SGE = 32, 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_SGE_RD = 32,
RXE_MAX_CQ = 16384, RXE_MAX_CQ = 16384,
RXE_MAX_LOG_CQE = 15, RXE_MAX_LOG_CQE = 15,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment