From 26d6fd7f4deb67480c54eeff81aca36a8182dc0d Mon Sep 17 00:00:00 2001 From: Rui Cai Date: Thu, 26 Apr 2018 23:15:57 +0000 Subject: 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 --- src/plugins/dpdk/device/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/dpdk') 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; } -- cgit 1.2.3-korg