aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/plugins/dpdk/device/init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index 23d4d46f24e..1f17c61ccaf 100755
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -37,6 +37,8 @@
#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);
}