Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coding error in ReadMeterEntry() #318

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions stratum/hal/lib/tdi/tdi_table_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -977,8 +977,8 @@ ::util::Status TdiTableManager::ReadMeterEntry(
ASSIGN_OR_RETURN(uint32 table_id,
tdi_sde_interface_->GetTdiRtId(meter_entry.meter_id()));

ASSIGN_OR_RETURN(auto resource_type,
p4_info_manager_->FindResourceTypeByID(table_id));
ASSIGN_OR_RETURN(auto resource_type, p4_info_manager_->FindResourceTypeByID(
meter_entry.meter_id()));

if (resource_type == "Meter") {
{
Expand Down
3 changes: 1 addition & 2 deletions stratum/hal/lib/tdi/tdi_table_manager_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,7 @@ TEST_F(TdiTableManagerTest, DISABLED_RejectMeterEntryInsertDelete) {
EXPECT_EQ(ERR_INVALID_PARAM, ret.error_code());
}

// See https://github.com/ipdk-io/stratum-dev/issues/315.
TEST_F(TdiTableManagerTest, DISABLED_ReadSingleIndirectMeterEntryTest) {
TEST_F(TdiTableManagerTest, ReadSingleIndirectMeterEntryTest) {
ASSERT_OK(PushTestConfig());
auto session_mock = std::make_shared<SessionMock>();
constexpr int kP4MeterId = 55555;
Expand Down