-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make TamEvent::SwitchEventType optional
Summary: TamEvent::SwitchEventType is currently a non-optional part of TamEvent::CreateAttribute. However it's not supported by [broadcom SDK](https://www.internalfb.com/code/fbsource/[3fe38940ae02]/fbcode/fboss/agent/hw/sai/api/bcm/TamApi.cpp?lines=17), and attempting to create a TamEvent causes the following error: ``` F1016 16:00:58.424264 603833 SaiAttribute.h:906] Check failed: id.has_value() unknown id *** Check failure stack trace: *** *** Aborted at 1729119658 (Unix time, try 'date -d 1729119658') *** *** Signal 6 (SIGABRT) (0x925a2) received by PID 599458 (pthread TID 0x7fdd1adb7640) (linux TID 603833) (maybe from PID 599458, UID 0) (code: -6), stack trace: *** @ 0000000027b40ebb (unknown) @ 00000000000442df (unknown) @ 0000000000099783 pthread_kill @ 000000000004422c raise @ 000000000002c432 abort @ 000000001a2fc3c9 google::LogMessage::Fail() @ 000000001a300604 google::LogMessage::SendToLog() @ 000000001a2fc042 google::LogMessage::Flush() @ 000000001a2fcd18 google::LogMessageFatal::~LogMessageFatal() @ 0000000029098a0b facebook::fboss::SaiExtensionAttribute<std::vector<int, std::allocator<int> >, facebook::fboss::SaiTamEventTraits::Attributes::AttributeSwitchEventType, void>::kExtensionAttributeId() @ 000000002e525b13 facebook::fboss::SaiTamManager::setupMirrorOnDrop(folly::IPAddress, facebook::fboss::PortID) ``` This commit makes the attribute optional so that the invalid access is avoided. There is no functional impact to either bcm or tajo code paths. Reviewed By: nivinl Differential Revision: D64337375 fbshipit-source-id: 423f673f7076d5ae19f985d82a78e1cee675f863
- Loading branch information
1 parent
7af70f7
commit 2774043
Showing
4 changed files
with
18 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters