From 84016ec7eb4960ea57c127fcf6152ef9a05b271c Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 25 Jun 2014 17:50:28 +0000 Subject: [PATCH] fixed priomap: do not delay other traffic git-svn-id: https://zerberus.eonerc.rwth-aachen.de:8443/svn/s2ss/trunk@88 8ec27952-4edc-4aab-86aa-e87bb2611832 --- src/server.c | 2 +- src/tc.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/server.c b/src/server.c index 19f8d1ac9..25a8857fb 100644 --- a/src/server.c +++ b/src/server.c @@ -58,7 +58,7 @@ static void start() /* Create priority queuing discipline */ tc_reset(i); - tc_prio(i, TC_HDL(4000, 0), i->refcnt + 2); + tc_prio(i, TC_HDL(4000, 0), i->refcnt); } /* Connect and bind nodes to their sockets, set socket options */ diff --git a/src/tc.c b/src/tc.c index 43420ec9f..5fd78a90e 100644 --- a/src/tc.c +++ b/src/tc.c @@ -26,13 +26,14 @@ int tc_prio(struct interface *i, tc_hdl_t handle, int bands) { char cmd[128]; int len = 0; + int priomap[] = { 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }; len += snprintf(cmd+len, sizeof(cmd)-len, "tc qdisc add dev %s root handle %u prio bands %u priomap", - i->name, TC_HDL_MAJ(handle), bands); + i->name, TC_HDL_MAJ(handle), bands + 3); - for (int i = 0; i < bands; i++) - len += snprintf(cmd+len, sizeof(cmd)-len, " 0"); + for (int i = 0; i < 16; i++) + len += snprintf(cmd+len, sizeof(cmd)-len, " %u", priomap[i] + bands); debug(6, "system: %s", cmd); return system(cmd);