summaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'vnet')
-rw-r--r--vnet/vnet/devices/dpdk/init.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index 8f24e7b6..a94dc217 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -514,6 +514,17 @@ dpdk_lib_init (dpdk_main_t * dm)
}
}
+#if RTE_VERSION < RTE_VERSION_NUM(16, 4, 0, 0)
+ /*
+ * Older VMXNET3 driver doesn't support jumbo / multi-buffer pkts
+ */
+ if (xd->pmd == VNET_DPDK_PMD_VMXNET3)
+ {
+ xd->port_conf.rxmode.max_rx_pkt_len = 1518;
+ xd->port_conf.rxmode.jumbo_frame = 0;
+ }
+#endif
+
if (xd->pmd == VNET_DPDK_PMD_AF_PACKET)
{
f64 now = vlib_time_now(vm);
@@ -627,6 +638,14 @@ dpdk_lib_init (dpdk_main_t * dm)
rte_eth_dev_set_vlan_offload(xd->device_index, vlan_off);
}
+#if RTE_VERSION < RTE_VERSION_NUM(16, 4, 0, 0)
+ /*
+ * Older VMXNET3 driver doesn't support jumbo / multi-buffer pkts
+ */
+ else if (xd->pmd == VNET_DPDK_PMD_VMXNET3)
+ hi->max_packet_bytes = 1518;
+#endif
+
hi->max_l3_packet_bytes[VLIB_RX] = hi->max_l3_packet_bytes[VLIB_TX] =
xd->port_conf.rxmode.max_rx_pkt_len - sizeof(ethernet_header_t);