Skip to contentSkip to conversation

ip route: Print "rt_offload_failed" indication

PATCH Applied Amit Cohen 2 participants 2 messages Feb 9, 2021 – Feb 14, 2021

Subsystems (2)
lore
Share & tools
lore

Amit Cohen

author
#0 lore raw

PATCH 1/1 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".

---
 ip/iproute.c | 2 ++
 1 file changed, 2 insertions(+)
ip/iproute.c +2 -0
index ebb5f160..a8c4886b 100644
@@ -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);
 }
Signature · 1 line
2.26.2
Applied
#1 lore raw
Quoted 11 lines · Amit Cohen

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

---
 ip/iproute.c | 2 ++
 1 file changed, 2 insertions(+)

applied to iproute2-next