diff options
author | fmenguy <francoisregis.menguy@orange.com> | 2019-02-20 11:50:01 +0100 |
---|---|---|
committer | fmenguy <francoisregis.menguy@orange.com> | 2019-02-28 14:40:55 +0100 |
commit | e1887dcf96c21e96f259a94f5e6835d45b27dfdf (patch) | |
tree | 56d23924684100324fa0a4f8700d2aa1a5a2bf5d /nfvbench | |
parent | 7d83fb2596b3128ba47a7ac1e263e6926a0befd3 (diff) |
NFVBENCH-124 Upgrade TRex to v2.533.1.0
Change-Id: I7781d7a76ec06162c56112e592a43bb5060ef8b1
Signed-off-by: fmenguy <francoisregis.menguy@orange.com>
Diffstat (limited to 'nfvbench')
-rwxr-xr-x | nfvbench/traffic_client.py | 6 | ||||
-rw-r--r-- | nfvbench/traffic_gen/trex_gen.py (renamed from nfvbench/traffic_gen/trex.py) | 68 |
2 files changed, 37 insertions, 37 deletions
diff --git a/nfvbench/traffic_client.py b/nfvbench/traffic_client.py index 58ae345..469b922 100755 --- a/nfvbench/traffic_client.py +++ b/nfvbench/traffic_client.py @@ -23,7 +23,7 @@ from attrdict import AttrDict import bitmath from netaddr import IPNetwork # pylint: disable=import-error -from trex_stl_lib.api import STLError +from trex.stl.api import STLError # pylint: enable=import-error from log import LOG @@ -499,8 +499,8 @@ class TrafficClient(object): def _get_generator(self): tool = self.tool.lower() if tool == 'trex': - from traffic_gen import trex - return trex.TRex(self) + from traffic_gen import trex_gen + return trex_gen.TRex(self) if tool == 'dummy': from traffic_gen import dummy return dummy.DummyTG(self) diff --git a/nfvbench/traffic_gen/trex.py b/nfvbench/traffic_gen/trex_gen.py index 32aa576..10937de 100644 --- a/nfvbench/traffic_gen/trex.py +++ b/nfvbench/traffic_gen/trex_gen.py @@ -33,29 +33,29 @@ from traffic_utils import IMIX_L2_SIZES from traffic_utils import IMIX_RATIOS # pylint: disable=import-error -from trex_stl_lib.api import bind_layers -from trex_stl_lib.api import CTRexVmInsFixHwCs -from trex_stl_lib.api import Dot1Q -from trex_stl_lib.api import Ether -from trex_stl_lib.api import FlagsField -from trex_stl_lib.api import IP -from trex_stl_lib.api import Packet -from trex_stl_lib.api import STLClient -from trex_stl_lib.api import STLError -from trex_stl_lib.api import STLFlowLatencyStats -from trex_stl_lib.api import STLFlowStats -from trex_stl_lib.api import STLPktBuilder -from trex_stl_lib.api import STLScVmRaw -from trex_stl_lib.api import STLStream -from trex_stl_lib.api import STLTXCont -from trex_stl_lib.api import STLVmFixChecksumHw -from trex_stl_lib.api import STLVmFlowVar -from trex_stl_lib.api import STLVmFlowVarRepetableRandom -from trex_stl_lib.api import STLVmWrFlowVar -from trex_stl_lib.api import ThreeBytesField -from trex_stl_lib.api import UDP -from trex_stl_lib.api import XByteField -from trex_stl_lib.services.trex_stl_service_arp import STLServiceARP +from trex.common.services.trex_service_arp import ServiceARP +from trex.stl.api import bind_layers +from trex.stl.api import CTRexVmInsFixHwCs +from trex.stl.api import Dot1Q +from trex.stl.api import Ether +from trex.stl.api import FlagsField +from trex.stl.api import IP +from trex.stl.api import Packet +from trex.stl.api import STLClient +from trex.stl.api import STLError +from trex.stl.api import STLFlowLatencyStats +from trex.stl.api import STLFlowStats +from trex.stl.api import STLPktBuilder +from trex.stl.api import STLScVmRaw +from trex.stl.api import STLStream +from trex.stl.api import STLTXCont +from trex.stl.api import STLVmFixChecksumHw +from trex.stl.api import STLVmFlowVar +from trex.stl.api import STLVmFlowVarRepeatableRandom +from trex.stl.api import STLVmWrFlowVar +from trex.stl.api import ThreeBytesField +from trex.stl.api import UDP +from trex.stl.api import XByteField # pylint: enable=import-error @@ -306,14 +306,14 @@ class TRex(AbstractTrafficGenerator): pkt_base /= IP() / UDP(**udp_args) if stream_cfg['ip_addrs_step'] == 'random': - src_fv = STLVmFlowVarRepetableRandom( + src_fv = STLVmFlowVarRepeatableRandom( name="ip_src", min_value=stream_cfg['ip_src_addr'], max_value=stream_cfg['ip_src_addr_max'], size=4, seed=random.randint(0, 32767), limit=stream_cfg['ip_src_count']) - dst_fv = STLVmFlowVarRepetableRandom( + dst_fv = STLVmFlowVarRepeatableRandom( name="ip_dst", min_value=stream_cfg['ip_dst_addr'], max_value=stream_cfg['ip_dst_addr_max'], @@ -500,19 +500,19 @@ class TRex(AbstractTrafficGenerator): # the index in the list is the chain id if self.config.vxlan: arps = [ - STLServiceARP(ctx, - src_ip=device.vtep_src_ip, - dst_ip=device.vtep_dst_ip, - vlan=device.vtep_vlan) + ServiceARP(ctx, + src_ip=device.vtep_src_ip, + dst_ip=device.vtep_dst_ip, + vlan=device.vtep_vlan) for cfg in stream_configs ] else: arps = [ - STLServiceARP(ctx, - src_ip=cfg['ip_src_tg_gw'], - dst_ip=cfg['mac_discovery_gw'], - # will be None if no vlan tagging - vlan=cfg['vlan_tag']) + ServiceARP(ctx, + src_ip=cfg['ip_src_tg_gw'], + dst_ip=cfg['mac_discovery_gw'], + # will be None if no vlan tagging + vlan=cfg['vlan_tag']) for cfg in stream_configs ] |