aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Smith <mgsmith@netgate.com>2018-09-18 10:52:58 -0500
committerMatthew Smith <mgsmith@netgate.com>2018-09-18 11:33:30 -0500
commitc15d148f0f636cb0dabe55a90ddae95f406073c1 (patch)
tree70a7f611e8f047da6201716cc10188d73da2d98e
parent2f459d728b5cbd6d5a945a440afd7ef110e82505 (diff)
disable scatter/gather for ENA with DPDK 18.08
The scatter/gather rxmode flag was set for ENA when building against DPDK >= 18.08. ENA does not support this, so disable it. It looks like enabling it was a copy/paste error. Also, after offloads are adjusted based on whether "no-multi-seg" is set, those configurations are overwritten by copying port_conf_template over the port config. That should only happen for versions of DPDK older than 18.08 because 18.08 and newer make changes directly on the port config instead of making changes to the template. Make the clib_memcpy() conditional on the DPDK version being less than 18.08. After doing so, compiler errors complain about port_conf_template being declared but not used, so make it's declaration conditional. Change-Id: If81980d71c379a565b51dd700b953f8c811a8703 Signed-off-by: Matthew Smith <mgsmith@netgate.com>
-rw-r--r--src/plugins/dpdk/device/init.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index c811c4736d0..bb761c09c61 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -46,6 +46,7 @@ dpdk_config_main_t dpdk_config_main;
/* Port configuration, mildly modified Intel app values */
+#if RTE_VERSION < RTE_VERSION_NUM(18, 8, 0, 0)
static struct rte_eth_conf port_conf_template = {
.rxmode = {
.split_hdr_size = 0,
@@ -54,6 +55,7 @@ static struct rte_eth_conf port_conf_template = {
.mq_mode = ETH_MQ_TX_NONE,
},
};
+#endif
static dpdk_port_type_t
port_type_from_speed_capa (struct rte_eth_dev_info *dev_info)
@@ -369,8 +371,10 @@ dpdk_lib_init (dpdk_main_t * dm)
xd->flags |= DPDK_DEVICE_FLAG_MAYBE_MULTISEG;
}
+#if RTE_VERSION < RTE_VERSION_NUM(18, 8, 0, 0)
clib_memcpy (&xd->port_conf, &port_conf_template,
sizeof (struct rte_eth_conf));
+#endif
xd->tx_q_used = clib_min (dev_info.max_tx_queues, tm->n_vlib_mains);
@@ -490,7 +494,7 @@ dpdk_lib_init (dpdk_main_t * dm)
#if RTE_VERSION < RTE_VERSION_NUM(18, 8, 0, 0)
xd->port_conf.rxmode.enable_scatter = 0;
#else
- xd->port_conf.rxmode.offloads |= DEV_RX_OFFLOAD_SCATTER;
+ xd->port_conf.rxmode.offloads &= ~DEV_RX_OFFLOAD_SCATTER;
#endif
break;