From: Jamal Hadi Salim <jhs@mojatatu.com>
To: stephen@networkplumber.org
Cc: netdev@vger.kernel.org, daniel@iogearbox.net,
xiyou.wangcong@gmail.com, Jamal Hadi Salim <jhs@mojatatu.com>
Subject: [iproute2 PATH 2/2] tc action policer: enable timestamp display
Date: Wed, 25 May 2016 06:05:49 -0400 [thread overview]
Message-ID: <1464170749-7626-2-git-send-email-jhs@emojatatu.com> (raw)
In-Reply-To: <1464170749-7626-1-git-send-email-jhs@emojatatu.com>
From: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
---
tc/m_police.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tc/m_police.c b/tc/m_police.c
index 8752d4f..cb17c9e 100644
--- a/tc/m_police.c
+++ b/tc/m_police.c
@@ -379,7 +379,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;
}
--
1.9.1
next prev parent reply other threads:[~2016-05-25 10:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 10:05 [iproute2 PATH 1/2] tc action policer: Avoid nonsensical input Jamal Hadi Salim
2016-05-25 10:05 ` Jamal Hadi Salim [this message]
2016-05-25 10:09 ` [iproute2 PATH 2/2] tc action policer: enable timestamp display Jamal Hadi Salim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1464170749-7626-2-git-send-email-jhs@emojatatu.com \
--to=jhs@mojatatu.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox