Skip to content

Commit 8187a51

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

2 files changed

Lines changed: 9 additions & 6 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: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,8 @@
2323
* software without specific prior written permission.
2424
*/
2525

26-
#include "dpdkPortTelemetry.hpp"
27-
2826
#include "dpdkCompat.hpp"
27+
#include "dpdkPortTelemetry.hpp"
2928

3029
#include <algorithm>
3130
#include <array>
@@ -205,6 +204,7 @@ static telemetry::Dict getDeviceStatsByPortId(uint16_t portId)
205204
return statsDict;
206205
}
207206

207+
#if RTE_VERSION < RTE_VERSION_NUM(25, 0, 0, 0)
208208
static telemetry::Dict getDeviceQueueStatsByPortId(uint16_t portId)
209209
{
210210
struct rte_eth_stats stats;
@@ -242,6 +242,7 @@ static telemetry::Dict getDeviceQueueStatsByPortId(uint16_t portId)
242242

243243
return dict;
244244
}
245+
#endif
245246

246247
static telemetry::Dict getDeviceXStatsByPortId(uint16_t portId)
247248
{
@@ -306,12 +307,14 @@ static std::vector<AppFsFile> getAppFsFiles(uint16_t portId)
306307
.read = [portId]() { return getDeviceStatsByPortId(portId); },
307308
},
308309
},
310+
#if RTE_VERSION < RTE_VERSION_NUM(25, 0, 0, 0)
309311
{
310312
.name = "devstats_queues",
311313
.ops = {
312314
.read = [portId]() { return getDeviceQueueStatsByPortId(portId); },
313315
},
314316
},
317+
#endif
315318
{
316319
.name = "devxstats",
317320
.ops = {

0 commit comments

Comments
 (0)