diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-09-18 15:47:27 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-09-22 15:57:43 -0400 |
| commit | 5a3cf85391b3665b5344d577e98aaa29a1927818 (patch) | |
| tree | 3a741a61822632d23877cf37a9f25999dd482fe1 /lib | |
| parent | 4c56ce1cead5f6514ea2af34f0b7a07c35746520 (diff) | |
lib, zebra: Add ability to read kernel notice of TRAP/OFFLOAD
The linux kernel is getting RTM_F_TRAP and RTM_F_OFFLOAD for
kernel routes that have an underlying asic offload. Write the
code to receive these notifications from the linux kernel and
to store that data for display about the routes.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'lib')
| -rwxr-xr-x | lib/route_types.pl | 5 | ||||
| -rw-r--r-- | lib/zclient.h | 14 |
2 files changed, 18 insertions, 1 deletions
diff --git a/lib/route_types.pl b/lib/route_types.pl index e007de4d69..39af8d0d56 100755 --- a/lib/route_types.pl +++ b/lib/route_types.pl @@ -121,7 +121,10 @@ sub codelist { } $str =~ s/ $//; push @lines, $str . "\\n\" \\\n"; - push @lines, " \" > - selected route, * - FIB route, q - queued, r - rejected, b - backup\\n\\n\""; + push @lines, " \" > - selected route, * - FIB route, q - queued, r - rejected, b - backup\\n\""; + push @lines, " \" t - trapped, o - offload failure\\n\""; + + return join("", @lines); } diff --git a/lib/zclient.h b/lib/zclient.h index f99b3ad743..050877f27a 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -480,6 +480,20 @@ struct zapi_route { * route entry. This mainly is used for backup static routes. */ #define ZEBRA_FLAG_RR_USE_DISTANCE 0x40 +/* + * This flag tells everyone that the route was intentionally + * not offloaded and the route will be sent to the cpu for + * forwarding. This flag makes no sense unless you are in + * an asic offload situation + */ +#define ZEBRA_FLAG_TRAPPED 0x80 +/* + * This flag tells everyone that the route has been + * successfully offloaded to an asic for forwarding. + * This flag makes no sense unless you are in an asic + * offload situation. + */ +#define ZEBRA_FLAG_OFFLOADED 0x100 /* The older XXX_MESSAGE flags live here */ uint32_t message; |
