From 55db32610210f3163971557382e653be6667e333 Mon Sep 17 00:00:00 2001 From: Martin Klozik Date: Fri, 18 Mar 2016 10:40:42 +0000 Subject: sriov: Support of SRIOV and Qemu PCI passthrough Generic support of SRIOV has been added. Virtual interfaces can be used in multiplei scenarios instead of physical NICs. Virtual functions can be directly accessed from VM by PCI passthrough method. Another option is to use VFs with vSwtich to evaluate impact on performance. Additonal modifications: * Automatic detection of NIC details has been added to simplify configuration. * Obsoleted configuration options have been removed. * Logging usage within vsperf script was fixed. * Vsperf main was refactored and final cleanup function added. * Configurable forwarding mode of TestPMD executed inside VM. JIRA: VSPERF-198 Change-Id: I4a0d5d262b245d433b12419de79399fb5825a623 Signed-off-by: Martin Klozik Reviewed-by: Maryam Tahhan Reviewed-by: Al Morton Reviewed-by: Christian Trautman Reviewed-by: Brian Castelli --- vswitches/ovs_vanilla.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'vswitches') diff --git a/vswitches/ovs_vanilla.py b/vswitches/ovs_vanilla.py index 6a380b1b..f5fecc2a 100644 --- a/vswitches/ovs_vanilla.py +++ b/vswitches/ovs_vanilla.py @@ -32,12 +32,12 @@ class OvsVanilla(IVSwitchOvs): see the interface definition. """ - _ports = settings.getValue('VSWITCH_VANILLA_PHY_PORT_NAMES') _current_id = 0 _vport_id = 0 def __init__(self): super(OvsVanilla, self).__init__() + self._ports = list(nic['device'] for nic in settings.getValue('NICS')) self._logger = logging.getLogger(__name__) self._vswitchd_args = ["unix:%s" % VSwitchd.get_db_sock_path()] self._vswitchd_args += settings.getValue('VSWITCHD_VANILLA_ARGS') @@ -77,8 +77,7 @@ class OvsVanilla(IVSwitchOvs): def add_phy_port(self, switch_name): """ - Method adds port based on configured VSWITCH_VANILLA_PHY_PORT_NAMES - stored in config file. + Method adds port based on detected device names. See IVswitch for general description """ @@ -89,8 +88,8 @@ class OvsVanilla(IVSwitchOvs): raise if not self._ports[self._current_id]: - self._logger.error("VSWITCH_VANILLA_PHY_PORT_NAMES not set") - raise ValueError("Invalid VSWITCH_VANILLA_PHY_PORT_NAMES") + self._logger.error("Can't detect device name for NIC %s", self._current_id) + raise ValueError("Invalid device name for %s" % self._current_id) bridge = self._bridges[switch_name] port_name = self._ports[self._current_id] -- cgit 1.2.3-korg