From baa94bcf8a7d4f3dcc077f4c783b3235932875d7 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 21 Jan 2019 23:00:16 +0100 Subject: [PATCH] node: add netem details to node name --- lib/node.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/lib/node.c b/lib/node.c index 3bb0f8f53..3a85d7bf1 100644 --- a/lib/node.c +++ b/lib/node.c @@ -634,16 +634,21 @@ char * node_name_long(struct node *n) if (!n->_name_long) { if (node_type(n)->print) { struct node_type *vt = node_type(n); - char *name_long = vt->print(n); - strcatf(&n->_name_long, "%s: #in.signals=%zu, #in.hooks=%zu, in.vectorize=%d, #out.hooks=%zu, out.vectorize=%d, out.netem=%s, %s", + + strcatf(&n->_name_long, "%s: #in.signals=%zu, #in.hooks=%zu, in.vectorize=%d, #out.hooks=%zu, out.vectorize=%d, out.netem=%s", node_name(n), vlist_length(&n->signals), vlist_length(&n->in.hooks), n->in.vectorize, vlist_length(&n->out.hooks), n->out.vectorize, - n->tc_qdisc ? "yes" : "no", - name_long + n->tc_qdisc ? "yes" : "no" ); + if (n->tc_qdisc) + strcatf(&n->_name_long, ", mark=%d", n->mark); + + /* Append node-type specific details */ + char *name_long = vt->print(n); + strcatf(&n->_name_long, ", %s", name_long); free(name_long); } else