aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRui Cai <rucai@microsoft.com>2018-04-26 23:15:57 +0000
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-16 20:23:52 +0000
commit26d6fd7f4deb67480c54eeff81aca36a8182dc0d (patch)
tree2664fa56dc2e7d621602a59fe85a744c1453a964 /src
parent831fd64ae62b31149431beb07b9836df13be59f6 (diff)
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>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/plugins/dpdk/device/init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index aca57a0ce7a..70accccf7dd 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -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;
}