Skip to content

Commit

Permalink
Thrift support for ECC and fifo overflow errors
Browse files Browse the repository at this point in the history
Summary: Add support for fifo overflow and ECC errors.

Reviewed By: maxwindiff

Differential Revision: D66566146

fbshipit-source-id: 7dd4999e4893553c8a5066cbc96fbe7f67119258
  • Loading branch information
Nivin Lawrence authored and facebook-github-bot committed Dec 4, 2024
1 parent 5056a60 commit 78811af
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 2 additions & 0 deletions fboss/agent/hw/hardware_stats.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ struct HwAsicErrors {
9: optional i64 forwardingQueueProcessorErrors;
10: optional i64 allReassemblyContextsTaken;
11: optional i64 reassemblyErrors;
12: optional i64 eccErrors;
13: optional i64 fifoOverflowErrors;
}

struct HwTeFlowStats {
Expand Down
16 changes: 13 additions & 3 deletions fboss/fsdb/if/oss/fsdb_model_thriftpath.h
Original file line number Diff line number Diff line change
Expand Up @@ -23128,7 +23128,9 @@ std::pair<strings::egressPacketNetworkInterfaceErrors, Child<::std::int64_t, ::a
std::pair<strings::alignerErrors, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<strings::forwardingQueueProcessorErrors, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<strings::allReassemblyContextsTaken, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<strings::reassemblyErrors, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>;
std::pair<strings::reassemblyErrors, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<strings::eccErrors, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<strings::fifoOverflowErrors, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>;
using ChildrenById = fatal::tuple< std::pair<std::integral_constant<apache::thrift::field_id_t, 1>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<std::integral_constant<apache::thrift::field_id_t, 2>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<std::integral_constant<apache::thrift::field_id_t, 3>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
Expand All @@ -23139,7 +23141,9 @@ std::pair<strings::reassemblyErrors, Child<::std::int64_t, ::apache::thrift::typ
std::pair<std::integral_constant<apache::thrift::field_id_t, 8>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<std::integral_constant<apache::thrift::field_id_t, 9>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<std::integral_constant<apache::thrift::field_id_t, 10>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<std::integral_constant<apache::thrift::field_id_t, 11>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>;
std::pair<std::integral_constant<apache::thrift::field_id_t, 11>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<std::integral_constant<apache::thrift::field_id_t, 12>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>,
std::pair<std::integral_constant<apache::thrift::field_id_t, 13>, Child<::std::int64_t, ::apache::thrift::type_class::integral, ::apache::thrift::type::i64_t>>>;
template <typename Name>
using NameToId = fatal::tuple<std::pair<strings::parityErrors, std::integral_constant<apache::thrift::field_id_t, 1>>,
std::pair<strings::correctedParityErrors, std::integral_constant<apache::thrift::field_id_t, 2>>,
Expand All @@ -23151,7 +23155,9 @@ std::pair<strings::egressPacketNetworkInterfaceErrors, std::integral_constant<ap
std::pair<strings::alignerErrors, std::integral_constant<apache::thrift::field_id_t, 8>>,
std::pair<strings::forwardingQueueProcessorErrors, std::integral_constant<apache::thrift::field_id_t, 9>>,
std::pair<strings::allReassemblyContextsTaken, std::integral_constant<apache::thrift::field_id_t, 10>>,
std::pair<strings::reassemblyErrors, std::integral_constant<apache::thrift::field_id_t, 11>>>::template type_of<Name>;
std::pair<strings::reassemblyErrors, std::integral_constant<apache::thrift::field_id_t, 11>>,
std::pair<strings::eccErrors, std::integral_constant<apache::thrift::field_id_t, 12>>,
std::pair<strings::fifoOverflowErrors, std::integral_constant<apache::thrift::field_id_t, 13>>>::template type_of<Name>;

template <typename Name>
using TypeFor = typename Children::template type_of<Name>;
Expand All @@ -23168,6 +23174,8 @@ std::pair<strings::reassemblyErrors, std::integral_constant<apache::thrift::fiel
STRUCT_CHILD_GETTERS(forwardingQueueProcessorErrors, 9);
STRUCT_CHILD_GETTERS(allReassemblyContextsTaken, 10);
STRUCT_CHILD_GETTERS(reassemblyErrors, 11);
STRUCT_CHILD_GETTERS(eccErrors, 12);
STRUCT_CHILD_GETTERS(fifoOverflowErrors, 13);

template <apache::thrift::field_id_t __id>
auto operator()(const std::integral_constant<apache::thrift::field_id_t, __id>&) {
Expand All @@ -23182,6 +23190,8 @@ std::pair<strings::reassemblyErrors, std::integral_constant<apache::thrift::fiel
else if constexpr (__id == 9) { return forwardingQueueProcessorErrors(); }
else if constexpr (__id == 10) { return allReassemblyContextsTaken(); }
else if constexpr (__id == 11) { return reassemblyErrors(); }
else if constexpr (__id == 12) { return eccErrors(); }
else if constexpr (__id == 13) { return fifoOverflowErrors(); }
}

template <typename T, T... Values>
Expand Down

0 comments on commit 78811af

Please sign in to comment.