summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2014-02-21 12:05:20 -0800
committerJP Abgrall <jpa@google.com>2014-02-21 12:05:20 -0800
commit32d1ac4d45c25180cb841664986398c7e23995e4 (patch)
tree541539b75e6d5a9a1feb5678c6a0317a259a292c /services
parentc4f6c351e18380e712d5d365d2a13cfa5674daf7 (diff)
downloadframeworks_base-32d1ac4d45c25180cb841664986398c7e23995e4.zip
frameworks_base-32d1ac4d45c25180cb841664986398c7e23995e4.tar.gz
frameworks_base-32d1ac4d45c25180cb841664986398c7e23995e4.tar.bz2
ConnectivityService: add support to set TCP initial rwnd
The value for the TCP initial receive window comes from, in order, kernel /proc/sys/net/ipv4/tcp_default_init_rwnd init.rc (via properties) net.tcp.default_init_rwnd properties net.tcp.default_init_rwnd gservices Settings.Global.TCP_DEFAULT_INIT_RWND Bug: 12020135 Change-Id: I0e271be19472900fa9f3bab037d53383ec014a9e
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/ConnectivityService.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/ConnectivityService.java b/services/core/java/com/android/server/ConnectivityService.java
index b56923f..342336e 100644
--- a/services/core/java/com/android/server/ConnectivityService.java
+++ b/services/core/java/com/android/server/ConnectivityService.java
@@ -2669,6 +2669,15 @@ public class ConnectivityService extends IConnectivityManager.Stub {
}
setBufferSize(bufferSizes);
}
+
+ final String defaultRwndKey = "net.tcp.default_init_rwnd";
+ int defaultRwndValue = SystemProperties.getInt(defaultRwndKey, 0);
+ Integer rwndValue = Settings.Global.getInt(mContext.getContentResolver(),
+ Settings.Global.TCP_DEFAULT_INIT_RWND, defaultRwndValue);
+ final String sysctlKey = "sys.sysctl.tcp_def_init_rwnd";
+ if (rwndValue != 0) {
+ SystemProperties.set(sysctlKey, rwndValue.toString());
+ }
}
/**