[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210209091200.1928658-1-amcohen@nvidia.com>
Date: Tue, 9 Feb 2021 11:12:00 +0200
From: Amit Cohen <amcohen@...dia.com>
To: <netdev@...r.kernel.org>
CC: <idosch@...dia.com>, <dsahern@...il.com>,
Amit Cohen <amcohen@...dia.com>
Subject: [PATCH iproute2-next] ip route: Print "rt_offload_failed" indication
The kernel signals when offload fails using the 'RTM_F_OFFLOAD_FAILED'
flag. Print it to help users understand the offload state of the route.
The "rt_" prefix is used in order to distinguish it from the offload state
of nexthops, similar to "rt_offload" and "rt_trap".
Signed-off-by: Amit Cohen <amcohen@...dia.com>
Reviewed-by: Ido Schimmel <idosch@...dia.com>
---
ip/iproute.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/ip/iproute.c b/ip/iproute.c
index ebb5f160..a8c4886b 100644
--- a/ip/iproute.c
+++ b/ip/iproute.c
@@ -374,6 +374,8 @@ void print_rt_flags(FILE *fp, unsigned int flags)
print_string(PRINT_ANY, NULL, "%s ", "rt_offload");
if (flags & RTM_F_TRAP)
print_string(PRINT_ANY, NULL, "%s ", "rt_trap");
+ if (flags & RTM_F_OFFLOAD_FAILED)
+ print_string(PRINT_ANY, NULL, "%s ", "rt_offload_failed");
close_json_array(PRINT_JSON, NULL);
}
--
2.26.2
Powered by blists - more mailing lists