Skip to content

Commit d87fca1

Browse files
authored
Merge pull request #105 from CESNET/dpdk-older-version-support
dpdk: support dpdk version < 21.11
2 parents cfe32e4 + 9aa4d31 commit d87fca1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

input/dpdk.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,11 @@ namespace ipxp
142142

143143
void DpdkReader::global_init(uint16_t port_id, uint16_t nb_rx_queue)
144144
{
145+
#if RTE_VERSION >= RTE_VERSION_NUM(21,11,0,0)
145146
rte_eth_conf port_conf{.rxmode = {.mq_mode = ETH_MQ_RX_RSS, .mtu = RTE_ETHER_MAX_LEN}};
147+
#else
148+
rte_eth_conf port_conf{.rxmode = {.mq_mode = ETH_MQ_RX_RSS, .max_rx_pkt_len = RTE_ETHER_MAX_LEN}};
149+
#endif
146150

147151
if (!rte_eth_dev_is_valid_port(port_id)) {
148152
throw PluginError("Invalid DPDK port specified");

0 commit comments

Comments
 (0)