]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc action policer: enable timestamp display
authorJamal Hadi Salim <jhs@mojatatu.com>
Wed, 25 May 2016 10:05:49 +0000 (06:05 -0400)
committerStephen Hemminger <shemming@brocade.com>
Tue, 31 May 2016 20:03:13 +0000 (13:03 -0700)
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
tc/m_police.c

index 8f794ed4dd905450bdf6b507a9bc19af9c348a0a..a8b65dd9cd4292ac0e2a58185f49cce348c1bbd9 100644 (file)
@@ -385,7 +385,16 @@ int print_police(struct action_util *a, FILE *f, struct rtattr *arg)
        linklayer = (p->rate.linklayer & TC_LINKLAYER_MASK);
        if (linklayer > TC_LINKLAYER_ETHERNET || show_details)
                fprintf(f, "linklayer %s ", sprint_linklayer(linklayer, b2));
-       fprintf(f, "\n\tref %d bind %d\n", p->refcnt, p->bindcnt);
+       fprintf(f, "\n\tref %d bind %d", p->refcnt, p->bindcnt);
+       if (show_stats) {
+               if (tb[TCA_POLICE_TM]) {
+                       struct tcf_t *tm = RTA_DATA(tb[TCA_POLICE_TM]);
+
+                       print_tm(f, tm);
+               }
+       }
+       fprintf(f, "\n");
+
 
        return 0;
 }