Skip to content

Commit

Permalink
dpdk: fix multiple dpdk telemetry files registration
Browse files Browse the repository at this point in the history
  • Loading branch information
SiskaPavel committed Jan 2, 2025
1 parent 39bb08e commit 355377d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions input/dpdk/dpdkPortTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ DpdkPortTelemetry::DpdkPortTelemetry(
: M_PORT_ID(portId)
{
for (auto [name, ops] : getAppFsFiles(M_PORT_ID)) {
if (dir->getEntry(name)) {
continue;
}
auto file = dir->addFile(name, ops);
m_holder.add(file);
}
Expand Down
3 changes: 3 additions & 0 deletions input/dpdk/dpdkTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ static std::vector<AppFsFile> getAppFsFiles()
DpdkTelemetry::DpdkTelemetry(const std::shared_ptr<telemetry::Directory>& dpdkDir)
{
for (auto [name, ops] : getAppFsFiles()) {
if (dpdkDir->getEntry(name)) {
continue;
}
auto file = dpdkDir->addFile(name, ops);
m_holder.add(file);
}
Expand Down

0 comments on commit 355377d

Please # to comment.