From ffdc841841fd9ed727aca54fe914b71098b4f5e8 Mon Sep 17 00:00:00 2001 From: Ron He Date: Mon, 19 Aug 2024 01:30:55 -0700 Subject: [PATCH] Default value for Port attr Reachability Group Summary: As titled. If SDK does not support reaching reachability group (J3), return default 0 value. Reviewed By: shri-khare, srikrishnagopu Differential Revision: D61458742 fbshipit-source-id: 9f5bcb7f8305f4b9b92326730893765f1f0cb8cd --- fboss/agent/hw/sai/api/PortApi.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fboss/agent/hw/sai/api/PortApi.h b/fboss/agent/hw/sai/api/PortApi.h index 4e66e7de6a896..38ef69766056c 100644 --- a/fboss/agent/hw/sai/api/PortApi.h +++ b/fboss/agent/hw/sai/api/PortApi.h @@ -415,8 +415,10 @@ struct SaiPortTraits { struct AttributeReachabilityGroup { std::optional operator()(); }; - using ReachabilityGroup = - SaiExtensionAttribute; + using ReachabilityGroup = SaiExtensionAttribute< + sai_uint32_t, + AttributeReachabilityGroup, + SaiIntDefault>; }; using AdapterKey = PortSaiId;