aboutsummaryrefslogtreecommitdiffstats
path: root/vnet
diff options
context:
space:
mode:
authorJohn Lo <loj@cisco.com>2016-04-25 12:32:11 -0400
committerDamjan Marion <damarion@cisco.com>2016-04-25 19:52:52 +0000
commit350dc1cd7811c75a1e7a026c5f92a10836c61083 (patch)
tree2dfc4bca78c868d7e74ed85d1eb5e44a2d857952 /vnet
parent423f723a5a07099ad3119c4b4f089cf680912d9d (diff)
Put back VMXNET3 driver init for DPDK 2.2.0 or older versions
Change-Id: I3fb9441fb7272072aba9721ca729d6ce5f2c00af Signed-off-by: John Lo <loj@cisco.com>
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 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);