Skip to content

Commit 3a21a2b

Browse files
author
Pavel Siska
committed
dpdk: support DPDK 25
1 parent 58fdcf4 commit 3a21a2b

2 files changed

Lines changed: 8 additions & 4 deletions

File tree

src/plugins/input/dpdk/src/dpdk-ring.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,16 @@ class DpdkRingReader : public InputPlugin {
133133
int dynfield_byte_index;
134134
};
135135

136-
struct NfbTimestamp {
136+
struct [[gnu::packed]] NfbTimestamp {
137137
uint32_t timestamp_ns;
138138
uint32_t timestamp_s;
139-
} __rte_packed;
139+
};
140140

141-
struct NfbMetadata {
141+
struct [[gnu::packed]] NfbMetadata {
142142
NfbTimestamp timestamp;
143143
uint16_t matched;
144144
uint32_t hash;
145-
} __rte_packed;
145+
};
146146

147147
telemetry::Content get_queue_telemetry();
148148
void getDynfieldInfo();

src/plugins/input/dpdk/src/dpdkPortTelemetry.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ static telemetry::Dict getDeviceStatsByPortId(uint16_t portId)
205205
return statsDict;
206206
}
207207

208+
#if RTE_VERSION < RTE_VERSION_NUM(25, 0, 0, 0)
208209
static telemetry::Dict getDeviceQueueStatsByPortId(uint16_t portId)
209210
{
210211
struct rte_eth_stats stats;
@@ -242,6 +243,7 @@ static telemetry::Dict getDeviceQueueStatsByPortId(uint16_t portId)
242243

243244
return dict;
244245
}
246+
#endif
245247

246248
static telemetry::Dict getDeviceXStatsByPortId(uint16_t portId)
247249
{
@@ -306,12 +308,14 @@ static std::vector<AppFsFile> getAppFsFiles(uint16_t portId)
306308
.read = [portId]() { return getDeviceStatsByPortId(portId); },
307309
},
308310
},
311+
#if RTE_VERSION < RTE_VERSION_NUM(25, 0, 0, 0)
309312
{
310313
.name = "devstats_queues",
311314
.ops = {
312315
.read = [portId]() { return getDeviceQueueStatsByPortId(portId); },
313316
},
314317
},
318+
#endif
315319
{
316320
.name = "devxstats",
317321
.ops = {

0 commit comments

Comments
 (0)