Put back VMXNET3 driver init for DPDK 2.2.0 or older versions 64/864/2
authorJohn Lo <[email protected]>
Mon, 25 Apr 2016 16:32:11 +0000 (12:32 -0400)
committerDamjan Marion <[email protected]>
Mon, 25 Apr 2016 19:52:52 +0000 (19:52 +0000)
Change-Id: I3fb9441fb7272072aba9721ca729d6ce5f2c00af
Signed-off-by: John Lo <[email protected]>
vnet/vnet/devices/dpdk/init.c

index 8f24e7b..a94dc21 100644 (file)
@@ -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);