diff options
author | Avinash Repaka <avinash.repaka@oracle.com> | 2016-02-29 15:30:57 -0800 |
---|---|---|
committer | Santosh Shilimkar <santosh.shilimkar@oracle.com> | 2017-01-02 14:02:57 -0800 |
commit | f9fb69adb6c7acca60977a4db5a5f95b8e66c041 (patch) | |
tree | dff2d16511069d9fb5961ba6284ae3aa56520fa1 /net/rds/rds.h | |
parent | 192a798f52998a643cef84fce0204be56666b0bf (diff) |
RDS: make message size limit compliant with spec
RDS support max message size as 1M but the code doesn't check this
in all cases. Patch fixes it for RDMA & non-RDMA and RDS MR size
and its enforced irrespective of underlying transport.
Signed-off-by: Avinash Repaka <avinash.repaka@oracle.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Diffstat (limited to 'net/rds/rds.h')
-rw-r--r-- | net/rds/rds.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/rds/rds.h b/net/rds/rds.h index 8ccd5a93e56c..f713194e4620 100644 --- a/net/rds/rds.h +++ b/net/rds/rds.h @@ -50,6 +50,9 @@ void rdsdebug(char *fmt, ...) #define RDS_FRAG_SHIFT 12 #define RDS_FRAG_SIZE ((unsigned int)(1 << RDS_FRAG_SHIFT)) +/* Used to limit both RDMA and non-RDMA RDS message to 1MB */ +#define RDS_MAX_MSG_SIZE ((unsigned int)(1 << 20)) + #define RDS_CONG_MAP_BYTES (65536 / 8) #define RDS_CONG_MAP_PAGES (PAGE_ALIGN(RDS_CONG_MAP_BYTES) / PAGE_SIZE) #define RDS_CONG_MAP_PAGE_BITS (PAGE_SIZE * 8) |