diff --git a/include/villas/nodes/loopback.h b/include/villas/nodes/loopback.h index f11d82446..95572c6d6 100644 --- a/include/villas/nodes/loopback.h +++ b/include/villas/nodes/loopback.h @@ -41,7 +41,6 @@ struct sample; */ struct loopback { int queuelen; - int samplelen; struct queue_signalled queue; struct pool pool; diff --git a/include/villas/path.h b/include/villas/path.h index a12d0b598..267b29fe5 100644 --- a/include/villas/path.h +++ b/include/villas/path.h @@ -79,7 +79,6 @@ struct path { int enabled; /**< Is this path enabled. */ int reverse; /**< This path as a matching reverse path. */ - int samplelen; int queuelen; int sequence; diff --git a/lib/node.c b/lib/node.c index 9a4dba0fe..5ef81398c 100644 --- a/lib/node.c +++ b/lib/node.c @@ -268,7 +268,7 @@ char * node_name_long(struct node *n) if (n->_vt->print) { struct node_type *vt = n->_vt; char *name_long = vt->print(n); - strcatf(&n->_name_long, "%s: vectorize=%d, %s", node_name(n), n->vectorize, name_long); + strcatf(&n->_name_long, "%s: id=%d, vectorize=%d, samplelen=%d, %s", node_name(n), n->id, n->vectorize, n->samplelen, name_long); free(name_long); } else diff --git a/lib/nodes/loopback.c b/lib/nodes/loopback.c index cb866a5aa..14f49b634 100644 --- a/lib/nodes/loopback.c +++ b/lib/nodes/loopback.c @@ -36,11 +36,9 @@ int loopback_parse(struct node *n, json_t *cfg) /* Default values */ l->queuelen = DEFAULT_QUEUELEN; - l->samplelen = DEFAULT_SAMPLELEN; - ret = json_unpack_ex(cfg, &err, 0, "{ s?: i, s?: i }", - "queuelen", &l->queuelen, - "samplelen", &l->samplelen + ret = json_unpack_ex(cfg, &err, 0, "{ s?: i }", + "queuelen", &l->queuelen ); if (ret) jerror(&err, "Failed to parse configuration of node %s", node_name(n)); @@ -53,7 +51,7 @@ int loopback_open(struct node *n) int ret; struct loopback *l = n->_vd; - ret = pool_init(&l->pool, l->queuelen, SAMPLE_LEN(l->samplelen), &memtype_hugepage); + ret = pool_init(&l->pool, l->queuelen, SAMPLE_LEN(n->samplelen), &memtype_hugepage); if (ret) return ret; diff --git a/lib/nodes/shmem.c b/lib/nodes/shmem.c index 688dcb22b..4fa00a2fa 100644 --- a/lib/nodes/shmem.c +++ b/lib/nodes/shmem.c @@ -47,15 +47,14 @@ int shmem_parse(struct node *n, json_t *cfg) /* Default values */ shm->conf.queuelen = MAX(DEFAULT_SHMEM_QUEUELEN, n->vectorize); - shm->conf.samplelen = DEFAULT_SHMEM_SAMPLELEN; + shm->conf.samplelen = n->samplelen; shm->conf.polling = false; shm->exec = NULL; - ret = json_unpack_ex(cfg, &err, 0, "{ s: s, s: s, s?: i, s?: i, s?: b, s?: o }", + ret = json_unpack_ex(cfg, &err, 0, "{ s: s, s: s, s?: i, s?: b, s?: o }", "out_name", &shm->out_name, "in_name", &shm->in_name, "queuelen", &shm->conf.queuelen, - "samplelen", &shm->conf.samplelen, "polling", &shm->conf.polling, "exec", &cfg_exec ); @@ -173,8 +172,8 @@ char * shmem_print(struct node *n) struct shmem *shm = n->_vd; char *buf = NULL; - strcatf(&buf, "out_name=%s, in_name=%s, queuelen=%d, samplelen=%d, polling=%s", - shm->out_name, shm->in_name, shm->conf.queuelen, shm->conf.samplelen, shm->conf.polling ? "yes" : "no"); + strcatf(&buf, "out_name=%s, in_name=%s, queuelen=%d, polling=%s", + shm->out_name, shm->in_name, shm->conf.queuelen, shm->conf.polling ? "yes" : "no"); if (shm->exec) { strcatf(&buf, ", exec='"); diff --git a/lib/path.c b/lib/path.c index 8fee9acb1..e159917f8 100644 --- a/lib/path.c +++ b/lib/path.c @@ -209,7 +209,6 @@ int path_init(struct path *p, struct super_node *sn) p->reverse = 0; p->enabled = 1; - p->samplelen = DEFAULT_SAMPLELEN; p->queuelen = DEFAULT_QUEUELEN; p->super_node = sn; @@ -311,7 +310,6 @@ int path_parse(struct path *p, json_t *cfg, struct list *nodes) "hooks", &json_hooks, "reverse", &p->reverse, "enabled", &p->enabled, - "samplelen", &p->samplelen, "queuelen", &p->queuelen ); if (ret)