netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next 1/1] tc: report time an action was first used
@ 2020-05-17 13:28 Roman Mashak
  2020-05-18 13:10 ` Jamal Hadi Salim
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Roman Mashak @ 2020-05-17 13:28 UTC (permalink / raw)
  To: dsahern; +Cc: stephen, netdev, kernel, jhs, xiyou.wangcong, jiri, Roman Mashak

Have print_tm() dump firstuse value along with install, lastuse
and expires.

Signed-off-by: Roman Mashak <mrv@mojatatu.com>
---
 tc/tc_util.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tc/tc_util.c b/tc/tc_util.c
index 12f865cc71bf..f6aa2ed552a9 100644
--- a/tc/tc_util.c
+++ b/tc/tc_util.c
@@ -760,6 +760,11 @@ void print_tm(FILE *f, const struct tcf_t *tm)
 		print_uint(PRINT_FP, NULL, " used %u sec",
 			   (unsigned int)(tm->lastuse/hz));
 	}
+	if (tm->firstuse != 0) {
+		print_uint(PRINT_JSON, "first_used", NULL, tm->firstuse);
+		print_uint(PRINT_FP, NULL, " firstused %u sec",
+			   (unsigned int)(tm->firstuse/hz));
+	}
 	if (tm->expires != 0) {
 		print_uint(PRINT_JSON, "expires", NULL, tm->expires);
 		print_uint(PRINT_FP, NULL, " expires %u sec",
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-05-24 12:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-17 13:28 [PATCH iproute2-next 1/1] tc: report time an action was first used Roman Mashak
2020-05-18 13:10 ` Jamal Hadi Salim
2020-05-18 15:38   ` David Ahern
2020-05-19  9:09     ` Jamal Hadi Salim
2020-05-18 15:36 ` David Ahern
2020-05-18 16:41   ` Roman Mashak
2020-05-19 18:08     ` Stephen Hemminger
2020-05-19 18:09       ` David Ahern
2020-05-19 18:06 ` Stephen Hemminger
2020-05-19 18:11 ` David Ahern
2020-05-24 12:36   ` Roman Mashak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).