aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSridhar K. N. Rao <sridhar.rao@spirent.com>2021-06-26 18:42:33 +0530
committerSridhar K. N. Rao <sridhar.rao@spirent.com>2021-06-28 15:30:27 +0530
commit27999d960e8849ef3d689e405a5aa5cb7fe7f6b6 (patch)
treef23ef17fc75df3d87064470bd220f22913185d7c
parentd5c0a03054f720da2a5ff9eba74feee57fb0296d (diff)
BUGFIXES: From Kali pre-release testing.
Multiple bug-fixes from thorough testing. More fixes added. Fix for Non-BLocking Signed-off-by: Sridhar K. N. Rao <sridhar.rao@spirent.com> Change-Id: Idd2fb214ab6dc4eba8a834ab13ecaa29ff09445e
-rw-r--r--conf/06_pktfwd.conf1
-rw-r--r--conf/12_k8s.conf2
-rw-r--r--conf/kubernetes/01_testcases.conf4
-rw-r--r--core/component_factory.py2
-rw-r--r--core/pktfwd_controller.py7
-rw-r--r--core/pod_controller.py2
-rw-r--r--pods/papi/papi.py2
-rw-r--r--requirements.txt2
-rwxr-xr-xsrc/dpdk/Makefile1
-rw-r--r--testcases/testcase.py6
-rw-r--r--tools/pkt_fwd/dummyfwd.py (renamed from tools/pkt_fwd/dummy.py)3
-rw-r--r--tools/tasks.py2
12 files changed, 22 insertions, 12 deletions
diff --git a/conf/06_pktfwd.conf b/conf/06_pktfwd.conf
index bb4c1d79..d77ac341 100644
--- a/conf/06_pktfwd.conf
+++ b/conf/06_pktfwd.conf
@@ -17,6 +17,7 @@
# ####################################################
PKTFWD_DIR = os.path.join(ROOT_DIR, 'tools/pkt_fwd')
+# With Kubernetes, and External vswitch, use DummyFWD
PKTFWD = 'TestPMD'
# ############################
diff --git a/conf/12_k8s.conf b/conf/12_k8s.conf
index 545870cd..04e70de4 100644
--- a/conf/12_k8s.conf
+++ b/conf/12_k8s.conf
@@ -34,7 +34,7 @@ PLUGIN = 'ovsdpdk'
# Paths. Default location: Master Node.
# NETWORK_ATTACHMENT_FILEPATH = ['/home/opnfv/sridhar/cnb/userspace/ovsdpdk/userspace-ovs-netAttach.yaml']
NETWORK_ATTACHMENT_FILEPATH = ['/home/opnfv/sridhar/cnb/userspace/vpp/userspace-vpp-netAttach-memif.yaml']
-#POD_MANIFEST_FILEPATH = '/home/opnfv/sridhar/cnb/userspace/ovsdpdk/userspace-ovs-netapp-pod.yaml'
+#POD_MANIFEST_FILEPATH = ['/home/opnfv/sridhar/cnb/userspace/ovsdpdk/userspace-ovs-netapp-pod.yaml']
POD_MANIFEST_FILEPATH = ['/home/opnfv/sridhar/cnb/userspace/vpp/userspace-dpdk-pod.yaml',
'/home/opnfv/sridhar/cnb/userspace/vpp/userspace-dpdk-pod2.yaml']
diff --git a/conf/kubernetes/01_testcases.conf b/conf/kubernetes/01_testcases.conf
index 25eea362..9e238557 100644
--- a/conf/kubernetes/01_testcases.conf
+++ b/conf/kubernetes/01_testcases.conf
@@ -1,7 +1,7 @@
K8SPERFORMANCE_TESTS = [
{
"Name": "pcp_tput",
- "Deployment": "p2p",
+ "Deployment": "pcp",
"Description": "LTD.Throughput.RFC2544.Throughput",
"Parameters" : {
"TRAFFIC" : {
@@ -13,6 +13,7 @@ K8SPERFORMANCE_TESTS = [
"Name": "pcp_evs_tput",
"Deployment": "pcp",
"Description": "LTD.Throughput.RFC2544.Throughput",
+ "vSwitch": 'none',
"Parameters" : {
"TRAFFIC" : {
"traffic_type" : "rfc2544_throughput",
@@ -22,6 +23,7 @@ K8SPERFORMANCE_TESTS = [
{
"Name": "pccp_evs_tput",
"Deployment": "pccp",
+ "vSwitch": 'none',
"Description": "LTD.Throughput.RFC2544.Throughput",
"Parameters" : {
"TRAFFIC" : {
diff --git a/core/component_factory.py b/core/component_factory.py
index f13bfb5b..618c7f5a 100644
--- a/core/component_factory.py
+++ b/core/component_factory.py
@@ -81,6 +81,8 @@ def create_vswitch(deployment_scenario, vswitch_class, traffic,
return VswitchControllerPtunP(deployment, vswitch_class, traffic)
elif deployment.startswith("clean"):
return VswitchControllerClean(deployment, vswitch_class, traffic)
+ elif deployment.startswith("pc"):
+ return VswitchControllerP2P(deployment, vswitch_class, traffic)
else:
raise RuntimeError("Unknown deployment scenario '{}'.".format(deployment))
diff --git a/core/pktfwd_controller.py b/core/pktfwd_controller.py
index 363302c3..2b6a008c 100644
--- a/core/pktfwd_controller.py
+++ b/core/pktfwd_controller.py
@@ -33,8 +33,11 @@ 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" and
- settings.getValue('VNF') != "QemuPciPassthrough" else False)
+ if 'DummyFWD' in settings.getValue("PKTFWD") or 'pc' in deployment:
+ self._pktfwd = pktfwd_class()
+ else:
+ self._pktfwd = pktfwd_class(guest=True if deployment == "pvp" and
+ settings.getValue('VNF') != "QemuPciPassthrough" else False)
self._logger.debug('Creation using %s', str(self._pktfwd_class))
def setup(self):
diff --git a/core/pod_controller.py b/core/pod_controller.py
index 109daa43..e522b823 100644
--- a/core/pod_controller.py
+++ b/core/pod_controller.py
@@ -44,7 +44,7 @@ class PodController():
self._pod_class = pod_class
self._deployment = deployment.lower()
self._pods = []
- if 'pcp' in self._deployment or 'p2p' in self._deployment:
+ if 'pcp' in self._deployment:
pod_number = 1
elif 'pccp'in self._deployment:
pod_number = 2
diff --git a/pods/papi/papi.py b/pods/papi/papi.py
index 5a96660d..5c15fa04 100644
--- a/pods/papi/papi.py
+++ b/pods/papi/papi.py
@@ -43,13 +43,13 @@ class Papi(IPod):
self._logger = logging.getLogger(__name__)
self._sriov_config = None
self._sriov_config_ns = None
- config.load_kube_config(S.getValue('K8S_CONFIG_FILEPATH'))
def create(self):
"""
Creation Process
"""
print("Entering Create Function")
+ config.load_kube_config(S.getValue('K8S_CONFIG_FILEPATH'))
# create vswitchperf namespace
api = client.CoreV1Api()
namespace = 'default'
diff --git a/requirements.txt b/requirements.txt
index a50569dd..f19089cd 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -5,7 +5,7 @@
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
-pexpect==3.3
+pexpect>=4.0
tox==1.8.1
jinja2==2.7.3
xmlrunner==1.7.7
diff --git a/src/dpdk/Makefile b/src/dpdk/Makefile
index 0a4b9724..d5d91ab0 100755
--- a/src/dpdk/Makefile
+++ b/src/dpdk/Makefile
@@ -75,6 +75,7 @@ ifdef CONFIG_FILE_BASE
$(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST=./CONFIG_RTE_LIBRTE_VHOST=y/g' $(CONFIG_FILE_BASE)
$(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_KNI=./CONFIG_RTE_LIBRTE_KNI=n/g' $(CONFIG_FILE_BASE)
$(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST_NUMA=./CONFIG_RTE_LIBRTE_VHOST_NUMA=y/g' $(CONFIG_FILE_BASE)
+ $(AT)sed -i -e 's/CONFIG_RTE_EAL_IGB_UIO=./CONFIG_RTE_EAL_IGB_UIO=y/g' $(CONFIG_FILE_BASE)
else
$(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST_USER=.\+/CONFIG_RTE_LIBRTE_VHOST_USER=$(VHOST_USER)/g' $(CONFIG_FILE_LINUXAPP)
$(AT)sed -i -e 's/CONFIG_RTE_BUILD_COMBINE_LIBS=./CONFIG_RTE_BUILD_COMBINE_LIBS=y/g' $(CONFIG_FILE_LINUXAPP)
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 40bec186..c13754bc 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -228,10 +228,10 @@ class TestCase(object):
len(self._step_vnf_list))
self._vnf_list = self._vnf_ctl.get_vnfs()
+ self._pod_ctl = component_factory.create_pod(
+ self.deployment,
+ loader.get_pod_class())
if self._k8s:
- self._pod_ctl = component_factory.create_pod(
- self.deployment,
- loader.get_pod_class())
self._pod_list = self._pod_ctl.get_pods()
# verify enough hugepages are free to run the testcase
diff --git a/tools/pkt_fwd/dummy.py b/tools/pkt_fwd/dummyfwd.py
index 97ffc666..0de8d40f 100644
--- a/tools/pkt_fwd/dummy.py
+++ b/tools/pkt_fwd/dummyfwd.py
@@ -17,10 +17,11 @@
import logging
from conf import settings
+from tools.pkt_fwd.pkt_fwd import IPktFwd
_LOGGER = logging.getLogger(__name__)
-class Dummy(IPktFwd):
+class DummyFWD(IPktFwd):
"""Dummy implementation
"""
diff --git a/tools/tasks.py b/tools/tasks.py
index 4e03f85e..06408abd 100644
--- a/tools/tasks.py
+++ b/tools/tasks.py
@@ -391,7 +391,7 @@ class Process(object):
def run(self):
while True:
try:
- self.child.read_nonblocking()
+ self.child.read_nonblocking(timeout=None)
except (pexpect.EOF, pexpect.TIMEOUT):
break