From 350dc1cd7811c75a1e7a026c5f92a10836c61083 Mon Sep 17 00:00:00 2001 From: John Lo Date: Mon, 25 Apr 2016 12:32:11 -0400 Subject: Put back VMXNET3 driver init for DPDK 2.2.0 or older versions Change-Id: I3fb9441fb7272072aba9721ca729d6ce5f2c00af Signed-off-by: John Lo --- vnet/vnet/devices/dpdk/init.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'vnet') diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c index 8f24e7b68bb..a94dc2179cf 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); -- cgit 1.2.3-korg