diff options
| author | Donald Sharp <sharpd@nvidia.com> | 2020-09-28 15:22:52 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@nvidia.com> | 2020-11-15 10:19:25 -0500 |
| commit | e4876266e4178479140e55997751bd4b1ef0bda1 (patch) | |
| tree | 401c65c09fb22656e29954ebec722811406382aa /zebra/zebra_router.c | |
| parent | 0d32fbee6dd4f6f09f3a508b7df2585a8a710718 (diff) | |
zebra: Add `--asic-offload` command
Add a command that allows FRR to know it's being used with
an underlying asic offload, from the linux kernel perspective.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Diffstat (limited to 'zebra/zebra_router.c')
| -rw-r--r-- | zebra/zebra_router.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/zebra/zebra_router.c b/zebra/zebra_router.c index fc4390f7f8..249ec38a69 100644 --- a/zebra/zebra_router.c +++ b/zebra/zebra_router.c @@ -257,7 +257,12 @@ void zebra_router_terminate(void) hash_free(zrouter.iptable_hash); } -void zebra_router_init(void) +bool zebra_router_notify_on_ack(void) +{ + return !zrouter.asic_offloaded || zrouter.notify_on_ack; +} + +void zebra_router_init(bool asic_offload, bool notify_on_ack) { zrouter.sequence_num = 0; @@ -291,5 +296,6 @@ void zebra_router_init(void) hash_create_size(8, zebra_nhg_id_key, zebra_nhg_hash_id_equal, "Zebra Router Nexthop Groups ID index"); - zrouter.asic_offloaded = false; + zrouter.asic_offloaded = asic_offload; + zrouter.notify_on_ack = notify_on_ack; } |
