netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2-next] ip route: Print "rt_offload" and "rt_trap" indication
@ 2020-01-16 18:43 Ido Schimmel
  2020-01-18 21:49 ` David Ahern
  0 siblings, 1 reply; 2+ messages in thread
From: Ido Schimmel @ 2020-01-16 18:43 UTC (permalink / raw)
  To: netdev; +Cc: dsahern, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@mellanox.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@mellanox.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


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

* Re: [PATCH iproute2-next] ip route: Print "rt_offload" and "rt_trap" indication
  2020-01-16 18:43 [PATCH iproute2-next] ip route: Print "rt_offload" and "rt_trap" indication Ido Schimmel
@ 2020-01-18 21:49 ` David Ahern
  0 siblings, 0 replies; 2+ messages in thread
From: David Ahern @ 2020-01-18 21:49 UTC (permalink / raw)
  To: Ido Schimmel, netdev; +Cc: dsahern, mlxsw, Ido Schimmel

On 1/16/20 11:43 AM, Ido Schimmel wrote:
> From: Ido Schimmel <idosch@mellanox.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@mellanox.com>
> ---
>  ip/iproute.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 

applied to iproute2-next. Thanks


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

end of thread, other threads:[~2020-01-18 21:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-16 18:43 [PATCH iproute2-next] ip route: Print "rt_offload" and "rt_trap" indication Ido Schimmel
2020-01-18 21:49 ` David Ahern

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).