[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200116184348.1984324-1-idosch@idosch.org>
Date: Thu, 16 Jan 2020 20:43:48 +0200
From: Ido Schimmel <idosch@...sch.org>
To: netdev@...r.kernel.org
Cc: dsahern@...il.com, mlxsw@...lanox.com,
Ido Schimmel <idosch@...lanox.com>
Subject: [PATCH iproute2-next] ip route: Print "rt_offload" and "rt_trap" indication
From: Ido Schimmel <idosch@...lanox.com>
The kernel now signals the offload state of a route using the
'RTM_F_OFFLOAD' and 'RTM_F_TRAP' flags. Print these to help users
understand the offload state of each route. The "rt_" prefix is used in
order to distinguish it from the offload state of nexthops.
Signed-off-by: Ido Schimmel <idosch@...lanox.com>
---
ip/iproute.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ip/iproute.c b/ip/iproute.c
index 32bb52df250c..93b805c9004d 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -368,6 +368,10 @@ void print_rt_flags(FILE *fp, unsigned int flags)
print_string(PRINT_ANY, NULL, "%s ", "linkdown");
if (flags & RTNH_F_UNRESOLVED)
print_string(PRINT_ANY, NULL, "%s ", "unresolved");
+ if (flags & RTM_F_OFFLOAD)
+ print_string(PRINT_ANY, NULL, "%s ", "rt_offload");
+ if (flags & RTM_F_TRAP)
+ print_string(PRINT_ANY, NULL, "%s ", "rt_trap");
close_json_array(PRINT_JSON, NULL);
}
--
2.24.1
Powered by blists - more mailing lists