diff options
Diffstat (limited to 'vnfs/qemu')
-rw-r--r-- | vnfs/qemu/qemu.py | 9 | ||||
-rw-r--r-- | vnfs/qemu/qemu_dpdk_vhost_user.py | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/vnfs/qemu/qemu.py b/vnfs/qemu/qemu.py index 997f93e0..a9ce176a 100644 --- a/vnfs/qemu/qemu.py +++ b/vnfs/qemu/qemu.py @@ -387,6 +387,9 @@ class IVnfQemu(IVnf): # get testpmd settings from CLI testpmd_params = S.getValue('GUEST_TESTPMD_PARAMS')[self._number] + if S.getValue('VSWITCH_JUMBO_FRAMES_ENABLED'): + testpmd_params += ' --max-pkt-len={}'.format(S.getValue( + 'VSWITCH_JUMBO_FRAMES_SIZE')) self.execute_and_wait('./testpmd {}'.format(testpmd_params), 60, "Done") self.execute('set fwd ' + self._testpmd_fwd_mode, 1) @@ -405,6 +408,9 @@ class IVnfQemu(IVnf): for nic in self._nics: self.execute('ip addr add ' + nic['ip'] + ' dev ' + nic['device']) + if S.getValue('VSWITCH_JUMBO_FRAMES_ENABLED'): + self.execute('ifconfig {} mtu {}'.format( + nic['device'], S.getValue('VSWITCH_JUMBO_FRAMES_SIZE'))) self.execute('ip link set dev ' + nic['device'] + ' up') # build and configure system for l2fwd @@ -436,6 +442,9 @@ class IVnfQemu(IVnf): for nic in self._nics: self.execute('ip addr add ' + nic['ip'] + ' dev ' + nic['device']) + if S.getValue('VSWITCH_JUMBO_FRAMES_ENABLED'): + self.execute('ifconfig {} mtu {}'.format( + nic['device'], S.getValue('VSWITCH_JUMBO_FRAMES_SIZE'))) self.execute('ip link set dev ' + nic['device'] + ' up') self.execute('brctl addif br0 ' + nic['device']) diff --git a/vnfs/qemu/qemu_dpdk_vhost_user.py b/vnfs/qemu/qemu_dpdk_vhost_user.py index f09ded13..3e9aecc8 100644 --- a/vnfs/qemu/qemu_dpdk_vhost_user.py +++ b/vnfs/qemu/qemu_dpdk_vhost_user.py @@ -41,7 +41,12 @@ class QemuDpdkVhostUser(IVnfQemu): # Guest merge buffer setting if S.getValue('GUEST_NIC_MERGE_BUFFERS_DISABLE')[self._number]: - merge_buff = 'mrg_rxbuf=off,' + if S.getValue('VSWITCH_JUMBO_FRAMES_ENABLED'): + self._logger.warning( + 'Mergable buffers must be enabled for jumbo frames. Overriding.') + merge_buff = '' + else: + merge_buff = 'mrg_rxbuf=off,' else: merge_buff = '' |