Commit 4a1599b2 authored by Jonathan Jenkins's avatar Jonathan Jenkins

Initial 'simplewan' implementation

parent dd369556
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#define CATEGORY_MAX 12 #define CATEGORY_MAX 12
typedef struct simplenet_param simplenet_param; typedef struct simplenet_param simplenet_param;
typedef struct simplewan_param simplewan_param;
typedef struct dragonfly_param dragonfly_param; typedef struct dragonfly_param dragonfly_param;
typedef struct torus_param torus_param; typedef struct torus_param torus_param;
typedef struct loggp_param loggp_param; typedef struct loggp_param loggp_param;
...@@ -25,6 +26,7 @@ typedef struct mn_stats mn_stats; ...@@ -25,6 +26,7 @@ typedef struct mn_stats mn_stats;
enum NETWORKS enum NETWORKS
{ {
SIMPLENET, SIMPLENET,
SIMPLEWAN,
TORUS, TORUS,
DRAGONFLY, DRAGONFLY,
LOGGP, LOGGP,
...@@ -58,6 +60,12 @@ struct simplenet_param ...@@ -58,6 +60,12 @@ struct simplenet_param
int num_nics; int num_nics;
}; };
struct simplewan_param
{
char bw_filename[MAX_NAME_LENGTH];
char startup_filename[MAX_NAME_LENGTH];
};
struct dragonfly_param struct dragonfly_param
{ {
int num_routers; /*Number of routers in a group*/ int num_routers; /*Number of routers in a group*/
......
...@@ -12,5 +12,5 @@ src_libcodes_net_a_SOURCES = \ ...@@ -12,5 +12,5 @@ src_libcodes_net_a_SOURCES = \
src/models/networks/model-net/simplenet-upd.c \ src/models/networks/model-net/simplenet-upd.c \
src/models/networks/model-net/torus.c \ src/models/networks/model-net/torus.c \
src/models/networks/model-net/dragonfly.c \ src/models/networks/model-net/dragonfly.c \
src/models/networks/model-net/loggp.c src/models/networks/model-net/loggp.c \
src/models/networks/model-net/simplewan.c
"Simplewan"
----------
Model overview:
---------------
Simplewan is an extension of simplenet to allow for arbitrary point-to-point
capacities.
Simplewan has nearly the same duplex queued transmission semantics as
simplenet, though with a few important differences. First, point-to-point
latencies and bandwidths are different. Second, each unique link is given its
own queue that do not interfere with the others. The use case for this model is
a set of sites with internal networks, with each site communicating via
simplewan; we assume the internal network is capable of servicing all
outgoing/incoming WAN transmissions at their full capacities.
Additional configuration is needed to initialize the link latencies/capacities.
In the codes-configuration file, the variables "net_startup_ns_file" and
"net_bw_mbps_file" must be set under the PARAMS group. They point (in a path
relative to the configuration file) to configurations for the startup and
bandwidth costs, respectively.
Each of the latency/bandwidth configuration files have the same format, based
on a triangular matrix. Given N modelnet LPs, it has the format:
1:2 1:3 ... 1:N
2:3 2:4 ... 2:N
...
N-1:N
where x:y is the latency or bandwidth between components x and y. Whitespace is
ignored, but linebreaks are not, and delimit rows of the matrix. The relative
simplewan identifiers 1..N are assigned to simplewan LPs in the order of
their appearance in the codes-configuration file. In the future, a full NxN
matrix may be used to facilitate asymmetric link capacities if the need arises.
This diff is collapsed.
check_PROGRAMS += tests/modelnet-test tests/modelnet-p2p-bw \ check_PROGRAMS += tests/modelnet-test tests/modelnet-p2p-bw \
tests/concurrent-msg-recv tests/concurrent-msg-recv tests/modelnet-simplewan-test
TESTS += tests/modelnet-test.sh \ TESTS += tests/modelnet-test.sh \
tests/modelnet-test-torus.sh \ tests/modelnet-test-torus.sh \
...@@ -19,6 +19,10 @@ tests_modelnet_test_LDADD = $(testlib) ${CODES_BASE_LIBS} ...@@ -19,6 +19,10 @@ tests_modelnet_test_LDADD = $(testlib) ${CODES_BASE_LIBS}
tests_modelnet_test_CFLAGS = ${CODES_BASE_CFLAGS} tests_modelnet_test_CFLAGS = ${CODES_BASE_CFLAGS}
tests_modelnet_test_SOURCES = tests/modelnet-test.c tests_modelnet_test_SOURCES = tests/modelnet-test.c
tests_modelnet_simplewan_test_LDADD = $(testlib) ${CODES_BASE_LIBS}
tests_modelnet_simplewan_test_CFLAGS = ${CODES_BASE_CFLAGS}
tests_modelnet_simplewan_test_SOURCES = tests/modelnet-simplewan-test.c
tests_modelnet_p2p_bw_LDADD = $(testlib) ${CODES_BASE_LIBS} tests_modelnet_p2p_bw_LDADD = $(testlib) ${CODES_BASE_LIBS}
tests_modelnet_p2p_bw_CFLAGS = ${CODES_BASE_CFLAGS} tests_modelnet_p2p_bw_CFLAGS = ${CODES_BASE_CFLAGS}
tests_modelnet_p2p_bw_SOURCES = tests/modelnet-p2p-bw.c tests_modelnet_p2p_bw_SOURCES = tests/modelnet-p2p-bw.c
......
LPGROUPS
{
MODELNET_GRP
{
repetitions="3";
server="1";
modelnet_simplewan="1";
}
}
PARAMS
{
message_size="256";
packet_size="1024";
modelnet="simplewan";
net_startup_ns_file="modelnet-test-startup.conf";
net_bw_mbps_file="modelnet-test-bw.conf";
}
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment