Skip to content

Commit

Permalink
Deprecate old aging interval field and update patcher
Browse files Browse the repository at this point in the history
Summary: Deprecate agingIntervalUsecs, update patcher to handle the new field.

Reviewed By: nivinl

Differential Revision: D68428854

fbshipit-source-id: 851a3f89a6ca3409bbb9641acaa49acba69100ea
  • Loading branch information
maxwindiff authored and facebook-github-bot committed Jan 22, 2025
1 parent ffe50d8 commit bfdddcd
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion fboss/agent/switch_config.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ struct MirrorOnDropReport {
// Contents of the dropped packet will be truncated when mirroring.
7: i16 truncateSize = 128;
8: byte dscp = 0;
9: optional i32 agingIntervalUsecs;
9: optional i32 agingIntervalUsecs_DEPRECATED (deprecated);
10: map<
byte,
list<MirrorOnDropReasonAggregation>
Expand Down
2 changes: 1 addition & 1 deletion fboss/agent/switch_state.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ struct MirrorOnDropReportFields {
7: i16 mtu;
8: i16 truncateSize;
9: byte dscp;
10: optional i32 agingIntervalUsecs;
10: optional i32 agingIntervalUsecs_DEPRECATED;
11: string switchMac; // Populated at runtime
12: string firstInterfaceMac; // Populated at runtime
13: map<
Expand Down
16 changes: 8 additions & 8 deletions fboss/fsdb/if/oss/fsdb_model_thriftpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -4823,7 +4823,7 @@ std::pair<strings::collectorPort, Child<::std::int16_t, ::apache::thrift::type_c
std::pair<strings::mtu, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>,
std::pair<strings::truncateSize, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>,
std::pair<strings::dscp, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>,
std::pair<strings::agingIntervalUsecs, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>,
std::pair<strings::agingIntervalUsecs_DEPRECATED, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>,
std::pair<strings::switchMac, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>,
std::pair<strings::firstInterfaceMac, Child<::std::string, ::apache::thrift::type_class::string, ::apache::thrift::type::string_t>>,
std::pair<strings::eventIdToDropReasons_DEPRECATED, ChildThriftPath<::std::map<::std::int8_t, ::std::vector<::facebook::fboss::cfg::MirrorOnDropReasonAggregation>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>,
Expand Down Expand Up @@ -4854,7 +4854,7 @@ std::pair<strings::collectorPort, std::integral_constant<apache::thrift::field_i
std::pair<strings::mtu, std::integral_constant<apache::thrift::field_id_t, 7>>,
std::pair<strings::truncateSize, std::integral_constant<apache::thrift::field_id_t, 8>>,
std::pair<strings::dscp, std::integral_constant<apache::thrift::field_id_t, 9>>,
std::pair<strings::agingIntervalUsecs, std::integral_constant<apache::thrift::field_id_t, 10>>,
std::pair<strings::agingIntervalUsecs_DEPRECATED, std::integral_constant<apache::thrift::field_id_t, 10>>,
std::pair<strings::switchMac, std::integral_constant<apache::thrift::field_id_t, 11>>,
std::pair<strings::firstInterfaceMac, std::integral_constant<apache::thrift::field_id_t, 12>>,
std::pair<strings::eventIdToDropReasons_DEPRECATED, std::integral_constant<apache::thrift::field_id_t, 13>>,
Expand All @@ -4874,7 +4874,7 @@ std::pair<strings::agingGroupAgingIntervalUsecs, std::integral_constant<apache::
STRUCT_CHILD_GETTERS(mtu, 7);
STRUCT_CHILD_GETTERS(truncateSize, 8);
STRUCT_CHILD_GETTERS(dscp, 9);
STRUCT_CHILD_GETTERS(agingIntervalUsecs, 10);
STRUCT_CHILD_GETTERS(agingIntervalUsecs_DEPRECATED, 10);
STRUCT_CHILD_GETTERS(switchMac, 11);
STRUCT_CHILD_GETTERS(firstInterfaceMac, 12);
STRUCT_CHILD_GETTERS(eventIdToDropReasons_DEPRECATED, 13);
Expand All @@ -4892,7 +4892,7 @@ std::pair<strings::agingGroupAgingIntervalUsecs, std::integral_constant<apache::
else if constexpr (__id == 7) { return mtu(); }
else if constexpr (__id == 8) { return truncateSize(); }
else if constexpr (__id == 9) { return dscp(); }
else if constexpr (__id == 10) { return agingIntervalUsecs(); }
else if constexpr (__id == 10) { return agingIntervalUsecs_DEPRECATED(); }
else if constexpr (__id == 11) { return switchMac(); }
else if constexpr (__id == 12) { return firstInterfaceMac(); }
else if constexpr (__id == 13) { return eventIdToDropReasons_DEPRECATED(); }
Expand Down Expand Up @@ -9341,7 +9341,7 @@ std::pair<strings::collectorPort, Child<::std::int16_t, ::apache::thrift::type_c
std::pair<strings::mtu, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>,
std::pair<strings::truncateSize, Child<::std::int16_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i16_t>>,
std::pair<strings::dscp, Child<::std::int8_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::byte_t>>,
std::pair<strings::agingIntervalUsecs, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>,
std::pair<strings::agingIntervalUsecs_DEPRECATED, Child<::std::int32_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i32_t>>,
std::pair<strings::eventIdToDropReasons_DEPRECATED, ChildThriftPath<::std::map<::std::int8_t, ::std::vector<::facebook::fboss::cfg::MirrorOnDropReasonAggregation>>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>,
std::pair<strings::modEventToConfigMap, ChildThriftPath<::std::map<::std::int8_t, ::facebook::fboss::cfg::MirrorOnDropEventConfig>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>,
std::pair<strings::agingGroupAgingIntervalUsecs, ChildThriftPath<::std::map<::facebook::fboss::cfg::MirrorOnDropAgingGroup, ::std::int32_t>, ::facebook::fboss::fsdb::FsdbOperStateRoot, Self>>>;
Expand All @@ -9366,7 +9366,7 @@ std::pair<strings::collectorPort, std::integral_constant<apache::thrift::field_i
std::pair<strings::mtu, std::integral_constant<apache::thrift::field_id_t, 6>>,
std::pair<strings::truncateSize, std::integral_constant<apache::thrift::field_id_t, 7>>,
std::pair<strings::dscp, std::integral_constant<apache::thrift::field_id_t, 8>>,
std::pair<strings::agingIntervalUsecs, std::integral_constant<apache::thrift::field_id_t, 9>>,
std::pair<strings::agingIntervalUsecs_DEPRECATED, std::integral_constant<apache::thrift::field_id_t, 9>>,
std::pair<strings::eventIdToDropReasons_DEPRECATED, std::integral_constant<apache::thrift::field_id_t, 10>>,
std::pair<strings::modEventToConfigMap, std::integral_constant<apache::thrift::field_id_t, 11>>,
std::pair<strings::agingGroupAgingIntervalUsecs, std::integral_constant<apache::thrift::field_id_t, 12>>>::template type_of<Name>;
Expand All @@ -9383,7 +9383,7 @@ std::pair<strings::agingGroupAgingIntervalUsecs, std::integral_constant<apache::
STRUCT_CHILD_GETTERS(mtu, 6);
STRUCT_CHILD_GETTERS(truncateSize, 7);
STRUCT_CHILD_GETTERS(dscp, 8);
STRUCT_CHILD_GETTERS(agingIntervalUsecs, 9);
STRUCT_CHILD_GETTERS(agingIntervalUsecs_DEPRECATED, 9);
STRUCT_CHILD_GETTERS(eventIdToDropReasons_DEPRECATED, 10);
STRUCT_CHILD_GETTERS(modEventToConfigMap, 11);
STRUCT_CHILD_GETTERS(agingGroupAgingIntervalUsecs, 12);
Expand All @@ -9398,7 +9398,7 @@ std::pair<strings::agingGroupAgingIntervalUsecs, std::integral_constant<apache::
else if constexpr (__id == 6) { return mtu(); }
else if constexpr (__id == 7) { return truncateSize(); }
else if constexpr (__id == 8) { return dscp(); }
else if constexpr (__id == 9) { return agingIntervalUsecs(); }
else if constexpr (__id == 9) { return agingIntervalUsecs_DEPRECATED(); }
else if constexpr (__id == 10) { return eventIdToDropReasons_DEPRECATED(); }
else if constexpr (__id == 11) { return modEventToConfigMap(); }
else if constexpr (__id == 12) { return agingGroupAgingIntervalUsecs(); }
Expand Down

0 comments on commit bfdddcd

Please sign in to comment.