summaryrefslogtreecommitdiffstats
path: root/vswitches
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 /vswitches
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 'vswitches')
-rw-r--r--vswitches/ovs_dpdk_vhost.py6
-rw-r--r--vswitches/ovs_vanilla.py4
2 files changed, 10 insertions, 0 deletions
diff --git a/vswitches/ovs_dpdk_vhost.py b/vswitches/ovs_dpdk_vhost.py
index 3387fda7..13aef173 100644
--- a/vswitches/ovs_dpdk_vhost.py
+++ b/vswitches/ovs_dpdk_vhost.py
@@ -128,6 +128,9 @@ class OvsDpdkVhost(IVSwitchOvs):
not S.getValue('OVS_OLD_STYLE_MQ'):
params += ['options:n_rxq={}'.format(
S.getValue('VSWITCH_DPDK_MULTI_QUEUES'))]
+ if S.getValue('VSWITCH_JUMBO_FRAMES_ENABLED'):
+ params += ['mtu_request={}'.format(
+ S.getValue('VSWITCH_JUMBO_FRAMES_SIZE'))]
of_port = bridge.add_port(port_name, params)
return (port_name, of_port)
@@ -142,6 +145,9 @@ class OvsDpdkVhost(IVSwitchOvs):
vhost_count = self._get_port_count('type=dpdkvhostuser')
port_name = 'dpdkvhostuser' + str(vhost_count)
params = ['--', 'set', 'Interface', port_name, 'type=dpdkvhostuser']
+ if S.getValue('VSWITCH_JUMBO_FRAMES_ENABLED'):
+ params += ['mtu_request={}'.format(
+ S.getValue('VSWITCH_JUMBO_FRAMES_SIZE'))]
of_port = bridge.add_port(port_name, params)
return (port_name, of_port)
diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py
index 75870ab7..cfde3b45 100644
--- a/vswitches/ovs_vanilla.py
+++ b/vswitches/ovs_vanilla.py
@@ -116,6 +116,10 @@ class OvsVanilla(IVSwitchOvs):
tap_cmd_list += ['multi_queue']
tasks.run_task(tap_cmd_list, self._logger,
'Creating tap device...', False)
+ if settings.getValue('VSWITCH_JUMBO_FRAMES_ENABLED'):
+ tasks.run_task(['ifconfig', tap_name, 'mtu',
+ str(settings.getValue('VSWITCH_JUMBO_FRAMES_SIZE'))],
+ self._logger, 'Setting mtu size', False)
tasks.run_task(['sudo', 'ip', 'addr', 'flush', 'dev', tap_name],
self._logger, 'Remove IP', False)