From 7af70f78803cba3270770cf43438a0d6b39a1497 Mon Sep 17 00:00:00 2001 From: Max Ng Date: Thu, 17 Oct 2024 10:07:02 -0700 Subject: [PATCH] Add SAI TAM Event extension attributes Summary: Add attributes required for Mirror on Drop on J3: - SAI_TAM_EVENT_ATTR_EXTENSIONS_COLLECTOR_LIST - SAI_TAM_EVENT_ATTR_PACKET_DROP_TYPE_MMU - SAI_TAM_EVENT_ATTR_AGING_GROUP Reviewed By: nivinl Differential Revision: D64201667 fbshipit-source-id: f73c57436f37656120f4c6d617a49b50383d4cfa --- fboss/agent/hw/sai/api/TamApi.h | 34 +++- fboss/agent/hw/sai/api/bcm/TamApi.cpp | 35 ++++ .../hw/sai/api/fake/FakeSaiExtensions.cpp | 20 ++ .../agent/hw/sai/api/fake/saifakeextensions.h | 4 + fboss/agent/hw/sai/api/oss/TamApi.cpp | 20 ++ fboss/agent/hw/sai/api/tajo/TamApi.cpp | 20 ++ fboss/agent/hw/sai/api/tests/TamApiTest.cpp | 17 ++ fboss/agent/hw/sai/fake/FakeSaiTam.cpp | 178 ++++++++++++++---- fboss/agent/hw/sai/fake/FakeSaiTam.h | 19 +- .../agent/hw/sai/store/tests/TamStoreTest.cpp | 17 ++ fboss/agent/hw/sai/tracer/TamApiTracer.cpp | 4 + 11 files changed, 325 insertions(+), 43 deletions(-) diff --git a/fboss/agent/hw/sai/api/TamApi.h b/fboss/agent/hw/sai/api/TamApi.h index e7960afacb219..a1292fd896718 100644 --- a/fboss/agent/hw/sai/api/TamApi.h +++ b/fboss/agent/hw/sai/api/TamApi.h @@ -153,18 +153,43 @@ struct SaiTamEventTraits { using SwitchEventType = SaiExtensionAttribute< std::vector, AttributeSwitchEventType>; - + struct AttributeDeviceId { + std::optional operator()(); + }; + using DeviceId = SaiExtensionAttribute; struct AttributeEventId { std::optional operator()(); }; using SwitchEventId = SaiExtensionAttribute; + struct AttributeExtensionsCollectorList { + std::optional operator()(); + }; + using ExtensionsCollectorList = SaiExtensionAttribute< + std::vector, + AttributeExtensionsCollectorList>; + struct AttributePacketDropTypeMmu { + std::optional operator()(); + }; + using PacketDropTypeMmu = SaiExtensionAttribute< + std::vector, + AttributePacketDropTypeMmu>; + struct AttributeAgingGroup { + std::optional operator()(); + }; + using AgingGroup = + SaiExtensionAttribute; }; using AdapterKey = TamEventSaiId; using AdapterHostKey = std::tuple< Attributes::Type, Attributes::ActionList, Attributes::CollectorList, - Attributes::SwitchEventType>; + Attributes::SwitchEventType, + std::optional, + std::optional, + std::optional, + std::optional, + std::optional>; using CreateAttributes = AdapterHostKey; }; @@ -172,6 +197,11 @@ SAI_ATTRIBUTE_NAME(TamEvent, Type) SAI_ATTRIBUTE_NAME(TamEvent, ActionList) SAI_ATTRIBUTE_NAME(TamEvent, CollectorList) SAI_ATTRIBUTE_NAME(TamEvent, SwitchEventType) +SAI_ATTRIBUTE_NAME(TamEvent, DeviceId) +SAI_ATTRIBUTE_NAME(TamEvent, SwitchEventId) +SAI_ATTRIBUTE_NAME(TamEvent, ExtensionsCollectorList) +SAI_ATTRIBUTE_NAME(TamEvent, PacketDropTypeMmu) +SAI_ATTRIBUTE_NAME(TamEvent, AgingGroup) struct SaiTamTraits { static constexpr sai_object_type_t ObjectType = SAI_OBJECT_TYPE_TAM; diff --git a/fboss/agent/hw/sai/api/bcm/TamApi.cpp b/fboss/agent/hw/sai/api/bcm/TamApi.cpp index d82f829415e67..a2addb6b82605 100644 --- a/fboss/agent/hw/sai/api/bcm/TamApi.cpp +++ b/fboss/agent/hw/sai/api/bcm/TamApi.cpp @@ -17,8 +17,43 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_DEVICE_ID; +#endif + return std::nullopt; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_EVENT_ID; +#endif + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_EXTENSIONS_COLLECTOR_LIST; +#endif + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_PACKET_DROP_TYPE_MMU; +#endif + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { +#if defined(SAI_VERSION_11_3_0_0_DNX_ODP) + return SAI_TAM_EVENT_ATTR_AGING_GROUP; +#endif return std::nullopt; } diff --git a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp index 26060b785f183..2d4d3fe895789 100644 --- a/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp +++ b/fboss/agent/hw/sai/api/fake/FakeSaiExtensions.cpp @@ -53,11 +53,31 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP; +} + std::optional SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { return SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS; diff --git a/fboss/agent/hw/sai/api/fake/saifakeextensions.h b/fboss/agent/hw/sai/api/fake/saifakeextensions.h index 6bd4906b34d09..877d7afc683e9 100644 --- a/fboss/agent/hw/sai/api/fake/saifakeextensions.h +++ b/fboss/agent/hw/sai/api/fake/saifakeextensions.h @@ -78,7 +78,11 @@ typedef enum _sai_switch_extensions_attr_t { typedef enum _sai_tam_event_extensions_attr_t { SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE = SAI_TAM_EVENT_ATTR_END, + SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID, SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID, + SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST, + SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU, + SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP, SAI_TAM_TRANSPORT_ATTR_FAKE_SRC_MAC_ADDRESS = SAI_TAM_TRANSPORT_ATTR_END, SAI_TAM_TRANSPORT_ATTR_FAKE_DST_MAC_ADDRESS, } sai_tam_event_extensions_attr_t; diff --git a/fboss/agent/hw/sai/api/oss/TamApi.cpp b/fboss/agent/hw/sai/api/oss/TamApi.cpp index b83968e6395b8..d3e406f73d2cc 100644 --- a/fboss/agent/hw/sai/api/oss/TamApi.cpp +++ b/fboss/agent/hw/sai/api/oss/TamApi.cpp @@ -9,11 +9,31 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return std::nullopt; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return std::nullopt; +} + std::optional SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { return std::nullopt; diff --git a/fboss/agent/hw/sai/api/tajo/TamApi.cpp b/fboss/agent/hw/sai/api/tajo/TamApi.cpp index 8955959fbe2ea..d72d802183b02 100644 --- a/fboss/agent/hw/sai/api/tajo/TamApi.cpp +++ b/fboss/agent/hw/sai/api/tajo/TamApi.cpp @@ -13,11 +13,31 @@ SaiTamEventTraits::Attributes::AttributeSwitchEventType::operator()() { return SAI_TAM_EVENT_ATTR_SWITCH_EVENT_TYPE; } +std::optional +SaiTamEventTraits::Attributes::AttributeDeviceId::operator()() { + return std::nullopt; +} + std::optional SaiTamEventTraits::Attributes::AttributeEventId::operator()() { return std::nullopt; } +std::optional +SaiTamEventTraits::Attributes::AttributeExtensionsCollectorList::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributePacketDropTypeMmu::operator()() { + return std::nullopt; +} + +std::optional +SaiTamEventTraits::Attributes::AttributeAgingGroup::operator()() { + return std::nullopt; +} + std::optional SaiTamTransportTraits::Attributes::AttributeSrcMacAddress::operator()() { return std::nullopt; diff --git a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp index affebfc7db44b..cc45aabc0f1a0 100644 --- a/fboss/agent/hw/sai/api/tests/TamApiTest.cpp +++ b/fboss/agent/hw/sai/api/tests/TamApiTest.cpp @@ -142,6 +142,12 @@ TEST_F(TamApiTest, TamEvent) { std::vector eventCollectors{SAI_NULL_OBJECT_ID}; std::vector eventTypes{1, 2, 3, 4}; // parity error e.g. + sai_int32_t deviceId = 0; + sai_int32_t eventId = 1; + std::vector extensionsCollectorList{10}; + std::vector packetDropTypeMmu = {3, 4}; + sai_object_id_t agingGroup = 20; + SaiTamEventTraits::CreateAttributes eventAttr; std::get(eventAttr) = SAI_TAM_EVENT_TYPE_PACKET_DROP; // type of Event @@ -150,6 +156,17 @@ TEST_F(TamApiTest, TamEvent) { eventCollectors; std::get(eventAttr) = eventTypes; + std::get>(eventAttr) = + deviceId; + std::get>( + eventAttr) = eventId; + std::get< + std::optional>( + eventAttr) = extensionsCollectorList; + std::get>( + eventAttr) = packetDropTypeMmu; + std::get>( + eventAttr) = agingGroup; auto eventSaiId = tamApi->create(eventAttr, switchId); EXPECT_EQ( diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp index 18471137cc06b..c23b3e72a9c31 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.cpp +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.cpp @@ -125,6 +125,12 @@ sai_status_t create_tam_event( std::vector collectors{}; std::vector switchEvents{}; + sai_int32_t deviceId{}; + sai_int32_t eventId{}; + std::vector extensionsCollectorList{}; + std::vector packetDropTypeMmu{}; + sai_object_id_t agingGroup{}; + for (auto i = 0; i < attr_count; i++) { switch (attr_list[i].id) { case SAI_TAM_EVENT_ATTR_TYPE: @@ -152,13 +158,47 @@ sai_status_t create_tam_event( std::back_inserter(switchEvents)); break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + deviceId = attr_list[i].value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + eventId = attr_list[i].value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + std::copy( + attr_list[i].value.objlist.list, + attr_list[i].value.objlist.list + attr_list[i].value.objlist.count, + std::back_inserter(extensionsCollectorList)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + std::copy( + attr_list[i].value.s32list.list, + attr_list[i].value.s32list.list + attr_list[i].value.s32list.count, + std::back_inserter(packetDropTypeMmu)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + agingGroup = attr_list[i].value.oid; + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; } } auto fs = FakeSai::getInstance(); - *id = - fs->tamEventManager.create(eventType, actions, collectors, switchEvents); + *id = fs->tamEventManager.create( + eventType, + actions, + collectors, + switchEvents, + deviceId, + eventId, + extensionsCollectorList, + packetDropTypeMmu, + agingGroup); return SAI_STATUS_SUCCESS; } @@ -211,6 +251,44 @@ sai_status_t get_tam_event_attribute( } break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + attr_list[i].value.s32 = eventAction.deviceId_; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + attr_list[i].value.s32 = eventAction.eventId_; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + if (attr_list[i].value.objlist.count < + eventAction.extensionsCollectorList_.size()) { + attr_list[i].value.objlist.count = + eventAction.extensionsCollectorList_.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + for (auto j = 0; j < attr_list[i].value.objlist.count; j++) { + attr_list[i].value.objlist.list[j] = + eventAction.extensionsCollectorList_[j]; + } + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + if (attr_list[i].value.s32list.count < + eventAction.packetDropTypeMmu_.size()) { + attr_list[i].value.s32list.count = + eventAction.packetDropTypeMmu_.size(); + return SAI_STATUS_BUFFER_OVERFLOW; + } + for (auto j = 0; j < attr_list[i].value.s32list.count; j++) { + attr_list[i].value.s32list.list[j] = + eventAction.packetDropTypeMmu_[j]; + } + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + attr_list[i].value.oid = eventAction.agingGroup_; + break; + default: return SAI_STATUS_ATTR_NOT_SUPPORTED_0 + i; } @@ -220,48 +298,70 @@ sai_status_t get_tam_event_attribute( sai_status_t set_tam_event_attribute( sai_object_id_t id, - const sai_attribute_t* attr_list) { - sai_int32_t eventType{}; - std::vector actions{}; - std::vector collectors{}; - std::vector switchEvents{}; + const sai_attribute_t* attr) { + try { + auto fs = FakeSai::getInstance(); + auto& tamEvent = fs->tamEventManager.get(id); + switch (attr->id) { + case SAI_TAM_EVENT_ATTR_TYPE: + tamEvent.eventType_ = attr->value.s32; + break; - switch (attr_list[0].id) { - case SAI_TAM_EVENT_ATTR_TYPE: - eventType = attr_list[0].value.s32; - break; + case SAI_TAM_EVENT_ATTR_ACTION_LIST: + tamEvent.actions_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.actions_)); + break; - case SAI_TAM_EVENT_ATTR_ACTION_LIST: - std::copy( - attr_list[0].value.objlist.list, - attr_list[0].value.objlist.list + attr_list[0].value.objlist.count, - std::back_inserter(actions)); - break; + case SAI_TAM_EVENT_ATTR_COLLECTOR_LIST: + tamEvent.collectors_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.collectors_)); + break; - case SAI_TAM_EVENT_ATTR_COLLECTOR_LIST: - std::copy( - attr_list[0].value.objlist.list, - attr_list[0].value.objlist.list + attr_list[0].value.objlist.count, - std::back_inserter(collectors)); - break; + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE: + tamEvent.switchEvents_.clear(); + std::copy( + attr->value.s32list.list, + attr->value.s32list.list + attr->value.s32list.count, + std::back_inserter(tamEvent.switchEvents_)); + break; - case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_TYPE: - std::copy( - attr_list[0].value.s32list.list, - attr_list[0].value.s32list.list + attr_list[0].value.s32list.count, - std::back_inserter(switchEvents)); - break; + case SAI_TAM_EVENT_ATTR_FAKE_DEVICE_ID: + tamEvent.deviceId_ = attr->value.s32; + break; - default: - return SAI_STATUS_ATTR_NOT_SUPPORTED_0; - } - try { - auto fs = FakeSai::getInstance(); - auto& tamEvent = fs->tamEventManager.get(id); - tamEvent.eventType_ = eventType; - tamEvent.actions_ = actions; - tamEvent.collectors_ = collectors; - tamEvent.switchEvents_ = switchEvents; + case SAI_TAM_EVENT_ATTR_FAKE_SWITCH_EVENT_ID: + tamEvent.eventId_ = attr->value.s32; + break; + + case SAI_TAM_EVENT_ATTR_FAKE_EXTENSIONS_COLLECTOR_LIST: + tamEvent.extensionsCollectorList_.clear(); + std::copy( + attr->value.objlist.list, + attr->value.objlist.list + attr->value.objlist.count, + std::back_inserter(tamEvent.extensionsCollectorList_)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_PACKET_DROP_TYPE_MMU: + tamEvent.packetDropTypeMmu_.clear(); + std::copy( + attr->value.s32list.list, + attr->value.s32list.list + attr->value.s32list.count, + std::back_inserter(tamEvent.packetDropTypeMmu_)); + break; + + case SAI_TAM_EVENT_ATTR_FAKE_AGING_GROUP: + tamEvent.agingGroup_ = attr->value.oid; + break; + + default: + return SAI_STATUS_ATTR_NOT_SUPPORTED_0; + } } catch (...) { return SAI_STATUS_ITEM_NOT_FOUND; } diff --git a/fboss/agent/hw/sai/fake/FakeSaiTam.h b/fboss/agent/hw/sai/fake/FakeSaiTam.h index b3a2d640e13f1..c480a096ce307 100644 --- a/fboss/agent/hw/sai/fake/FakeSaiTam.h +++ b/fboss/agent/hw/sai/fake/FakeSaiTam.h @@ -31,16 +31,31 @@ class FakeSaiTamEvent { sai_int32_t eventType, const std::vector& actions, const std::vector& collectors, - const std::vector& switchEvents) + const std::vector& switchEvents, + sai_int32_t deviceId, + sai_int32_t eventId, + std::vector extensionsCollectorList, + std::vector packetDropTypeMmu, + sai_object_id_t agingGroup) : eventType_(eventType), actions_(actions), collectors_(collectors), - switchEvents_(switchEvents) {} + switchEvents_(switchEvents), + deviceId_(deviceId), + eventId_(eventId), + extensionsCollectorList_(std::move(extensionsCollectorList)), + packetDropTypeMmu_(std::move(packetDropTypeMmu)), + agingGroup_(agingGroup) {} sai_object_id_t id; sai_int32_t eventType_; std::vector actions_; std::vector collectors_; std::vector switchEvents_; + sai_int32_t deviceId_; + sai_int32_t eventId_; + std::vector extensionsCollectorList_; + std::vector packetDropTypeMmu_; + sai_object_id_t agingGroup_; }; class FakeSaiTamEventAction { diff --git a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp index 7e3ef2dbed989..ef570028b3f83 100644 --- a/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp +++ b/fboss/agent/hw/sai/store/tests/TamStoreTest.cpp @@ -68,6 +68,12 @@ class TamStoreTest : public SaiStoreTest { std::vector collectors{SAI_NULL_OBJECT_ID}; std::vector eventTypes{1, 2, 3, 4}; + sai_int32_t deviceId = 0; + sai_int32_t eventId = 1; + std::vector extensionsCollectorList{10}; + std::vector packetDropTypeMmu = {3, 4}; + sai_object_id_t agingGroup = 20; + SaiTamEventTraits::CreateAttributes result; std::get(result) = SAI_TAM_EVENT_TYPE_PACKET_DROP; @@ -75,6 +81,17 @@ class TamStoreTest : public SaiStoreTest { std::get(result) = collectors; std::get(result) = eventTypes; + std::get>(result) = + deviceId; + std::get>( + result) = eventId; + std::get< + std::optional>( + result) = extensionsCollectorList; + std::get>( + result) = packetDropTypeMmu; + std::get>(result) = + agingGroup; return result; } diff --git a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp index 320d3582912a3..5ac31ca4158e1 100644 --- a/fboss/agent/hw/sai/tracer/TamApiTracer.cpp +++ b/fboss/agent/hw/sai/tracer/TamApiTracer.cpp @@ -54,7 +54,11 @@ std::map> _TamCollectorMap{ void handleExtensionAttributes() { SAI_EXT_ATTR_MAP(TamEvent, SwitchEventType) + SAI_EXT_ATTR_MAP(TamEvent, DeviceId) SAI_EXT_ATTR_MAP(TamEvent, SwitchEventId) + SAI_EXT_ATTR_MAP(TamEvent, ExtensionsCollectorList) + SAI_EXT_ATTR_MAP(TamEvent, PacketDropTypeMmu) + SAI_EXT_ATTR_MAP(TamEvent, AgingGroup) SAI_EXT_ATTR_MAP(TamTransport, SrcMacAddress) SAI_EXT_ATTR_MAP(TamTransport, DstMacAddress) }