summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorahothan <ahothan@cisco.com>2018-11-01 08:17:49 -0700
committerahothan <ahothan@cisco.com>2018-11-01 08:17:49 -0700
commitf1d59a8130dce2ac9295bc5495e628fdb752b74d (patch)
treeb924612036158d7d3cbc448390e1a897ffc67302
parented33e56c9b8771ed9d22fc3cc19e049a76137db8 (diff)
NFVBENCH-105 ARP not working with NFVbench 2.02.0.2
Fix type in arp record field. Remove unneeded code. Change-Id: I7a77f66c5e1c357907f4fd113f864708a351f152 Signed-off-by: ahothan <ahothan@cisco.com>
-rw-r--r--docs/development/design/ndrpdr.rst4
-rw-r--r--docs/development/design/versioning.rst8
-rw-r--r--docs/testing/developer/devguide/index.rst8
-rw-r--r--docs/testing/user/configguide/configguide.rst8
-rwxr-xr-xnfvbench/traffic_client.py1
-rw-r--r--nfvbench/traffic_gen/trex.py39
6 files changed, 27 insertions, 41 deletions
diff --git a/docs/development/design/ndrpdr.rst b/docs/development/design/ndrpdr.rst
index e34e8ba..dd769c0 100644
--- a/docs/development/design/ndrpdr.rst
+++ b/docs/development/design/ndrpdr.rst
@@ -79,5 +79,5 @@ consideration:
- actual Tx rate is always <= requested Tx rate
- the measured drop rate should always be relative to the actual Tx rate
- if the actual Tx rate is < requested Tx rate and the measured drop rate is already within threshold
- (<NDR/PDR threshold) then the binary search must stop with proper warning because the actual NDR/PDR
- might probably be higher than the reported values
+ (<NDR/PDR threshold) then the binary search must stop with proper warning because the actual NDR/PDR
+ might probably be higher than the reported values
diff --git a/docs/development/design/versioning.rst b/docs/development/design/versioning.rst
index 870ed86..8103534 100644
--- a/docs/development/design/versioning.rst
+++ b/docs/development/design/versioning.rst
@@ -8,15 +8,9 @@ Versioning
==========
NFVbench uses semver compatible git tags such as "1.0.0". These tags are also called project tags and applied at important commits on the master branch exclusively.
-Rules for the version numbers follow the semver 2.0 specification (http://semver.org).
+Rules for the version numbers follow the semver 2.0 specification (https://semver.org).
These git tags are applied indepently of the OPNFV release tags which are applied only on the stable release branches (e.g. "opnfv-5.0.0").
In general it is recommeneded to always have a project git version tag associated to any OPNFV release tag content obtained from a sync from master.
NFVbench Docker containers will be versioned based on the OPNF release tags or based on NFVbench project tags.
-
-
-
-
-
-
diff --git a/docs/testing/developer/devguide/index.rst b/docs/testing/developer/devguide/index.rst
index e69de29..e219889 100644
--- a/docs/testing/developer/devguide/index.rst
+++ b/docs/testing/developer/devguide/index.rst
@@ -0,0 +1,8 @@
+.. _nfvbench-releasenotes:
+
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+
+***************
+Developer Guide
+***************
diff --git a/docs/testing/user/configguide/configguide.rst b/docs/testing/user/configguide/configguide.rst
index e69de29..f790d21 100644
--- a/docs/testing/user/configguide/configguide.rst
+++ b/docs/testing/user/configguide/configguide.rst
@@ -0,0 +1,8 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International
+.. License.
+.. http://creativecommons.org/licenses/by/4.0
+.. (c) Cisco Systems, Inc
+
+*******************
+Configuration Guide
+*******************
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py
index 810f7dd..34d93cf 100755
--- a/nfvbench/traffic_client.py
+++ b/nfvbench/traffic_client.py
@@ -463,7 +463,6 @@ class TrafficClient(object):
def setup(self):
"""Set up the traffic client."""
- self.gen.set_mode()
self.gen.clear_stats()
def get_version(self):
diff --git a/nfvbench/traffic_gen/trex.py b/nfvbench/traffic_gen/trex.py
index 2f271aa..5701297 100644
--- a/nfvbench/traffic_gen/trex.py
+++ b/nfvbench/traffic_gen/trex.py
@@ -11,6 +11,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
+"""Driver module for TRex traffic generator."""
import os
import random
@@ -19,7 +20,6 @@ import traceback
from itertools import count
from nfvbench.log import LOG
-from nfvbench.specs import ChainType
from nfvbench.traffic_server import TRexTrafficServer
from nfvbench.utils import cast_integer
from nfvbench.utils import timeout
@@ -61,6 +61,7 @@ class TRex(AbstractTrafficGenerator):
LATENCY_PG_ID_MASK = 0x0100
def __init__(self, traffic_client):
+ """Trex driver."""
AbstractTrafficGenerator.__init__(self, traffic_client)
self.client = None
self.id = count()
@@ -417,32 +418,6 @@ class TRex(AbstractTrafficGenerator):
(self.port_info[0]['speed'],
self.port_info[1]['speed']))
- def set_mode(self):
- if self.config.service_chain == ChainType.EXT and not self.config.no_arp:
- self.__set_l3_mode()
- else:
- self.__set_l2_mode()
-
- def __set_l3_mode(self):
- self.client.set_service_mode(ports=self.port_handle, enabled=True)
- for port, device in zip(self.port_handle, self.generator_config.devices):
- try:
- self.client.set_l3_mode(port=port,
- src_ipv4=device.tg_gateway_ip,
- dst_ipv4=device.dst.gateway_ip,
- vlan=device.vlan_tag if device.vlan_tagging else None)
- except STLError:
- # TRex tries to resolve ARP already, doesn't have to be successful yet
- continue
- self.client.set_service_mode(ports=self.port_handle, enabled=False)
-
- def __set_l2_mode(self):
- self.client.set_service_mode(ports=self.port_handle, enabled=True)
- for port, device in zip(self.port_handle, self.generator_config.devices):
- for cfg in device.get_stream_configs():
- self.client.set_l2_mode(port=port, dst_mac=cfg['mac_dst'])
- self.client.set_service_mode(ports=self.port_handle, enabled=False)
-
def __start_server(self):
server = TRexTrafficServer()
server.run_server(self.generator_config)
@@ -470,8 +445,9 @@ class TRex(AbstractTrafficGenerator):
STLServiceARP(ctx,
src_ip=cfg['ip_src_tg_gw'],
dst_ip=cfg['mac_discovery_gw'],
- vlan=device.vlan_tag if device.vlan_tagging else None)
- for cfg in stream_configs()
+ # will be None if no vlan tagging
+ vlan=cfg['vlan_tag'])
+ for cfg in stream_configs
]
for attempt in range(self.config.generic_retry_count):
@@ -485,11 +461,12 @@ class TRex(AbstractTrafficGenerator):
for chain_id, mac in enumerate(dst_macs):
if not mac:
arp_record = arps[chain_id].get_record()
- if arp_record.dest_mac:
+ if arp_record.dst_mac:
dst_macs[chain_id] = arp_record.dst_mac
dst_macs_count += 1
- LOG.info(' ARP: port=%d chain=%d IP=%s -> MAC=%s',
+ LOG.info(' ARP: port=%d chain=%d src IP=%s dst IP=%s -> MAC=%s',
port, chain_id,
+ arp_record.src_ip,
arp_record.dst_ip, arp_record.dst_mac)
else:
unresolved.append(arp_record.dst_ip)