Skip to content
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
8 changes: 4 additions & 4 deletions src/plugins/input/dpdk/src/dpdk-ring.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,16 @@ class DpdkRingReader : public InputPlugin {
int dynfield_byte_index;
};

struct NfbTimestamp {
struct [[gnu::packed]] NfbTimestamp {
uint32_t timestamp_ns;
uint32_t timestamp_s;
} __rte_packed;
};

struct NfbMetadata {
struct [[gnu::packed]] NfbMetadata {
NfbTimestamp timestamp;
uint16_t matched;
uint32_t hash;
} __rte_packed;
};

telemetry::Content get_queue_telemetry();
void getDynfieldInfo();
Expand Down
4 changes: 4 additions & 0 deletions src/plugins/input/dpdk/src/dpdkPortTelemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ static telemetry::Dict getDeviceStatsByPortId(uint16_t portId)
return statsDict;
}

#if RTE_VERSION < RTE_VERSION_NUM(25, 0, 0, 0)
static telemetry::Dict getDeviceQueueStatsByPortId(uint16_t portId)
{
struct rte_eth_stats stats;
Expand Down Expand Up @@ -242,6 +243,7 @@ static telemetry::Dict getDeviceQueueStatsByPortId(uint16_t portId)

return dict;
}
#endif

static telemetry::Dict getDeviceXStatsByPortId(uint16_t portId)
{
Expand Down Expand Up @@ -306,12 +308,14 @@ static std::vector<AppFsFile> getAppFsFiles(uint16_t portId)
.read = [portId]() { return getDeviceStatsByPortId(portId); },
},
},
#if RTE_VERSION < RTE_VERSION_NUM(25, 0, 0, 0)
{
.name = "devstats_queues",
.ops = {
.read = [portId]() { return getDeviceQueueStatsByPortId(portId); },
},
},
#endif
{
.name = "devxstats",
.ops = {
Expand Down
Loading