tcp: refine pacing rate determination
[linux-block.git] / net / ipv4 / sysctl_net_ipv4.c
index 0330ab2e2b6329ced120cd9b7100a5a34f50e82b..879bdc5c95b1d24281f41324761c65930052b1ef 100644 (file)
@@ -29,6 +29,7 @@
 static int zero;
 static int one = 1;
 static int four = 4;
+static int thousand = 1000;
 static int gso_max_segs = GSO_MAX_SEGS;
 static int tcp_retr1_max = 255;
 static int ip_local_port_range_min[] = { 1, 1 };
@@ -711,6 +712,24 @@ static struct ctl_table ipv4_table[] = {
                .extra1         = &one,
                .extra2         = &gso_max_segs,
        },
+       {
+               .procname       = "tcp_pacing_ss_ratio",
+               .data           = &sysctl_tcp_pacing_ss_ratio,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &zero,
+               .extra2         = &thousand,
+       },
+       {
+               .procname       = "tcp_pacing_ca_ratio",
+               .data           = &sysctl_tcp_pacing_ca_ratio,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = proc_dointvec_minmax,
+               .extra1         = &zero,
+               .extra2         = &thousand,
+       },
        {
                .procname       = "tcp_autocorking",
                .data           = &sysctl_tcp_autocorking,