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)
commit26d6fd7f4deb67480c54eeff81aca36a8182dc0d
tree2664fa56dc2e7d621602a59fe85a744c1453a964
parent831fd64ae62b31149431beb07b9836df13be59f6
dpdk: fix rte_eth_dev_set_mtu callsites to use same mtu value

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