aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Poirier <bpoirier@nvidia.com>2023-12-11 09:07:28 -0500
committerStephen Hemminger <stephen@networkplumber.org>2023-12-22 09:54:23 -0800
commitdd4e1749a977503698e7f76e157815b5d852caf1 (patch)
tree972c423e54960a9442c1c36d17c4469b93100e62
parent717f2f82f1daf6751495c5ded394c894afcdde02 (diff)
downloadiproute2-next-dd4e1749a977503698e7f76e157815b5d852caf1.tar.gz
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 <petrm@nvidia.com> Tested-by: Petr Machata <petrm@nvidia.com> Signed-off-by: Benjamin Poirier <bpoirier@nvidia.com> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r--bridge/vni.c8
1 files changed, 4 insertions, 4 deletions
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]);