Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
codes
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
38
Issues
38
List
Boards
Labels
Milestones
Merge Requests
8
Merge Requests
8
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
codes
codes
Commits
4a1599b2
Commit
4a1599b2
authored
Apr 16, 2014
by
Jonathan Jenkins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Initial 'simplewan' implementation
parent
dd369556
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
1384 additions
and
3 deletions
+1384
-3
codes/model-net.h
codes/model-net.h
+8
-0
src/models/Makefile.subdir
src/models/Makefile.subdir
+2
-2
src/models/networks/model-net/README.simplewan.txt
src/models/networks/model-net/README.simplewan.txt
+36
-0
src/models/networks/model-net/simplewan.c
src/models/networks/model-net/simplewan.c
+863
-0
tests/Makefile.subdir
tests/Makefile.subdir
+5
-1
tests/conf/modelnet-test-bw.conf
tests/conf/modelnet-test-bw.conf
+2
-0
tests/conf/modelnet-test-simplewan.conf
tests/conf/modelnet-test-simplewan.conf
+17
-0
tests/conf/modelnet-test-startup.conf
tests/conf/modelnet-test-startup.conf
+2
-0
tests/modelnet-simplewan-test.c
tests/modelnet-simplewan-test.c
+449
-0
No files found.
codes/model-net.h
View file @
4a1599b2
...
...
@@ -17,6 +17,7 @@
#define CATEGORY_MAX 12
typedef
struct
simplenet_param
simplenet_param
;
typedef
struct
simplewan_param
simplewan_param
;
typedef
struct
dragonfly_param
dragonfly_param
;
typedef
struct
torus_param
torus_param
;
typedef
struct
loggp_param
loggp_param
;
...
...
@@ -25,6 +26,7 @@ typedef struct mn_stats mn_stats;
enum
NETWORKS
{
SIMPLENET
,
SIMPLEWAN
,
TORUS
,
DRAGONFLY
,
LOGGP
,
...
...
@@ -58,6 +60,12 @@ struct simplenet_param
int
num_nics
;
};
struct
simplewan_param
{
char
bw_filename
[
MAX_NAME_LENGTH
];
char
startup_filename
[
MAX_NAME_LENGTH
];
};
struct
dragonfly_param
{
int
num_routers
;
/*Number of routers in a group*/
...
...
src/models/Makefile.subdir
View file @
4a1599b2
...
...
@@ -12,5 +12,5 @@ src_libcodes_net_a_SOURCES = \
src/models/networks/model-net/simplenet-upd.c
\
src/models/networks/model-net/torus.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
src/models/networks/model-net/README.simplewan.txt
0 → 100644
View file @
4a1599b2
"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.
src/models/networks/model-net/simplewan.c
0 → 100644
View file @
4a1599b2
This diff is collapsed.
Click to expand it.
tests/Makefile.subdir
View file @
4a1599b2
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/modelnet-test-torus.sh
\
...
...
@@ -19,6 +19,10 @@ tests_modelnet_test_LDADD = $(testlib) ${CODES_BASE_LIBS}
tests_modelnet_test_CFLAGS
=
${CODES_BASE_CFLAGS}
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_CFLAGS
=
${CODES_BASE_CFLAGS}
tests_modelnet_p2p_bw_SOURCES
=
tests/modelnet-p2p-bw.c
...
...
tests/conf/modelnet-test-bw.conf
0 → 100644
View file @
4a1599b2
0
.
0
50
.
0
100
.
0
tests/conf/modelnet-test-simplewan.conf
0 → 100644
View file @
4a1599b2
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"
;
}
tests/conf/modelnet-test-startup.conf
0 → 100644
View file @
4a1599b2
0
.
0
10000
.
0
20000
.
0
tests/modelnet-simplewan-test.c
0 → 100644
View file @
4a1599b2
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment