diff options
author | Martin Klozik <martinx.klozik@intel.com> | 2016-03-18 10:40:42 +0000 |
---|---|---|
committer | Martin Klozik <martinx.klozik@intel.com> | 2016-04-14 08:23:50 +0100 |
commit | 55db32610210f3163971557382e653be6667e333 (patch) | |
tree | 139c4a7d631e34b05e89c88ac446dc51c33fd613 /core/pktfwd_controller.py | |
parent | 0c0d7c2fa564bd9ab2e7da40e7bd009b1e7a8650 (diff) |
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 <martinx.klozik@intel.com>
Reviewed-by: Maryam Tahhan <maryam.tahhan@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Brian Castelli <brian.castelli@spirent.com>
Diffstat (limited to 'core/pktfwd_controller.py')
-rw-r--r-- | core/pktfwd_controller.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/core/pktfwd_controller.py b/core/pktfwd_controller.py index 40565504..b1e37f2e 100644 --- a/core/pktfwd_controller.py +++ b/core/pktfwd_controller.py @@ -24,11 +24,12 @@ class PktFwdController(object): _pktfwd_class: The packet forwarder class to be used. _pktfwd: The packet forwarder object controlled by this controller """ - def __init__(self, pktfwd_class): + def __init__(self, deployment, pktfwd_class): """Initializes up the prerequisites for the P2P deployment scenario. :vswitch_class: the vSwitch class to be used. """ + self._deployment = deployment self._logger = logging.getLogger(__name__) self._pktfwd_class = pktfwd_class self._pktfwd = pktfwd_class() @@ -52,10 +53,12 @@ class PktFwdController(object): self._pktfwd.stop() def __enter__(self): - self.setup() + if self._deployment.find("p2p") == 0: + self.setup() def __exit__(self, type_, value, traceback): - self.stop() + if self._deployment.find("p2p") == 0: + self.stop() def get_pktfwd(self): """Get the controlled packet forwarder |