From: John Lo Date: Mon, 25 Apr 2016 16:32:11 +0000 (-0400) Subject: Put back VMXNET3 driver init for DPDK 2.2.0 or older versions X-Git-Tag: v16.06-rc1~115 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F64%2F864%2F2;p=vpp.git Put back VMXNET3 driver init for DPDK 2.2.0 or older versions Change-Id: I3fb9441fb7272072aba9721ca729d6ce5f2c00af Signed-off-by: John Lo --- 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);