]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip route: Print "rt_offload_failed" indication
authorAmit Cohen <amcohen@nvidia.com>
Tue, 9 Feb 2021 09:12:00 +0000 (11:12 +0200)
committerDavid Ahern <dsahern@kernel.org>
Sun, 14 Feb 2021 00:50:15 +0000 (17:50 -0700)
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@nvidia.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
ip/iproute.c

index ebb5f160fc4437b9e0f15af3a307425b0f701483..a8c4886bada6168512124f532f0bed18005ca823 100644 (file)
@@ -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);
 }