aboutsummaryrefslogtreecommitdiffstats
path: root/core/pktfwd_controller.py
diff options
context:
space:
mode:
authorMartin Klozik <martinx.klozik@intel.com>2017-01-19 12:21:26 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-01-19 12:21:26 +0000
commit605742c4e23f8aa199395dea96d5758dc2616093 (patch)
treea01bd7da2a5dee0b9fb089a796ac19d2c50c2d81 /core/pktfwd_controller.py
parentecadcfd29d4228f73d3ec3456d377162b165068a (diff)
parentbd278ffd0db2c777bdfc2eae6a2af7c3fb9d57b0 (diff)
Merge "testpmd_pvp_fix: Fix SR-IOV QemuPciPassthrough mode to not use vdev"
Diffstat (limited to 'core/pktfwd_controller.py')
-rw-r--r--core/pktfwd_controller.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/core/pktfwd_controller.py b/core/pktfwd_controller.py
index a0e14d19..785c6f89 100644
--- a/core/pktfwd_controller.py
+++ b/core/pktfwd_controller.py
@@ -16,6 +16,7 @@
"""
import logging
+from conf import settings
class PktFwdController(object):
"""Packet forwarder controller for P2P deployment scenario.
@@ -32,7 +33,8 @@ class PktFwdController(object):
self._deployment = deployment
self._logger = logging.getLogger(__name__)
self._pktfwd_class = pktfwd_class
- self._pktfwd = pktfwd_class(guest=True if deployment == "pvp" else False)
+ self._pktfwd = pktfwd_class(guest=True if deployment == "pvp" and
+ settings.getValue('VNF') != "QemuPciPassthrough" else False)
self._logger.debug('Creation using ' + str(self._pktfwd_class))
def setup(self):
@@ -66,13 +68,13 @@ class PktFwdController(object):
def __enter__(self):
if self._deployment.find("p2p") == 0:
self.setup()
- elif self._deployment == "pvp":
+ elif self._deployment == "pvp" and settings.getValue('VNF') != "QemuPciPassthrough":
self.setup_for_guest()
def __exit__(self, type_, value, traceback):
if self._deployment.find("p2p") == 0:
self.stop()
- elif self._deployment == "pvp":
+ elif self._deployment == "pvp" and settings.getValue('VNF') != "QemuPciPassthrough":
self.stop()
def get_pktfwd(self):