From: Benjamin Poirier Date: Mon, 11 Dec 2023 14:07:28 +0000 (-0500) Subject: bridge: vni: Indent statistics with 2 spaces X-Git-Tag: v6.7.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd4e1749a977503698e7f76e157815b5d852caf1;p=thirdparty%2Fiproute2.git bridge: vni: Indent statistics with 2 spaces `bridge -s vlan` indents statistics with 2 spaces compared to the vlan id column while `bridge -s vni` indents them with 1 space. Change `bridge vni` to match the behavior of `bridge vlan` since that second command predates `bridge vni`. Before: $ bridge -s vni dev vni group/remote vxlan1 4001 RX: bytes 0 pkts 0 drops 0 errors 0 TX: bytes 0 pkts 0 drops 0 errors 0 4002 10.0.0.1 RX: bytes 0 pkts 0 drops 0 errors 0 TX: bytes 0 pkts 0 drops 0 errors 0 vxlan2 100 RX: bytes 0 pkts 0 drops 0 errors 0 TX: bytes 0 pkts 0 drops 0 errors 0 After: $ bridge -s vni dev vni group/remote vxlan1 4001 RX: bytes 0 pkts 0 drops 0 errors 0 TX: bytes 0 pkts 0 drops 0 errors 0 4002 10.0.0.1 RX: bytes 0 pkts 0 drops 0 errors 0 TX: bytes 0 pkts 0 drops 0 errors 0 vxlan2 100 RX: bytes 0 pkts 0 drops 0 errors 0 TX: bytes 0 pkts 0 drops 0 errors 0 Reviewed-by: Petr Machata Tested-by: Petr Machata Signed-off-by: Benjamin Poirier Signed-off-by: Stephen Hemminger --- diff --git a/bridge/vni.c b/bridge/vni.c index e9943872b..2c6d506a7 100644 --- a/bridge/vni.c +++ b/bridge/vni.c @@ -187,8 +187,8 @@ static void print_vnifilter_entry_stats(struct rtattr *stats_attr) RTA_PAYLOAD(stats_attr), NLA_F_NESTED); print_nl(); - print_string(PRINT_FP, NULL, "%-" __stringify(IFNAMSIZ) "s ", ""); - print_string(PRINT_FP, NULL, "RX: ", ""); + print_string(PRINT_FP, NULL, "%-" __stringify(IFNAMSIZ) "s RX: ", + ""); if (stb[VNIFILTER_ENTRY_STATS_RX_BYTES]) { stat = rta_getattr_u64(stb[VNIFILTER_ENTRY_STATS_RX_BYTES]); @@ -208,8 +208,8 @@ static void print_vnifilter_entry_stats(struct rtattr *stats_attr) } print_nl(); - print_string(PRINT_FP, NULL, "%-" __stringify(IFNAMSIZ) "s ", ""); - print_string(PRINT_FP, NULL, "TX: ", ""); + print_string(PRINT_FP, NULL, "%-" __stringify(IFNAMSIZ) "s TX: ", + ""); if (stb[VNIFILTER_ENTRY_STATS_TX_BYTES]) { stat = rta_getattr_u64(stb[VNIFILTER_ENTRY_STATS_TX_BYTES]);