aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@oracle.com>2019-04-25 12:52:07 -0700
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>2019-04-25 12:59:21 -0700
commitf615733b712484ea1ab10c729d98d361b1a94db2 (patch)
tree194f1d264d118051e1d58f78043249a9160db9be
parent7cf53e52f4425b425b290986794a1a8899dceb77 (diff)
downloadlinux-net-next/master-v5.1-rcx.tar.gz
rds: add sysctl for rds support of On-Demand-Pagingnet-next/master-v5.1-rcx
RDS doesn't support RDMA on memory apertures that require On Demand Paging (ODP), such as FS DAX memory. A sysctl is added to indicate whether RDMA requiring ODP is supported. Reviewed-by: HÃ¥kon Bugge <haakon.bugge@oracle.com> Reviewed-tested-by: Zhu Yanjun <yanjun.zhu@oracle.com> Signed-off-by: Hans Westgaard Ry <hans.westgaard.ry@oracle.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
-rw-r--r--net/rds/ib.h1
-rw-r--r--net/rds/ib_sysctl.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/net/rds/ib.h b/net/rds/ib.h
index 67a715b076cab1..80e11ef32450fb 100644
--- a/net/rds/ib.h
+++ b/net/rds/ib.h
@@ -457,5 +457,6 @@ extern unsigned long rds_ib_sysctl_max_unsig_wrs;
extern unsigned long rds_ib_sysctl_max_unsig_bytes;
extern unsigned long rds_ib_sysctl_max_recv_allocation;
extern unsigned int rds_ib_sysctl_flow_control;
+extern unsigned int rds_ib_sysctl_odp_support;
#endif
diff --git a/net/rds/ib_sysctl.c b/net/rds/ib_sysctl.c
index e4e41b3afce713..7cc02cdc1c374b 100644
--- a/net/rds/ib_sysctl.c
+++ b/net/rds/ib_sysctl.c
@@ -60,6 +60,7 @@ static unsigned long rds_ib_sysctl_max_unsig_wr_max = 64;
* will cause credits to be added before protocol negotiation.
*/
unsigned int rds_ib_sysctl_flow_control = 0;
+unsigned int rds_ib_sysctl_odp_support;
static struct ctl_table rds_ib_sysctl_table[] = {
{
@@ -103,6 +104,13 @@ static struct ctl_table rds_ib_sysctl_table[] = {
.mode = 0644,
.proc_handler = proc_dointvec,
},
+ {
+ .procname = "odp_support",
+ .data = &rds_ib_sysctl_odp_support,
+ .maxlen = sizeof(rds_ib_sysctl_odp_support),
+ .mode = 0444,
+ .proc_handler = proc_dointvec,
+ },
{ }
};