summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-04-11 15:21:35 +0200
committerJonathan Ribas <jonathan.ribas@fraudbuster.mobi>2019-04-11 15:21:35 +0200
commit9c078b3f3d53cc90ead63898f66b26c047f0f0ea (patch)
treeda7e9d925e331f8ba600f7689f229555b0790d6f
parentf03492ba518f789b515141d762b24add50c41d79 (diff)
parent838a40330167384f9d9a1981edea6f4a84da5fca (diff)
downloaddpdk-burst-replay-9c078b3f3d53cc90ead63898f66b26c047f0f0ea.zip
dpdk-burst-replay-9c078b3f3d53cc90ead63898f66b26c047f0f0ea.tar.gz
dpdk-burst-replay-9c078b3f3d53cc90ead63898f66b26c047f0f0ea.tar.xz
Merge remote-tracking branch 'origin/wip-18.11'
Add support of DPDK-18.11.
-rw-r--r--src/dpdk.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/dpdk.c b/src/dpdk.c
index e86314c..955763b 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,11 @@ int init_dpdk_eal_mempool(const struct cmd_opts* opts,
}
/* check that dpdk detects all wanted/needed NIC ports */
+#if API_OLDEST_THAN(18, 05) /* API BREAKAGE ON 18.05 */
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);