Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
codes
codes
Commits
7fe1a55d
Commit
7fe1a55d
authored
Oct 13, 2013
by
Philip Carns
Browse files
minor tweaks
parent
0a89fcac
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/modelnet-p2p-bw-loggp.conf
View file @
7fe1a55d
...
...
@@ -9,8 +9,7 @@ LPGROUPS
}
PARAMS
{
packet_size
=
"512"
;
message_size
=
"256"
;
message_size
=
"128"
;
modelnet
=
"loggp"
;
net_config_file
=
"logp-param-table.conf"
;
}
tests/modelnet-p2p-bw.c
View file @
7fe1a55d
...
...
@@ -26,7 +26,6 @@
/* TODO: these things should probably be configurable */
#define NUM_PINGPONGS 1000
/* number of pingpong exchanges per msg size */
#define MIN_SZ 4
#define MAX_SZ 67108864
#define NUM_SZS 25
static
int
net_id
=
0
;
...
...
@@ -63,6 +62,7 @@ struct svr_msg
enum
svr_event
svr_event_type
;
tw_lpid
src
;
/* source of this request or ack */
int
size
;
int
sent_size
;
/* for rc */
};
static
void
svr_init
(
...
...
@@ -289,6 +289,7 @@ static void handle_ping_rev_event(
svr_msg
*
m
,
tw_lp
*
lp
)
{
model_net_event_rc
(
net_id
,
lp
,
m
->
sent_size
);
return
;
}
...
...
@@ -300,6 +301,7 @@ static void handle_pong_rev_event(
tw_lp
*
lp
)
{
ns
->
pingpongs_completed
--
;
model_net_event_rc
(
net_id
,
lp
,
m
->
sent_size
);
/* NOTE: we do not attempt to reverse timing information stored in
* stat_array[]. This is will get rewritten with the correct value when
...
...
@@ -353,6 +355,7 @@ static void handle_pong_event(
m_remote
.
size
=
stat_array
[
msg_sz_idx
].
msg_sz
;
/* send next ping */
m
->
sent_size
=
m_remote
.
size
;
model_net_event
(
net_id
,
"ping"
,
peer_gid
,
stat_array
[
msg_sz_idx
].
msg_sz
,
sizeof
(
m_remote
),
&
m_remote
,
0
,
NULL
,
lp
);
return
;
...
...
@@ -374,6 +377,7 @@ static void handle_ping_event(
m_remote
.
size
=
m
->
size
;
/* send pong msg back to sender */
m
->
sent_size
=
m_remote
.
size
;
model_net_event
(
net_id
,
"pong"
,
m
->
src
,
m
->
size
,
sizeof
(
m_remote
),
&
m_remote
,
0
,
NULL
,
lp
);
return
;
}
...
...
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