Message ID | 1454932527-30569-4-git-send-email-razor@blackwall.org |
---|---|
State | Superseded, archived |
Delegated to: | stephen hemminger |
Headers | show |
On Mon, 8 Feb 2016 12:55:09 +0100 Nikolay Aleksandrov <razor@blackwall.org> wrote: > + > + if (tb[IFLA_BR_HELLO_TIMER]) > + fprintf(f, "hello_timer %llu ", > + rta_getattr_u64(tb[IFLA_BR_HELLO_TIMER])); > + > + if (tb[IFLA_BR_TCN_TIMER]) > + fprintf(f, "tcn_timer %llu ", > + rta_getattr_u64(tb[IFLA_BR_TCN_TIMER])); > + > + if (tb[IFLA_BR_TOPOLOGY_CHANGE_TIMER]) > + fprintf(f, "topology_change_timer %llu ", > + rta_getattr_u64(tb[IFLA_BR_TOPOLOGY_CHANGE_TIMER])); > + > + if (tb[IFLA_BR_GC_TIMER]) > + fprintf(f, "gc_timer %llu ", > + These should be rescaled as seconds.
On 02/08/2016 11:23 PM, Stephen Hemminger wrote: > On Mon, 8 Feb 2016 12:55:09 +0100 > Nikolay Aleksandrov <razor@blackwall.org> wrote: > >> + >> + if (tb[IFLA_BR_HELLO_TIMER]) >> + fprintf(f, "hello_timer %llu ", >> + rta_getattr_u64(tb[IFLA_BR_HELLO_TIMER])); >> + >> + if (tb[IFLA_BR_TCN_TIMER]) >> + fprintf(f, "tcn_timer %llu ", >> + rta_getattr_u64(tb[IFLA_BR_TCN_TIMER])); >> + >> + if (tb[IFLA_BR_TOPOLOGY_CHANGE_TIMER]) >> + fprintf(f, "topology_change_timer %llu ", >> + rta_getattr_u64(tb[IFLA_BR_TOPOLOGY_CHANGE_TIMER])); >> + >> + if (tb[IFLA_BR_GC_TIMER]) >> + fprintf(f, "gc_timer %llu ", >> + > > These should be rescaled as seconds. > Wanted to be consistent with the other exported time values, but okay I'll convert these to seconds. Thanks, Nik
diff --git a/include/utils.h b/include/utils.h index 7310f4e0e5db..f109521a904e 100644 --- a/include/utils.h +++ b/include/utils.h @@ -175,7 +175,6 @@ static inline __u32 nl_mgrp(__u32 group) return group ? (1 << (group - 1)) : 0; } - int print_timestamp(FILE *fp); void print_nlmsg_timestamp(FILE *fp, const struct nlmsghdr *n); diff --git a/ip/iplink_bridge.c b/ip/iplink_bridge.c index d9a725b0be0f..8504be5625fa 100644 --- a/ip/iplink_bridge.c +++ b/ip/iplink_bridge.c @@ -196,6 +196,22 @@ static void bridge_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[]) if (tb[IFLA_BR_TOPOLOGY_CHANGE_DETECTED]) fprintf(f, "topology_change_detected %u ", rta_getattr_u8(tb[IFLA_BR_TOPOLOGY_CHANGE_DETECTED])); + + if (tb[IFLA_BR_HELLO_TIMER]) + fprintf(f, "hello_timer %llu ", + rta_getattr_u64(tb[IFLA_BR_HELLO_TIMER])); + + if (tb[IFLA_BR_TCN_TIMER]) + fprintf(f, "tcn_timer %llu ", + rta_getattr_u64(tb[IFLA_BR_TCN_TIMER])); + + if (tb[IFLA_BR_TOPOLOGY_CHANGE_TIMER]) + fprintf(f, "topology_change_timer %llu ", + rta_getattr_u64(tb[IFLA_BR_TOPOLOGY_CHANGE_TIMER])); + + if (tb[IFLA_BR_GC_TIMER]) + fprintf(f, "gc_timer %llu ", + rta_getattr_u64(tb[IFLA_BR_GC_TIMER])); } static void bridge_print_help(struct link_util *lu, int argc, char **argv,