summaryrefslogtreecommitdiffstats
path: root/src/plugins/dpdk/device
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-01-11 23:21:08 +0100
committerDamjan Marion <damarion@cisco.com>2022-01-12 19:52:05 +0100
commit6c75cd2242c26819b6456578497db3e3eccf7ef6 (patch)
treef4c3ae7870096e9bc4d62556216bee0e8b7af714 /src/plugins/dpdk/device
parent65105c95fe039d5fb1d3baec0affe1cd7be32505 (diff)
dpdk: bump to DPDK v21.11
Type: feature This patch bumps dpdk version from 21.08 to 21.11 Change-Id: Id37fdba75f1ea4f4eac3c92226f3b1c539e1daca Signed-off-by: Dastin Wilski <dastin.wilski@gmail.com> Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/plugins/dpdk/device')
-rw-r--r--src/plugins/dpdk/device/common.c25
-rw-r--r--src/plugins/dpdk/device/init.c9
2 files changed, 24 insertions, 10 deletions
diff --git a/src/plugins/dpdk/device/common.c b/src/plugins/dpdk/device/common.c
index 8396386510c..3eca847de79 100644
--- a/src/plugins/dpdk/device/common.c
+++ b/src/plugins/dpdk/device/common.c
@@ -103,7 +103,10 @@ dpdk_device_setup (dpdk_device_t * xd)
if (xd->conf.disable_multi_seg == 0)
{
txo |= DEV_TX_OFFLOAD_MULTI_SEGS;
- rxo |= DEV_RX_OFFLOAD_JUMBO_FRAME | DEV_RX_OFFLOAD_SCATTER;
+ rxo |= DEV_RX_OFFLOAD_SCATTER;
+#if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0)
+ rxo |= DEV_RX_OFFLOAD_JUMBO_FRAME;
+#endif
}
if (xd->conf.enable_lro)
@@ -156,13 +159,31 @@ dpdk_device_setup (dpdk_device_t * xd)
}
}
+#if RTE_VERSION < RTE_VERSION_NUM(21, 11, 0, 0)
if (rxo & DEV_RX_OFFLOAD_JUMBO_FRAME)
conf.rxmode.max_rx_pkt_len =
clib_min (ETHERNET_MAX_PACKET_BYTES, dev_info.max_rx_pktlen);
-
+#else
+ dpdk_log_debug ("[%u] min_mtu: %u, max_mtu: %u, min_rx_bufsize: %u, "
+ "max_rx_pktlen: %u, max_lro_pkt_size: %u",
+ xd->port_id, dev_info.min_mtu, dev_info.max_mtu,
+ dev_info.min_rx_bufsize, dev_info.max_rx_pktlen,
+ dev_info.max_lro_pkt_size);
+
+ mtu = xd->conf.disable_multi_seg ? 2000 : ETHERNET_MAX_PACKET_BYTES;
+ conf.rxmode.mtu = clib_min (mtu, dev_info.max_rx_pktlen);
+#endif
+
+retry:
rv = rte_eth_dev_configure (xd->port_id, xd->conf.n_rx_queues,
xd->conf.n_tx_queues, &conf);
+ if (rv < 0 && conf.intr_conf.rxq)
+ {
+ conf.intr_conf.rxq = 0;
+ goto retry;
+ }
+
if (rv < 0)
{
dpdk_device_error (xd, "rte_eth_dev_configure", rv);
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index a515bca359d..1d3e061aaaf 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -456,14 +456,7 @@ dpdk_lib_init (dpdk_main_t * dm)
xd->port_type = VNET_DPDK_PORT_TYPE_ETH_1G;
xd->conf.n_rx_desc = DPDK_NB_RX_DESC_VIRTIO;
xd->conf.n_tx_desc = DPDK_NB_TX_DESC_VIRTIO;
- /*
- * Enable use of RX interrupts if supported.
- *
- * There is no device flag or capability for this, so
- * use the same check that the virtio driver does.
- */
- if (pci_dev && rte_intr_cap_multiple (&pci_dev->intr_handle))
- xd->conf.enable_rxq_int = 1;
+ xd->conf.enable_rxq_int = 1;
break;
/* vmxnet3 */