]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: Re-add pf/sol access via sysctl
authorAndy Grover <andy.grover@oracle.com>
Tue, 24 Nov 2009 23:35:51 +0000 (15:35 -0800)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 23:41:19 +0000 (16:41 -0700)
Although RDS has an official PF_RDS value now, existing software
expects to look for rds sysctls to determine it. We need to maintain
these for now, for backwards compatibility.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
net/rds/sysctl.c

index 307dc5c1be153d3326dbd0fb62e4874241fc559a..d319a0c8edd76fe1b1b7d988209c4b0b4b8838a7 100644 (file)
@@ -49,6 +49,13 @@ unsigned int  rds_sysctl_max_unacked_bytes = (16 << 20);
 
 unsigned int rds_sysctl_ping_enable = 1;
 
+/*
+ * We have official values, but must maintain the sysctl interface for existing
+ * software that expects to find these values here.
+ */
+static int rds_sysctl_pf_rds = PF_RDS;
+static int rds_sysctl_sol_rds = SOL_RDS;
+
 static ctl_table rds_sysctl_rds_table[] = {
        {
                .ctl_name       = CTL_UNNUMBERED,
@@ -70,6 +77,22 @@ static ctl_table rds_sysctl_rds_table[] = {
                .extra1         = &rds_sysctl_reconnect_min_jiffies,
                .extra2         = &rds_sysctl_reconnect_max,
        },
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "pf_rds",
+               .data           = &rds_sysctl_pf_rds,
+               .maxlen         = sizeof(int),
+               .mode           = 0444,
+               .proc_handler   = &proc_dointvec,
+       },
+       {
+               .ctl_name       = CTL_UNNUMBERED,
+               .procname       = "sol_rds",
+               .data           = &rds_sysctl_sol_rds,
+               .maxlen         = sizeof(int),
+               .mode           = 0444,
+               .proc_handler   = &proc_dointvec,
+       },
        {
                .ctl_name       = CTL_UNNUMBERED,
                .procname       = "max_unacked_packets",