From 2418bcc4b54457353994f2cc9376c6edba5fe857 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Wed, 28 Aug 2024 14:28:01 -0700 Subject: [PATCH] add new FBOSS feature NO_RX_REASON_TRAP Summary: This new feature is used for replacing rx reason trap by ACL and only enabled on J3 right now. Reviewed By: shri-khare Differential Revision: D61854930 Privacy Context Container: L1125642 fbshipit-source-id: f2f306ecd69d662a1ca804ee8235510712bc53ea --- fboss/agent/hw/switch_asics/EbroAsic.cpp | 1 + fboss/agent/hw/switch_asics/GaronneAsic.cpp | 1 + fboss/agent/hw/switch_asics/HwAsic.h | 3 +++ fboss/agent/hw/switch_asics/Jericho2Asic.cpp | 1 + fboss/agent/hw/switch_asics/Jericho3Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp | 1 + fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp | 1 + fboss/agent/hw/switch_asics/TomahawkAsic.cpp | 1 + fboss/agent/hw/switch_asics/Trident2Asic.cpp | 1 + fboss/agent/hw/switch_asics/YubaAsic.cpp | 1 + 11 files changed, 13 insertions(+) diff --git a/fboss/agent/hw/switch_asics/EbroAsic.cpp b/fboss/agent/hw/switch_asics/EbroAsic.cpp index 8168c91fb931a..d3073a5cbd5f0 100644 --- a/fboss/agent/hw/switch_asics/EbroAsic.cpp +++ b/fboss/agent/hw/switch_asics/EbroAsic.cpp @@ -182,6 +182,7 @@ bool EbroAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; case HwAsic::Feature::SAI_ACL_ENTRY_SRC_PORT_QUALIFIER: /* diff --git a/fboss/agent/hw/switch_asics/GaronneAsic.cpp b/fboss/agent/hw/switch_asics/GaronneAsic.cpp index e452c4d1c269b..2df1b0c2dec47 100644 --- a/fboss/agent/hw/switch_asics/GaronneAsic.cpp +++ b/fboss/agent/hw/switch_asics/GaronneAsic.cpp @@ -185,6 +185,7 @@ bool GaronneAsic::isSupported(Feature feature) const { case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/HwAsic.h b/fboss/agent/hw/switch_asics/HwAsic.h index 42114438d45df..3cb28481f4905 100644 --- a/fboss/agent/hw/switch_asics/HwAsic.h +++ b/fboss/agent/hw/switch_asics/HwAsic.h @@ -189,6 +189,9 @@ class HwAsic { EGRESS_CORE_BUFFER_WATERMARK, DELETED_CREDITS_STAT, INGRESS_PRIORITY_GROUP_DROPPED_PACKETS, + // replace all ACL based trap reasons by + // explicty ACL config programmed by FBOSS + NO_RX_REASON_TRAP, }; enum class AsicMode { diff --git a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp index 43b0de794af9c..25e180db7bd93 100644 --- a/fboss/agent/hw/switch_asics/Jericho2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho2Asic.cpp @@ -181,6 +181,7 @@ bool Jericho2Asic::isSupported(Feature feature) const { case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp index f84ec7b8b276d..aef775ac9a70c 100644 --- a/fboss/agent/hw/switch_asics/Jericho3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Jericho3Asic.cpp @@ -86,6 +86,7 @@ bool Jericho3Asic::isSupported(Feature feature) const { case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: case HwAsic::Feature::ROUTE_METADATA: + case HwAsic::Feature::NO_RX_REASON_TRAP: return true; // Features not expected to work on SIM case HwAsic::Feature::SHARED_INGRESS_EGRESS_BUFFER_POOL: diff --git a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp index a9225a330c6a3..67b0c66c6816c 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk3Asic.cpp @@ -175,6 +175,7 @@ bool Tomahawk3Asic::isSupported(Feature feature) const { case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp index a04e1629beeef..7db9ecc593139 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk4Asic.cpp @@ -194,6 +194,7 @@ bool Tomahawk4Asic::isSupported(Feature feature) const { case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp index 1970167664166..c73e1cd0ae42b 100644 --- a/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp +++ b/fboss/agent/hw/switch_asics/Tomahawk5Asic.cpp @@ -177,6 +177,7 @@ bool Tomahawk5Asic::isSupported(Feature feature) const { case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::RX_SNR: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp index aa3a6b39bdea6..7e94606f5b7e1 100644 --- a/fboss/agent/hw/switch_asics/TomahawkAsic.cpp +++ b/fboss/agent/hw/switch_asics/TomahawkAsic.cpp @@ -175,6 +175,7 @@ bool TomahawkAsic::isSupported(Feature feature) const { case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/Trident2Asic.cpp b/fboss/agent/hw/switch_asics/Trident2Asic.cpp index 1fa556e35b3b7..7a649fa9425cc 100644 --- a/fboss/agent/hw/switch_asics/Trident2Asic.cpp +++ b/fboss/agent/hw/switch_asics/Trident2Asic.cpp @@ -175,6 +175,7 @@ bool Trident2Asic::isSupported(Feature feature) const { case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; } return false; diff --git a/fboss/agent/hw/switch_asics/YubaAsic.cpp b/fboss/agent/hw/switch_asics/YubaAsic.cpp index 185a8f195e3cc..eeb267e0f0499 100644 --- a/fboss/agent/hw/switch_asics/YubaAsic.cpp +++ b/fboss/agent/hw/switch_asics/YubaAsic.cpp @@ -181,6 +181,7 @@ bool YubaAsic::isSupportedNonFabric(Feature feature) const { case HwAsic::Feature::EGRESS_CORE_BUFFER_WATERMARK: case HwAsic::Feature::DELETED_CREDITS_STAT: case HwAsic::Feature::INGRESS_PRIORITY_GROUP_DROPPED_PACKETS: + case HwAsic::Feature::NO_RX_REASON_TRAP: return false; } return false;