]> rtime.felk.cvut.cz Git - lisovros/iproute2_canprio.git/blobdiff - tc/q_rr.c
Add reference to tc-codel(8) to the SEE ALSO section
[lisovros/iproute2_canprio.git] / tc / q_rr.c
index 9335c470589a43c254f458a9a5b0ed6ea92a2909..79072ade6236241132135870655e19f470514ca9 100644 (file)
--- a/tc/q_rr.c
+++ b/tc/q_rr.c
@@ -8,11 +8,6 @@
  *
  * Authors:    PJ Waskiewicz, <peter.p.waskiewicz.jr@intel.com>
  * Original Authors:   Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru> (from PRIO)
- *
- * Changes:
- *
- * Ole Husgaard <sparre@login.dknet.dk>: 990513: prio2band map was always reset.
- * J Hadi Salim <hadi@cyberus.ca>: 990609: priomap fix.
  */
 
 #include <stdio.h>
@@ -33,11 +28,9 @@ static void explain(void)
        fprintf(stderr, "Usage: ... rr bands NUMBER priomap P1 P2... [multiqueue]\n");
 }
 
-#define usage() return(-1)
 
 static int rr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlmsghdr *n)
 {
-       int ok = 0;
        int pmap_mode = 0;
        int idx = 0;
        struct tc_prio_qopt opt={3,{ 1, 2, 2, 2, 1, 2, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1 }};
@@ -53,7 +46,6 @@ static int rr_parse_opt(struct qdisc_util *qu, int argc, char **argv, struct nlm
                                fprintf(stderr, "Illegal \"bands\"\n");
                                return -1;
                        }
-                       ok++;
                } else if (strcmp(*argv, "priomap") == 0) {
                        if (pmap_mode) {
                                fprintf(stderr, "Error: duplicate priomap\n");
@@ -115,7 +107,7 @@ int rr_print_opt(struct qdisc_util *qu, FILE *f, struct rtattr *opt)
 
        if (tb[TCA_PRIO_MQ])
                fprintf(f, " multiqueue: %s ",
-                   *(unsigned char *)RTA_DATA(tb[TCA_PRIO_MQ]) ? "on" : "off");
+                       rta_getattr_u8(tb[TCA_PRIO_MQ]) ? "on" : "off");
 
        return 0;
 }