summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-01-30 17:27:53 +0100
committerJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-04-11 14:40:47 +0200
commitf5d5f0662ea88a15a5812178ff86b1a4297adad6 (patch)
tree26f9f80951c2546d15cdb095238602cca70d2109
parentf03492ba518f789b515141d762b24add50c41d79 (diff)
downloaddpdk-burst-replay-f5d5f0662ea88a15a5812178ff86b1a4297adad6.zip
dpdk-burst-replay-f5d5f0662ea88a15a5812178ff86b1a4297adad6.tar.gz
dpdk-burst-replay-f5d5f0662ea88a15a5812178ff86b1a4297adad6.tar.xz
Working on the DPDK 18.11 integration.
First patch to fix compilation issues (and simplifying rxmode config..)
-rw-r--r--src/dpdk.c20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/dpdk.c b/src/dpdk.c
index e86314c..309a8b0 100644
--- a/src/dpdk.c
+++ b/src/dpdk.c
@@ -25,23 +25,11 @@ static struct rte_eth_conf ethconf = {
.link_duplex = 0, // autonegociated link mode
#endif
.rxmode = {
- // Multi queue packet routing mode. We wont use DPDK RSS scaling for now,
- // we will use our own ashkey
.mq_mode = ETH_MQ_RX_NONE,
- // Default maximum frame length. Whenever this is > ETHER_MAX_LEN,
- // jumbo_frame has to be set to 1
- .max_rx_pkt_len = 9000,
- .split_hdr_size = 0, // Disable header split
- .header_split = 0, // Disable header split
- .hw_ip_checksum = 0, // Disable ip checksum
- .hw_vlan_filter = 0, // Disable vlan filtering
- .jumbo_frame = 1, // Enable Jumbo frame
- .hw_strip_crc = 0, // Disable hardware CRC stripping
},
.txmode = {
- .mq_mode = ETH_MQ_TX_NONE, // Multi queue packet routing mode. We wont use
- // DPDK RSS scaling for now, we will use our own ashkey
+ .mq_mode = ETH_MQ_TX_NONE, // Multi queue packet routing mode.
},
.fdir_conf = {
@@ -219,7 +207,13 @@ int init_dpdk_eal_mempool(const struct cmd_opts* opts,
}
/* check that dpdk detects all wanted/needed NIC ports */
+ /* API BREAKAGE ON 18.05 */
+#if (defined RTE_VER_YEAR && RTE_VER_YEAR == 18 && defined RTE_VER_MONTH && RTE_VER_MONTH <= 02) \
+ || defined RTE_VER_YEAR && RTE_VER_YEAR < 18
nb_ports = rte_eth_dev_count();
+#else /* if DPDK >= 18.05 */
+ nb_ports = rte_eth_dev_count_avail();
+#endif
if (nb_ports != cpus->nb_needed_cpus) {
printf("%s error: wanted %u NIC ports, found %u\n", __FUNCTION__,
cpus->nb_needed_cpus, nb_ports);