1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

fixes related to tc support

This commit is contained in:
Marvin Klimke 2019-02-15 11:18:32 +01:00
parent 5be0931bb7
commit 623385cda9
4 changed files with 8 additions and 8 deletions

View file

@ -82,14 +82,14 @@ int if_start(struct interface *i)
}
/* Abort if no node is using netem */
if (mark == 0)
if (fwmark == 0)
return 0;
if (getuid() != 0)
error("Network emulation requires super-user privileges!");
/* Replace root qdisc */
ret = tc_prio(i, &i->tc_qdisc, TC_HANDLE(1, 0), TC_H_ROOT, mark);
ret = tc_prio(i, &i->tc_qdisc, TC_HANDLE(1, 0), TC_H_ROOT, fwmark);
if (ret)
error("Failed to setup priority queuing discipline: %s", nl_geterror(ret));

View file

@ -227,7 +227,7 @@ int node_init(struct node *n, struct node_type *vt)
#ifdef __linux__
n->fwmark = -1;
#endif /* __linux__ *
#endif /* __linux__ */
#ifdef WITH_NETEM
n->tc_qdisc = NULL;
@ -293,7 +293,7 @@ int node_parse(struct node *n, json_t *json, const char *name)
jerror(&err, "Failed to parse node %s", node_name(n));
#ifdef __linux__
ret = json_unpack_ex(json, &err, 0, "{ s?: { s: o, s: i } }",
ret = json_unpack_ex(json, &err, 0, "{ s?: { s?: o, s?: i } }",
"out",
"netem", &json_netem,
"fwmark", &n->fwmark

View file

@ -290,7 +290,7 @@ char * rtp_print(struct node *n)
strcatf(&buf, ", rtcp.mode=%s, rtcp.throttle_mode=%s", mode, throttle_mode);
if (r->rtcp.throttle_mode == RTCP_MODE_AIMD)
if (r->rtcp.mode == RTCP_MODE_AIMD)
strcatf(&buf, ", aimd.a=%f, aimd.b=%f, aimd.start_rate=%f", r->aimd.a, r->aimd.b, r->aimd.last_rate);
}

View file

@ -40,7 +40,7 @@ OUTPUT_FILE=$(mktemp)
FORMAT="villas.binary"
VECTORIZE="1"
RATE=5000
RATE=1000
NUM_SAMPLES=100000
cat > ${CONFIG_FILE_SRC} << EOF
@ -62,7 +62,7 @@ cat > ${CONFIG_FILE_SRC} << EOF
"aimd" : {
"a" : 10,
"b" : 0.5,
"start_rate" : 5000
"start_rate" : ${RATE}
},
"in" : {
"address" : "0.0.0.0:12002",
@ -99,7 +99,7 @@ cat > ${CONFIG_FILE_DEST} << EOF
"aimd" : {
"a" : 10,
"b" : 0.5,
"start_rate" : 5000
"start_rate" : ${RATE}
},
"in" : {
"address" : "0.0.0.0:12000",