BUGFIXES: From Kali pre-release testing. 12/72712/3
authorSridhar K. N. Rao <sridhar.rao@spirent.com>
Sat, 26 Jun 2021 13:12:33 +0000 (18:42 +0530)
committerSridhar K. N. Rao <sridhar.rao@spirent.com>
Mon, 28 Jun 2021 10:00:27 +0000 (15:30 +0530)
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

12 files changed:
conf/06_pktfwd.conf
conf/12_k8s.conf
conf/kubernetes/01_testcases.conf
core/component_factory.py
core/pktfwd_controller.py
core/pod_controller.py
pods/papi/papi.py
requirements.txt
src/dpdk/Makefile
testcases/testcase.py
tools/pkt_fwd/dummyfwd.py [moved from tools/pkt_fwd/dummy.py with 95% similarity]
tools/tasks.py

index bb4c1d7..d77ac34 100644 (file)
@@ -17,6 +17,7 @@
 # ####################################################
 
 PKTFWD_DIR = os.path.join(ROOT_DIR, 'tools/pkt_fwd')
+# With Kubernetes, and External vswitch, use DummyFWD
 PKTFWD = 'TestPMD'
 
 # ############################
index 545870c..04e70de 100644 (file)
@@ -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']
 
index 25eea36..9e23855 100644 (file)
@@ -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" : {
index f13bfb5..618c7f5 100644 (file)
@@ -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))
 
index 363302c..2b6a008 100644 (file)
@@ -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):
index 109daa4..e522b82 100644 (file)
@@ -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
index 5a96660..5c15fa0 100644 (file)
@@ -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'
index a50569d..f19089c 100644 (file)
@@ -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
index 0a4b972..d5d91ab 100755 (executable)
@@ -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)
index 40bec18..c13754b 100644 (file)
@@ -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
similarity index 95%
rename from tools/pkt_fwd/dummy.py
rename to tools/pkt_fwd/dummyfwd.py
index 97ffc66..0de8d40 100644 (file)
 
 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
 
     """
index 4e03f85..06408ab 100644 (file)
@@ -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