dpdk: fix rte_eth_dev_set_mtu callsites to use same mtu value 06/12206/2
authorRui Cai <rucai@microsoft.com>
Thu, 26 Apr 2018 23:15:57 +0000 (23:15 +0000)
committerDamjan Marion <dmarion.lists@gmail.com>
Wed, 16 May 2018 20:23:52 +0000 (20:23 +0000)
During dpdk_lib_init, it calculates MRU and MTU and later calls
rte_eth_dev_set_mtu with calculated MTU value. However, dpdk_device_setup
calls rte_eth_dev_set_mtu with hi->max_packet_bytes, which is set to be
MRU value in dpdk_lib_init earlier.

Most of the time, MRU != MTU in dpdk_lib_init and it looks like
hi->max_packet_bytes is treated as MTU in other parts of vpp codebase.
Therefore, dpdk_lib_init should be consistent and use MTU instead of MRU
for hi->max_packet_bytes.

Change-Id: I23ff2a6cd45d6bc819b6f64d5f0fc0490b8a44de
Signed-off-by: Rui Cai <rucai@microsoft.com>
src/plugins/dpdk/device/init.c

index aca57a0..70acccc 100755 (executable)
@@ -639,7 +639,7 @@ dpdk_lib_init (dpdk_main_t * dm)
        * ethernet_register_interface() above*/
       if (hi)
        {
-         hi->max_packet_bytes = max_rx_frame;
+         hi->max_packet_bytes = mtu;
          hi->max_supported_packet_bytes = max_rx_frame;
        }