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
# ####################################################
PKTFWD_DIR = os.path.join(ROOT_DIR, 'tools/pkt_fwd')
+# With Kubernetes, and External vswitch, use DummyFWD
PKTFWD = 'TestPMD'
# ############################
# 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']
K8SPERFORMANCE_TESTS = [
{
"Name": "pcp_tput",
- "Deployment": "p2p",
+ "Deployment": "pcp",
"Description": "LTD.Throughput.RFC2544.Throughput",
"Parameters" : {
"TRAFFIC" : {
"Name": "pcp_evs_tput",
"Deployment": "pcp",
"Description": "LTD.Throughput.RFC2544.Throughput",
+ "vSwitch": 'none',
"Parameters" : {
"TRAFFIC" : {
"traffic_type" : "rfc2544_throughput",
{
"Name": "pccp_evs_tput",
"Deployment": "pccp",
+ "vSwitch": 'none',
"Description": "LTD.Throughput.RFC2544.Throughput",
"Parameters" : {
"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))
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):
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
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'
# 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
$(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)
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
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
"""
def run(self):
while True:
try:
- self.child.read_nonblocking()
+ self.child.read_nonblocking(timeout=None)
except (pexpect.EOF, pexpect.TIMEOUT):
break