aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--conf/12_k8s.conf4
-rw-r--r--conf/kubernetes/01_testcases.conf59
-rw-r--r--core/pod_controller.py10
-rw-r--r--testcases/testcase.py35
4 files changed, 91 insertions, 17 deletions
diff --git a/conf/12_k8s.conf b/conf/12_k8s.conf
index 04e70de4..1b51f687 100644
--- a/conf/12_k8s.conf
+++ b/conf/12_k8s.conf
@@ -1,3 +1,4 @@
+# Copyright 2022 The Linux Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -45,3 +46,6 @@ APP_NAME = 'l2fwd'
EXT_VSWITCH = True
EXT_VSWITCH_TYPE = 'VPP'
EXT_OVS_BRIDGE = 'br0'
+
+# Flow Control
+USCNI_INTERFACE_PAIRS = 1
diff --git a/conf/kubernetes/01_testcases.conf b/conf/kubernetes/01_testcases.conf
index 9e238557..a6bb8d35 100644
--- a/conf/kubernetes/01_testcases.conf
+++ b/conf/kubernetes/01_testcases.conf
@@ -1,3 +1,22 @@
+# Copyright 2022 Spirent Communications, The Linux Foundation, and others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Generic test configuration options are described at conf/01_testcases.conf
+#
+
+
K8SPERFORMANCE_TESTS = [
{
"Name": "pcp_tput",
@@ -31,4 +50,44 @@ K8SPERFORMANCE_TESTS = [
},
},
},
+ {
+ "Name": "c2c_tput",
+ "Deployment": "pcp",
+ "Description": "LTD.Throughput.RFC2544.Throughput",
+ "Parameters" : {
+ "TRAFFIC" : {
+ "traffic_type" : "rfc2544_throughput",
+ },
+ },
+ },
+ {
+ "Name": "c2c_2inf_tput",
+ "Deployment": "pcp",
+ "Description": "LTD.Throughput.RFC2544.Throughput",
+ "Parameters" : {
+ "TRAFFIC" : {
+ "traffic_type" : "rfc2544_throughput",
+ },
+ },
+ },
+ {
+ "Name": "c2c2c_tput",
+ "Deployment": "pcp",
+ "Description": "LTD.Throughput.RFC2544.Throughput",
+ "Parameters" : {
+ "TRAFFIC" : {
+ "traffic_type" : "rfc2544_throughput",
+ },
+ },
+ },
+ {
+ "Name": "c2c2c_2inf_tput",
+ "Deployment": "pcp",
+ "Description": "LTD.Throughput.RFC2544.Throughput",
+ "Parameters" : {
+ "TRAFFIC" : {
+ "traffic_type" : "rfc2544_throughput",
+ },
+ },
+ },
]
diff --git a/core/pod_controller.py b/core/pod_controller.py
index e522b823..0e8e1b09 100644
--- a/core/pod_controller.py
+++ b/core/pod_controller.py
@@ -1,4 +1,4 @@
-# Copyright 2020 Spirent Communications
+# Copyright 2022 Spirent Communications, The Linux Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -44,12 +44,14 @@ class PodController():
self._pod_class = pod_class
self._deployment = deployment.lower()
self._pods = []
- if 'pcp' in self._deployment:
+ single_pods = ['pcp', 'c2c']
+ two_pods = ['pccp', 'c2c2c']
+ if any(item in self._deployment for item in single_pods):
pod_number = 1
- elif 'pccp'in self._deployment:
+ elif any(item in self._deployment for item in two_pods):
pod_number = 2
print("POD COUNTING DONE")
- settings.setValue('POD_COUNT', pod_number)
+ settings.setValue('POD_COUNT', pod_number)
# we will have single controller for all pods
if pod_number:
self._pods.append(pod_class())
diff --git a/testcases/testcase.py b/testcases/testcase.py
index 13ada1cc..12d71bc5 100644
--- a/testcases/testcase.py
+++ b/testcases/testcase.py
@@ -640,19 +640,28 @@ class TestCase(object):
if S.getValue('K8S') and 'sriov' not in S.getValue('PLUGIN'):
if 'Ovs' in S.getValue('VSWITCH'):
# Add OVS Flows
- logging.info("Kubernetes: Adding OVS Connections")
- flow = {'table':'0', 'in_port':'1',
- 'idle_timeout':'0', 'actions': ['output:3']}
- vswitch.add_flow(bridge, flow)
- flow = {'table':'0', 'in_port':'3',
- 'idle_timeout':'0', 'actions': ['output:1']}
- vswitch.add_flow(bridge, flow)
- flow = {'table':'0', 'in_port':'2',
- 'idle_timeout':'0', 'actions': ['output:4']}
- vswitch.add_flow(bridge, flow)
- flow = {'table':'0', 'in_port':'4',
- 'idle_timeout':'0', 'actions': ['output:2']}
- vswitch.add_flow(bridge, flow)
+ if S.getValue('USCNI_INTERFACE_PAIRS') == 1:
+ logging.info("Kubernetes: Adding 1-Pair OVS Connections")
+ flow = {'table':'0', 'in_port':'1',
+ 'idle_timeout':'0', 'actions': ['output:2']}
+ vswitch.add_flow(bridge, flow)
+ flow = {'table':'0', 'in_port':'2',
+ 'idle_timeout':'0', 'actions': ['output:1']}
+ vswitch.add_flow(bridge, flow)
+ elif S.getValue('USCNI_INTERFACE_PAIRS') == 2:
+ logging.info("Kubernetes: Adding 2-Pairs OVS Connections")
+ flow = {'table':'0', 'in_port':'1',
+ 'idle_timeout':'0', 'actions': ['output:3']}
+ vswitch.add_flow(bridge, flow)
+ flow = {'table':'0', 'in_port':'3',
+ 'idle_timeout':'0', 'actions': ['output:1']}
+ vswitch.add_flow(bridge, flow)
+ flow = {'table':'0', 'in_port':'2',
+ 'idle_timeout':'0', 'actions': ['output:4']}
+ vswitch.add_flow(bridge, flow)
+ flow = {'table':'0', 'in_port':'4',
+ 'idle_timeout':'0', 'actions': ['output:2']}
+ vswitch.add_flow(bridge, flow)
elif 'vpp' in S.getValue('VSWITCH'):
phy_ports = vswitch.get_ports()
virt_port0 = 'memif1/0'