diff --git a/sai_p4/fixed/ids.h b/sai_p4/fixed/ids.h index c8825c41..80c6b392 100644 --- a/sai_p4/fixed/ids.h +++ b/sai_p4/fixed/ids.h @@ -55,7 +55,7 @@ #define ROUTING_SET_MULTICAST_SRC_MAC_ACTION_ID 0x01000019 // 16777241 #define MIRRORING_MIRROR_AS_IPV4_ERSPAN_ACTION_ID 0x01000007 // 16777223 #define CLONING_INGRESS_CLONE_ACTION_ID 0x0100001C // 16777244 -#define CLONING_MIRROR_WITH_PSAMP_ENCAPSULATION_ACTION_ID \ +#define CLONING_MIRROR_WITH_IPFIX_ENCAPSULATION_ACTION_ID \ 0x0100001D // 16777245 #define L3_ADMIT_ACTION_ID 0x01000008 // 16777224 #define MIRRORING_SET_PRE_SESSION_ACTION_ID 0x01000009 // 16777225 diff --git a/sai_p4/fixed/mirroring.p4 b/sai_p4/fixed/mirroring.p4 index beb57057..af564128 100644 --- a/sai_p4/fixed/mirroring.p4 +++ b/sai_p4/fixed/mirroring.p4 @@ -39,16 +39,16 @@ control mirror_session_lookup(inout headers_t headers, } // Sets - // * SAI_MIRROR_SESSION_ATTR_TYPE to SAI_MIRROR_SESSION_TYPE_PSAMP - // * SAI_MIRROR_SESSION_ATTR_PSAMP_ENCAPSULATION_TYPE to - // SAI_PSAMP_ENCAPSULATION_TYPE_EXTENDED + // * SAI_MIRROR_SESSION_ATTR_TYPE to SAI_MIRROR_SESSION_TYPE_IPFIX + // * SAI_MIRROR_SESSION_ATTR_IPFIX_ENCAPSULATION_TYPE to + // SAI_IPFIX_ENCAPSULATION_TYPE_EXTENDED // * SAI_MIRROR_SESSION_ATTR_MONITOR_PORT to `monitor_port` - @id(CLONING_MIRROR_WITH_PSAMP_ENCAPSULATION_ACTION_ID) - // TODO: Add params needed for PSAMP mirroring. + @id(CLONING_MIRROR_WITH_IPFIX_ENCAPSULATION_ACTION_ID) + // TODO: Add params needed for IPFIX mirroring. // TODO: Remove unsupported annotation once the switch stack // supports this table. @unsupported - action mirror_with_psamp_encapsulation(@id(1) port_id_t monitor_port) { + action mirror_with_ipfix_encapsulation(@id(1) port_id_t monitor_port) { local_metadata.mirror_egress_port = monitor_port; } @@ -63,7 +63,7 @@ control mirror_session_lookup(inout headers_t headers, } actions = { @proto_id(1) mirror_as_ipv4_erspan; - @proto_id(2) mirror_with_psamp_encapsulation; + @proto_id(2) mirror_with_ipfix_encapsulation; @defaultonly NoAction; } diff --git a/sai_p4/instantiations/google/fabric_border_router.p4info.pb.txt b/sai_p4/instantiations/google/fabric_border_router.p4info.pb.txt index a371bcc9..6f2eb7d2 100644 --- a/sai_p4/instantiations/google/fabric_border_router.p4info.pb.txt +++ b/sai_p4/instantiations/google/fabric_border_router.p4info.pb.txt @@ -1422,8 +1422,8 @@ actions { actions { preamble { id: 16777245 - name: "ingress.mirror_session_lookup.mirror_with_psamp_encapsulation" - alias: "mirror_with_psamp_encapsulation" + name: "ingress.mirror_session_lookup.mirror_with_ipfix_encapsulation" + alias: "mirror_with_ipfix_encapsulation" annotations: "@unsupported" } params { diff --git a/sai_p4/instantiations/google/middleblock.p4info.pb.txt b/sai_p4/instantiations/google/middleblock.p4info.pb.txt index 26b9a239..1ffc0403 100755 --- a/sai_p4/instantiations/google/middleblock.p4info.pb.txt +++ b/sai_p4/instantiations/google/middleblock.p4info.pb.txt @@ -1467,8 +1467,8 @@ actions { actions { preamble { id: 16777245 - name: "ingress.mirror_session_lookup.mirror_with_psamp_encapsulation" - alias: "mirror_with_psamp_encapsulation" + name: "ingress.mirror_session_lookup.mirror_with_ipfix_encapsulation" + alias: "mirror_with_ipfix_encapsulation" annotations: "@unsupported" } params { diff --git a/sai_p4/instantiations/google/minimum_guaranteed_sizes.p4 b/sai_p4/instantiations/google/minimum_guaranteed_sizes.p4 index eba3881e..c9a61cff 100644 --- a/sai_p4/instantiations/google/minimum_guaranteed_sizes.p4 +++ b/sai_p4/instantiations/google/minimum_guaranteed_sizes.p4 @@ -54,6 +54,8 @@ #define ROUTING_IPV4_MULTICAST_TABLE_MINIMUM_GUARANTEED_SIZE 1600 #define ROUTING_IPV6_MULTICAST_TABLE_MINIMUM_GUARANTEED_SIZE 1600 +#define ROUTING_MULTICAST_ROUTER_INTERFACE_TABLE_MINIMUM_GUARANTEED_SIZE 128 + // The maximum number of wcmp groups. #define WCMP_GROUP_TABLE_MINIMUM_GUARANTEED_SIZE 3968 #define WCMP_GROUP_TABLE_MINIMUM_GUARANTEED_SIZE_TOR 960 @@ -85,15 +87,15 @@ #define ACL_DEFAULT_PRE_INGRESS_TABLE_MINIMUM_GUARANTEED_SIZE 254 - #define ACL_TOR_PRE_INGRESS_TABLE_MINIMUM_GUARANTEED_SIZE 127 +#define ACL_INGRESS_QOS_TABLE_MINIMUM_GUARANTEED_SIZE 511 #define ACL_INGRESS_QOS_TABLE_MINIMUM_GUARANTEED_SIZE 511 #define ACL_INGRESS_COUNTING_TABLE_MINIMUM_GUARANTEED_SIZE 255 -#ifdef SAI_INSTANTIATION_EXPERIMENTAL_TOR +#ifdef SAI_INSTANTIATION_TOR #define ACL_INGRESS_MIRROR_AND_REDIRECT_TABLE_MINIMUM_GUARANTEED_SIZE 511 #else #define ACL_INGRESS_MIRROR_AND_REDIRECT_TABLE_MINIMUM_GUARANTEED_SIZE 255 diff --git a/sai_p4/instantiations/google/sai_pd.proto b/sai_p4/instantiations/google/sai_pd.proto index e1265b39..9a264df1 100755 --- a/sai_p4/instantiations/google/sai_pd.proto +++ b/sai_p4/instantiations/google/sai_pd.proto @@ -161,7 +161,7 @@ message MirrorSessionTableEntry { oneof action { MirrorAsIpv4ErspanAction mirror_as_ipv4_erspan = 1; // CAUTION: This action is not (yet) supported. - MirrorWithPsampEncapsulationAction mirror_with_psamp_encapsulation = 2; + MirrorWithIpfixEncapsulationAction mirror_with_ipfix_encapsulation = 2; } } Action action = 2; @@ -892,7 +892,7 @@ message SetPortAndSrcMacAndVlanIdAction { } // CAUTION: This action is not (yet) supported. -message MirrorWithPsampEncapsulationAction { +message MirrorWithIpfixEncapsulationAction { string monitor_port = 1; // Format::STRING } diff --git a/sai_p4/instantiations/google/test_tools/test_entries.cc b/sai_p4/instantiations/google/test_tools/test_entries.cc index 5a7b15b9..3e17ccca 100644 --- a/sai_p4/instantiations/google/test_tools/test_entries.cc +++ b/sai_p4/instantiations/google/test_tools/test_entries.cc @@ -567,11 +567,11 @@ EntryBuilder& EntryBuilder::AddMirrorSessionTableEntry( *pd_entry.mutable_mirror_session_table_entry(); mirror_session_entry.mutable_match()->set_mirror_session_id( params.mirror_session_id); - sai::MirrorWithPsampEncapsulationAction& action = + sai::MirrorWithIpfixEncapsulationAction& action = *mirror_session_entry.mutable_action() - ->mutable_mirror_with_psamp_encapsulation(); + ->mutable_mirror_with_ipfix_encapsulation(); action.set_monitor_port(params.mirror_egress_port); - // TODO: Fill in PSAMP params in table entry's action. + // TODO: Fill in IPFIX params in table entry's action. *entries_.add_entries() = std::move(pd_entry); return *this; diff --git a/sai_p4/instantiations/google/test_tools/test_entries.h b/sai_p4/instantiations/google/test_tools/test_entries.h index 52595b63..f453729b 100644 --- a/sai_p4/instantiations/google/test_tools/test_entries.h +++ b/sai_p4/instantiations/google/test_tools/test_entries.h @@ -82,7 +82,7 @@ void AbslStringify(Sink& sink, const IpVersion& ip_version) { } } -// Parameters for generating a mirror session table entry with PSAMP +// Parameters for generating a mirror session table entry with IPFIX // encapsulation. // TODO: Adds data members with parameters needed for mirror // encap. diff --git a/sai_p4/instantiations/google/tests/sai_p4_bmv2_vlan_test.cc b/sai_p4/instantiations/google/tests/sai_p4_bmv2_vlan_test.cc index ca4170e0..f4d760fd 100644 --- a/sai_p4/instantiations/google/tests/sai_p4_bmv2_vlan_test.cc +++ b/sai_p4/instantiations/google/tests/sai_p4_bmv2_vlan_test.cc @@ -563,7 +563,7 @@ sai::TableEntries EntriesForwardingAndRewritingVlanInRifTable( TEST(VlanTest, SettingNonReservedVidInRifWithoutVlanChecksResultsInPacketWithThatId) { - const sai::Instantiation kInstantiation = sai::Instantiation::kExperimentalTor; + const sai::Instantiation kInstantiation = sai::Instantiation::kTor; const pdpi::IrP4Info kIrP4Info = sai::GetIrP4Info(kInstantiation); ASSERT_OK_AND_ASSIGN(Bmv2 bmv2, sai::SetUpBmv2ForSaiP4(kInstantiation)); @@ -624,7 +624,7 @@ TEST(VlanTest, } TEST(VlanTest, SettingNonReservedVidInRifWithVlanChecksResultsInDrop) { - const sai::Instantiation kInstantiation = sai::Instantiation::kExperimentalTor; + const sai::Instantiation kInstantiation = sai::Instantiation::kTor; const pdpi::IrP4Info kIrP4Info = sai::GetIrP4Info(kInstantiation); ASSERT_OK_AND_ASSIGN(Bmv2 bmv2, sai::SetUpBmv2ForSaiP4(kInstantiation)); diff --git a/sai_p4/instantiations/google/tor.p4info.pb.txt b/sai_p4/instantiations/google/tor.p4info.pb.txt index 4aa316ef..c517243f 100644 --- a/sai_p4/instantiations/google/tor.p4info.pb.txt +++ b/sai_p4/instantiations/google/tor.p4info.pb.txt @@ -895,7 +895,7 @@ tables { scope: DEFAULT_ONLY } const_default_action_id: 21257015 - size: 255 + size: 511 } tables { preamble { @@ -1884,8 +1884,8 @@ actions { actions { preamble { id: 16777245 - name: "ingress.mirror_session_lookup.mirror_with_psamp_encapsulation" - alias: "mirror_with_psamp_encapsulation" + name: "ingress.mirror_session_lookup.mirror_with_ipfix_encapsulation" + alias: "mirror_with_ipfix_encapsulation" annotations: "@unsupported" } params { diff --git a/sai_p4/instantiations/google/unioned_p4info.pb.txt b/sai_p4/instantiations/google/unioned_p4info.pb.txt index d8c81f91..11fe4078 100644 --- a/sai_p4/instantiations/google/unioned_p4info.pb.txt +++ b/sai_p4/instantiations/google/unioned_p4info.pb.txt @@ -1097,7 +1097,7 @@ tables { scope: DEFAULT_ONLY } const_default_action_id: 21257015 - size: 255 + size: 511 } tables { preamble { @@ -2035,8 +2035,8 @@ actions { actions { preamble { id: 16777245 - name: "ingress.mirror_session_lookup.mirror_with_psamp_encapsulation" - alias: "mirror_with_psamp_encapsulation" + name: "ingress.mirror_session_lookup.mirror_with_ipfix_encapsulation" + alias: "mirror_with_ipfix_encapsulation" annotations: "@unsupported" } params {