From 83e0a9fb40ba17a2d617e03d1d67938f568d5e65 Mon Sep 17 00:00:00 2001
From: Martin Klozik <martinx.klozik@intel.com>
Date: Wed, 29 Mar 2017 08:08:44 +0100
Subject: ixia: Support of 1 NIC connection to trafficgen

For some testcases it is useful to have only one connection between
traffic generator and DUT. Thus IxNet class was extended to support
such connection. Feature is enabled if both IXIA ports are set to
the same value.
New integration testcase ixnet_pvp_tput_1nic was created to demonstrate
this feature.
Unused code was removed from 3rd_party/ixia/ixnetrfc2544.tcl to simplify
introduction of new features and to speed up IXIA configuration.

JIRA: VSPERF-503

Change-Id: I92ab24fa58eeb1ccb7f00ac7f3530ffca7b99241
Signed-off-by: Martin Klozik <martinx.klozik@intel.com>
Reviewed-by: Al Morton <acmorton@att.com>
Reviewed-by: Christian Trautman <ctrautma@redhat.com>
Reviewed-by: Sridhar Rao <sridhar.rao@spirent.com>
Reviewed-by: Trevor Cooper <trevor.cooper@intel.com>
---
 tools/pkt_gen/ixnet/ixnet.py | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

(limited to 'tools')

diff --git a/tools/pkt_gen/ixnet/ixnet.py b/tools/pkt_gen/ixnet/ixnet.py
index 9a763104..972fa331 100755
--- a/tools/pkt_gen/ixnet/ixnet.py
+++ b/tools/pkt_gen/ixnet/ixnet.py
@@ -174,7 +174,7 @@ class IxNet(trafficgen.ITrafficGenerator):
 
         return output.split()
 
-    def connect(self):
+    def configure(self):
         """Configure system for IxNetwork.
         """
         self._cfg = {
@@ -194,7 +194,10 @@ class IxNet(trafficgen.ITrafficGenerator):
 
         self._logger.debug('IXIA configuration configuration : %s', self._cfg)
 
-        return self
+    def connect(self):
+        """Connect to IxNetwork - nothing to be done here
+        """
+        pass
 
     def disconnect(self):
         """Disconnect from Ixia chassis.
@@ -211,6 +214,7 @@ class IxNet(trafficgen.ITrafficGenerator):
     def start_cont_traffic(self, traffic=None, duration=30):
         """Start transmission.
         """
+        self.configure()
         self._bidir = traffic['bidir']
         self._params = {}
 
@@ -264,6 +268,7 @@ class IxNet(trafficgen.ITrafficGenerator):
                                  lossrate=0.0):
         """Start transmission.
         """
+        self.configure()
         self._bidir = traffic['bidir']
         self._params = {}
 
@@ -401,6 +406,7 @@ class IxNet(trafficgen.ITrafficGenerator):
                                 lossrate=0.0):
         """Start transmission.
         """
+        self.configure()
         self._bidir = traffic['bidir']
         self._params = {}
 
-- 
cgit