summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2018-05-24 05:24:29 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2018-05-26 18:57:47 +0000
commitf888e1c29d15df51a879034cf4f2a7598424364d (patch)
treea69e9dbd1c52e232117d18516dbdc5ed11604217 /src/plugins
parentca1c8f3e782dc68a51aa2792771d9b4aac696ddd (diff)
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. Change-Id: I91a6fb23fd118e872c8a52a6c35c36a86cb2c02b Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Diffstat (limited to 'src/plugins')
-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);
}