Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r1039 committed - RTT and buffer size values are now sent to client also after middlebox...

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r1039 committed - RTT and buffer size values are now sent to client also after middlebox...


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r1039 committed - RTT and buffer size values are now sent to client also after middlebox...
  • Date: Tue, 25 Mar 2014 13:52:02 +0000

Revision: 1039
Author:

Date: Tue Mar 25 13:51:45 2014 UTC
Log: RTT and buffer size values are now sent to client also after middlebox test

http://code.google.com/p/ndt/source/detail?r=1039

Modified:
/branches/Issue136/Applet/src/edu/internet2/ndt/Tcpbw100.java
/branches/Issue136/src/web100-util.c
/branches/Issue136/src/web100clt.c

=======================================
--- /branches/Issue136/Applet/src/edu/internet2/ndt/Tcpbw100.java Wed Mar 19 13:05:17 2014 UTC
+++ /branches/Issue136/Applet/src/edu/internet2/ndt/Tcpbw100.java Tue Mar 25 13:51:45 2014 UTC
@@ -440,6 +440,11 @@
}
return result;
}
+
+ // get PC buffer imposed throughput limit
+ public String get_PcBuffSpdLimit() {
+ return Double.toString(rwin / rttsec);
+ }

// commenting out unused method, but not removing in case of future
use
/*
@@ -3656,8 +3661,8 @@
* to known values and writes out the specific results.
*
* server data is ordered as: Server IP; Client IP; CurrentMSS;
- * WinScaleSent; WinScaleRcvd; Client then adds Server IP; Client IP.
- *
+ * WinScaleSent; WinScaleRcvd; SumRTT; CountRTT; MaxRwinRcvd; Client then adds Server IP; Client IP.
+ *
* @param sMidBoxTestResParam
* String Middlebox results
*/
@@ -3679,6 +3684,19 @@
// changing order for issue 61
int iWinsSent = Integer.parseInt(tokens.nextToken());
int iWinsRecv = Integer.parseInt(tokens.nextToken()); // unused, but retaining
+
+ // for compatibility with older servers
+ // which does not sent SumRTT,CountRTT and MaxRwinRcvd values
+ if (tokens.countTokens() > 2) {
+ _iSumRTT = Integer.parseInt(tokens.nextToken());
+ _iCountRTT = Integer.parseInt(tokens.nextToken());
+ _iMaxRwinRcvd = Integer.parseInt(tokens.nextToken());
+
+ // calculate avgrtt and PC buffer imposed throughput
limit
+ pub_avgrtt = (double) _iSumRTT / _iCountRTT;
+ rwin = _iMaxRwinRcvd * NDTConstants.EIGHT / NDTConstants.KILO_BITS / NDTConstants.KILO_BITS;
+ rttsec = pub_avgrtt / NDTConstants.KILO;
+ }

// Get Client reported server IP
String sClientSideServerIp = tokens.nextToken();
=======================================
--- /branches/Issue136/src/web100-util.c Mon Oct 14 13:20:21 2013 UTC
+++ /branches/Issue136/src/web100-util.c Tue Mar 25 13:51:45 2014 UTC
@@ -151,7 +151,7 @@
* @param agent pointer to a web100_agent
* @param cn pointer to the web100_connection
* @param results pointer to string containing Server address , client address
- * currentMSS, WinScaleSent and WinScaleRecv values
+ * currentMSS, WinScaleSent, WinScaleRecv, SumRTT, CountRTT and MaxRwinRcvd values
*
*
*/
@@ -181,7 +181,7 @@
socklen_t saddr_size;

// middlebox test results
- static char vars[][255] = { "CurMSS", "WinScaleSent", "WinScaleRcvd", };
+ static char vars[][255] = {"WinScaleSent", "WinScaleRcvd", "SumRTT", "CountRTT", "MaxRwinRcvd" };

assert(results);

@@ -235,30 +235,27 @@
log_print(3, "Client: %s%s ", line, tmpstr);
strlcat(results, line, results_strlen);

- // get web100 values for the middlebox test result group
- for (i = 0; i < sizeof(vars) / sizeof(vars[0]); i++) {
+ // get current MSS value
#if USE_WEB100
- // read web100_group and web100_var of vars[i] into group and var
- web100_agent_find_var_and_group(agent, vars[i], &group, &var);
+ // read web100_group and web100_var of CurMSS into group and var
+ web100_agent_find_var_and_group(agent, "CurMSS", &group, &var);
// read variable value from web100 connection
web100_raw_read(var, cn, buff);

// get current MSS in textual format and append to results

// get current MSS value and append to "results"
- if (strcmp(vars[i], "CurMSS") == 0)
currentMSSval = atoi(
web100_value_to_text(web100_get_var_type(var), buff));
snprintf(line, sizeof(line), "%s;",
web100_value_to_text(web100_get_var_type(var), buff));
#elif USE_WEB10G
int type;
- type = web10g_get_val(agent, cn, vars[i], &value);
+ type = web10g_get_val(agent, cn, "CurMSS", &value);
if (type == -1) {
- log_println(0, "Middlebox: Failed to read the value of %s", vars[i]);
+ log_println(0, "Middlebox: Failed to read the value of CurMSS");
return;
} else {
- if (strcmp(vars[i], "CurMSS") == 0)
currentMSSval = value.uv32;
snprintf(line, sizeof(line), "%u;", value.uv32);
}
@@ -270,7 +267,7 @@
// strlcat(results, line, sizeof(results));
strlcat(results, line, results_strlen);
log_print(3, "%s", line);
- }
+
log_println(3, "");
log_println(0, "Sending %d Byte packets over the network, and data=%s",
currentMSSval, line);
@@ -366,6 +363,36 @@
if (k < 0) // general error writing to socket. quit
break;
}
+
+ // get web100 values for the middlebox test result group
+ for (i = 0; i < sizeof(vars) / sizeof(vars[0]); i++) {
+#if USE_WEB100
+ // read web100_group and web100_var of vars[i] into group and var
+ web100_agent_find_var_and_group(agent, vars[i], &group, &var);
+ // read variable value from web100 connection
+ web100_raw_read(var, cn, buff);
+
+ snprintf(line, sizeof(line), "%s;",
+ web100_value_to_text(web100_get_var_type(var), buff));
+#elif USE_WEB10G
+ int type;
+ type = web10g_get_val(agent, cn, vars[i], &value);
+ if (type == -1) {
+ log_println(0, "Middlebox: Failed to read the value of %s", vars[i]);
+ return;
+ } else {
+ snprintf(line, sizeof(line), "%u;", value.uv32);
+ }
+#endif
+
+ if (strcmp(line, "4294967295;") == 0)
+ snprintf(line, sizeof(line), "%d;", -1);
+
+ // strlcat(results, line, sizeof(results));
+ strlcat(results, line, results_strlen);
+ log_print(3, "%s", line);
+ }
+

#if USE_WEB100
log_println(5, "Finished with web100_middlebox() routine snap-0x%x, "
=======================================
--- /branches/Issue136/src/web100clt.c Fri Feb 14 13:46:27 2014 UTC
+++ /branches/Issue136/src/web100clt.c Tue Mar 25 13:51:45 2014 UTC
@@ -252,6 +252,7 @@
*
* Server data is first.
* order is Server IP; Client IP; CurrentMSS; WinScaleRcvd; WinScaleSent;
+ * SumRTT; CountRTT; MaxRwinRcvd;
* Client then adds
* Server IP; Client IP.
* @param midresult_str String containing test results


  • [ndt-dev] [ndt] r1039 committed - RTT and buffer size values are now sent to client also after middlebox..., ndt, 03/25/2014

Archive powered by MHonArc 2.6.16.

Top of Page