summaryrefslogtreecommitdiffstats
path: root/vnfs/qemu/qemu.py
diff options
context:
space:
mode:
authorChristian Trautman <ctrautma@redhat.com>2017-03-29 13:28:38 -0400
committerChristian Trautman <ctrautma@redhat.com>2017-03-30 07:36:53 -0400
commitc071fadc49859b4cb6bd0c37a85746287612c42b (patch)
treed4d377ef8173366c400b6e7fa4a61ade779343f9 /vnfs/qemu/qemu.py
parent881bf91ed8014ba48c55d3a8fc5b4980913f9b95 (diff)
jumbo_frame: Add jumbo frame support
Add jumbo frame support for all packet forwarding applications inside guest for pxp testing. Enable jumbo frame support for OvsVanilla, OvsDpdkVhostUser, and Packet forwarding. Add minor fix for missing method issue when running packet forwarding tests. The get_version method was missing in the packet_forwaring core module. JIRA: VSPERF-501 Change-Id: Ia99975f47c64259ed2566bde3c85b2779c309e80 Signed-off-by: Christian Trautman <ctrautma@redhat.com>
Diffstat (limited to 'vnfs/qemu/qemu.py')
-rw-r--r--vnfs/qemu/qemu.py9
1 files changed, 9 insertions, 0 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'])