From e4876266e4178479140e55997751bd4b1ef0bda1 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Mon, 28 Sep 2020 15:22:52 -0400 Subject: 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 --- zebra/zebra_router.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'zebra/zebra_router.c') 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; } -- cgit v1.2.3