dpdk: enable RX for no-multi-seg
The option no-multi-seg doesn't take effect for RX since MTU
which is too large is passed to DPDK lib, Which causes PMDs
are running XXX_scattered_rx function. The patch fixes the issue.
#include <dpdk/device/dpdk_priv.h>
+#define ETHER_MAX_LEN 1518 /**< Maximum frame len, including CRC. */
+
dpdk_main_t dpdk_main;
dpdk_config_main_t dpdk_config_main;
@@ -693,6 +695,9 @@ dpdk_lib_init (dpdk_main_t * dm)
else
clib_warning ("hi NULL");
+ if (dm->conf->no_multi_seg)
+ mtu = mtu > ETHER_MAX_LEN ? ETHER_MAX_LEN : mtu;
+
rte_eth_dev_set_mtu (xd->device_index, mtu);
}
