diff options
author | 2016-04-10 17:23:55 +0300 | |
---|---|---|
committer | 2016-04-10 17:23:55 +0300 | |
commit | 4aab694dd856865fd4497cd8249bb68fcf9970dd (patch) | |
tree | 63c902775f06f7b7945c675d2fb34186ed3aeb19 /scripts | |
parent | 392f47fb7956b108c36d45c37b52cb4b2c91091f (diff) | |
parent | f067afcd24731aca892fa03ec3a5eaf48fe6f68d (diff) |
Merge trex-197 bug fix
Diffstat (limited to 'scripts')
22 files changed, 317 insertions, 35 deletions
diff --git a/scripts/automation/regression/functional_tests/stl_basic_tests.py b/scripts/automation/regression/functional_tests/stl_basic_tests.py index 2bf97307..ecb7b465 100644 --- a/scripts/automation/regression/functional_tests/stl_basic_tests.py +++ b/scripts/automation/regression/functional_tests/stl_basic_tests.py @@ -9,8 +9,16 @@ from nose.plugins.attrib import attr from trex import CTRexScenario from trex_stl_lib import trex_stl_sim from trex_stl_lib.trex_stl_streams import STLProfile -from trex_stl_lib.trex_stl_packet_builder_scapy import RawPcapReader, RawPcapWriter +from trex_stl_lib.trex_stl_packet_builder_scapy import RawPcapReader, RawPcapWriter, Ether +from trex_stl_lib.utils.text_opts import * + import sys + +if sys.version_info > (3,0): + from io import StringIO +else: + from cStringIO import StringIO + import os import subprocess import shlex @@ -64,9 +72,18 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): raise Exception("cannot find '{0}'".format(name)) - def compare_caps (self, cap1, cap2, max_diff_sec = 0.01): - pkts1 = list(RawPcapReader(cap1)) - pkts2 = list(RawPcapReader(cap2)) + def scapy_pkt_show_to_str (self, scapy_pkt): + capture = StringIO() + save_stdout = sys.stdout + sys.stdout = capture + scapy_pkt.show() + sys.stdout = save_stdout + return capture.getvalue() + + + def compare_caps (self, output, golden, max_diff_sec = 0.01): + pkts1 = list(RawPcapReader(output)) + pkts2 = list(RawPcapReader(golden)) assert_equal(len(pkts1), len(pkts2)) @@ -75,11 +92,29 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): ts2 = float(pkt2[1][0]) + (float(pkt2[1][1]) / 1e6) if abs(ts1-ts2) > 0.000005: # 5 nsec - raise AssertionError("TS error: cap files '{0}', '{1}' differ in cap #{2} - '{3}' vs. '{4}'".format(cap1, cap2, i, ts1, ts2)) + raise AssertionError("TS error: cap files '{0}', '{1}' differ in cap #{2} - '{3}' vs. '{4}'".format(output, golden, i, ts1, ts2)) if pkt1[0] != pkt2[0]: - raise AssertionError("RAW error: cap files '{0}', '{1}' differ in cap #{2}".format(cap1, cap2, i)) + errmsg = "RAW error: output file '{0}', differs from golden '{1}' in cap #{2}".format(output, golden, i) + print(errmsg) + + print(format_text("\ndifferent fields for packet #{0}:".format(i), 'underline')) + scapy_pkt1_info = self.scapy_pkt_show_to_str(Ether(pkt1[0])).split('\n') + scapy_pkt2_info = self.scapy_pkt_show_to_str(Ether(pkt2[0])).split('\n') + + print(format_text("\nGot:\n", 'bold', 'underline')) + for line, ref in zip(scapy_pkt1_info, scapy_pkt2_info): + if line != ref: + print(format_text(line, 'bold')) + + print(format_text("\nExpected:\n", 'bold', 'underline')) + for line, ref in zip(scapy_pkt2_info, scapy_pkt1_info): + if line != ref: + print(format_text(line, 'bold')) + + print("\n") + raise AssertionError(errmsg) def run_sim (self, yaml, output, options = "", silent = False, obj = None): @@ -262,3 +297,14 @@ class CStlBasic_Test(functional_general_test.CGeneralFunctional_Test): + def test_multicore_scheduling (self): + mc_tests = ['stl/tests/single_cont.py', + 'stl/tests/single_burst.py', + 'stl/tests/multi_burst.py', + 'stl/tests/many_streams.py', + ] + + for mc_test in mc_tests: + rc = self.run_sim(mc_test, output = None, options = '--test_multi_core --limit=3840 -m 27kpps', silent = True) + assert_equal(rc, True) + diff --git a/scripts/automation/regression/setups/kiwi02/benchmark.yaml b/scripts/automation/regression/setups/kiwi02/benchmark.yaml index 2d47f8f8..60febc8f 100644 --- a/scripts/automation/regression/setups/kiwi02/benchmark.yaml +++ b/scripts/automation/regression/setups/kiwi02/benchmark.yaml @@ -122,26 +122,31 @@ test_rx_check_sfr: multiplier : 25 cores : 4 rx_sample_rate : 32 + error_tolerance : 0.01 test_rx_check_http: multiplier : 40000 cores : 2 rx_sample_rate : 32 + error_tolerance : 0.01 test_rx_check_sfr_ipv6: multiplier : 25 cores : 4 rx_sample_rate : 32 + error_tolerance : 0.01 test_rx_check_http_ipv6: multiplier : 40000 cores : 2 rx_sample_rate : 32 + error_tolerance : 0.01 test_rx_check_http_negative: multiplier : 40000 cores : 2 rx_sample_rate : 32 + error_tolerance : 0.01 test_jumbo: multiplier : 55 diff --git a/scripts/automation/regression/setups/trex-dan/benchmark.yaml b/scripts/automation/regression/setups/trex-dan/benchmark.yaml index 4b47bd8e..a31d070c 100644 --- a/scripts/automation/regression/setups/trex-dan/benchmark.yaml +++ b/scripts/automation/regression/setups/trex-dan/benchmark.yaml @@ -4,7 +4,7 @@ test_nbar_simple : multiplier : 1.5 - cores : 1 + cores : 2 exp_gbps : 0.5 cpu_to_core_ratio : 20800000 cpu2core_custom_dev: YES diff --git a/scripts/automation/regression/stateless_tests/stl_client_test.py b/scripts/automation/regression/stateless_tests/stl_client_test.py index 01a90250..3ef4713f 100644 --- a/scripts/automation/regression/stateless_tests/stl_client_test.py +++ b/scripts/automation/regression/stateless_tests/stl_client_test.py @@ -240,22 +240,29 @@ class STLClient_Test(CStlGeneral_Test): def test_all_profiles (self): - # need promiscious for this one... - if self.is_virt_nics or not self.is_loopback: - self.skip('skipping profile tests for virtual NICs') - return try: - self.c.set_port_attr(ports = [self.tx_port, self.rx_port], promiscuous = True) - + for profile in self.profiles: + print("now testing profile {0}...\n").format(profile) p1 = STLProfile.load(profile, port_id = self.tx_port) p2 = STLProfile.load(profile, port_id = self.rx_port) + # if profile contains custom MAC addrs we need promiscuous mode + # but virtual NICs does not support promiscuous mode + self.c.set_port_attr(ports = [self.tx_port, self.rx_port], promiscuous = False) + + if p1.has_custom_mac_addr(): + if not self.is_virt_nics: + self.c.set_port_attr(ports = [self.tx_port, self.rx_port], promiscuous = True) + else: + print("\n*** profile needs promiscuous mode but running on virtual NICs - skipping... ***\n") + continue + if p1.has_flow_stats(): - print("profile needs RX caps - skipping...") + print("\n*** profile needs RX caps - skipping... ***\n") continue self.c.add_streams(p1, ports = self.tx_port) @@ -280,9 +287,8 @@ class STLClient_Test(CStlGeneral_Test): assert self.tx_port in stats, '{0} - no stats for TX port'.format(profile) assert self.rx_port in stats, '{0} - no stats for RX port'.format(profile) - assert stats[self.tx_port]['opackets'] == stats[self.rx_port]['ipackets'], '{0} - number of TX packets differ from RX packets'.format(profile) - - assert stats[self.rx_port]['opackets'] == stats[self.tx_port]['ipackets'], '{0} - number of TX packets differ from RX packets'.format(profile) + self.verify(stats[self.tx_port]['opackets'], stats[self.rx_port]['ipackets']) + self.verify(stats[self.rx_port]['opackets'], stats[self.tx_port]['ipackets']) self.c.remove_all_streams(ports = [self.tx_port, self.rx_port]) diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py index 1d89a599..11e80b9a 100644 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_sim.py @@ -22,6 +22,7 @@ from .trex_stl_streams import * from .utils import parsing_opts from .trex_stl_client import STLClient from .utils import pcap +from trex_stl_lib.trex_stl_packet_builder_scapy import RawPcapReader, RawPcapWriter, hexdump from yaml import YAMLError @@ -291,13 +292,13 @@ class STLSim(object): return - print("Mering cores output to a single pcap file...\n") + if not self.silent: + print("Mering cores output to a single pcap file...\n") inputs = ["{0}-{1}".format(self.outfile, index) for index in range(0, self.dp_core_count)] pcap.merge_cap_files(inputs, self.outfile, delete_src = True) - def is_valid_file(filename): if not os.path.isfile(filename): raise argparse.ArgumentTypeError("The file '%s' does not exist" % filename) @@ -421,6 +422,11 @@ def setParserOptions(): action = "store_true", default = False) + group.add_argument("--test_multi_core", + help = "runs the profile with c=1-8", + action = "store_true", + default = False) + return parser @@ -435,6 +441,110 @@ def validate_args (parser, options): parser.error("limit cannot be lower than number of DP cores") +# a more flexible check +def compare_caps (cap1, cap2, max_diff_sec = (5 * 1e-6)): + pkts1 = list(RawPcapReader(cap1)) + pkts2 = list(RawPcapReader(cap2)) + + if len(pkts1) != len(pkts2): + print('{0} contains {1} packets vs. {2} contains {3} packets'.format(cap1, len(pkts1), cap2, len(pkts2))) + return False + + # to be less strict we define equality if all packets from cap1 exists and in cap2 + # and vice versa + # 'exists' means the same packet with abs(TS1-TS2) < 5nsec + # its O(n^2) but who cares, right ? + for i, pkt1 in enumerate(pkts1): + ts1 = float(pkt1[1][0]) + (float(pkt1[1][1]) / 1e6) + found = None + for j, pkt2 in enumerate(pkts2): + ts2 = float(pkt2[1][0]) + (float(pkt2[1][1]) / 1e6) + + if abs(ts1-ts2) > max_diff_sec: + break + + if pkt1[0] == pkt2[0]: + found = j + break + + + if found is None: + print(format_text("cannot find packet #{0} from {1} in {2}\n".format(i, cap1, cap2), 'bold')) + return False + else: + del pkts2[found] + + return True + + + + +# a more strict comparsion 1 <--> 1 +def compare_caps_strict (cap1, cap2, max_diff_sec = (5 * 1e-6)): + pkts1 = list(RawPcapReader(cap1)) + pkts2 = list(RawPcapReader(cap2)) + + if len(pkts1) != len(pkts2): + print('{0} contains {1} packets vs. {1} contains {2} packets'.format(cap1, len(pkts1), cap2, len(pkts2))) + return False + + # a strict check + for pkt1, pkt2, i in zip(pkts1, pkts2, range(1, len(pkts1))): + ts1 = float(pkt1[1][0]) + (float(pkt1[1][1]) / 1e6) + ts2 = float(pkt2[1][0]) + (float(pkt2[1][1]) / 1e6) + + if abs(ts1-ts2) > 0.000005: # 5 nsec + print(format_text("TS error: cap files '{0}', '{1}' differ in cap #{2} - '{3}' vs. '{4}'\n".format(cap1, cap2, i, ts1, ts2), 'bold')) + return False + + if pkt1[0] != pkt2[0]: + print(format_text("RAW error: cap files '{0}', '{1}' differ in cap #{2}\n".format(cap1, cap2, i), 'bold')) + print(hexdump(pkt1[0])) + print("") + print(hexdump(pkt2[0])) + print("") + return False + + return True + +# +def test_multi_core (r, options): + + for core_count in [1, 2, 4, 6, 8]: + r.run(input_list = options.input_file, + outfile = '{0}.cap'.format(core_count), + dp_core_count = core_count, + is_debug = (not options.release), + pkt_limit = options.limit, + mult = options.mult, + duration = options.duration, + mode = 'none', + silent = True, + tunables = options.tunables) + + print("") + + print(format_text("comparing 2 cores to 1 core:\n", 'underline')) + rc = compare_caps('1.cap', '2.cap') + if rc: + print("[Passed]\n") + + print(format_text("comparing 4 cores to 1 core:\n", 'underline')) + rc = compare_caps('1.cap', '4.cap') + if rc: + print("[Passed]\n") + + print(format_text("comparing 6 cores to 1 core:\n", 'underline')) + rc = compare_caps('1.cap', '6.cap') + if rc: + print("[Passed]\n") + + print(format_text("comparing 8 cores to 1 core:\n", 'underline')) + rc = compare_caps('1.cap', '8.cap') + if rc: + print("[Passed]\n") + + def main (args = None): parser = setParserOptions() options = parser.parse_args(args = args) @@ -455,23 +565,28 @@ def main (args = None): mode = 'native' elif options.pkt: mode = 'pkt' + elif options.test_multi_core: + mode = 'test_multi_core' else: mode = 'none' try: r = STLSim(bp_sim_path = options.bp_sim_path, port_id = options.port_id) - r.run(input_list = options.input_file, - outfile = options.output_file, - dp_core_count = options.dp_core_count, - dp_core_index = options.dp_core_index, - is_debug = (not options.release), - pkt_limit = options.limit, - mult = options.mult, - duration = options.duration, - mode = mode, - silent = options.silent, - tunables = options.tunables) + if mode == 'test_multi_core': + test_multi_core(r, options) + else: + r.run(input_list = options.input_file, + outfile = options.output_file, + dp_core_count = options.dp_core_count, + dp_core_index = options.dp_core_index, + is_debug = (not options.release), + pkt_limit = options.limit, + mult = options.mult, + duration = options.duration, + mode = mode, + silent = options.silent, + tunables = options.tunables) except KeyboardInterrupt as e: print("\n\n*** Caught Ctrl + C... Exiting...\n\n") diff --git a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py index 3ce876ad..165942d8 100755 --- a/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py +++ b/scripts/automation/trex_control_plane/stl/trex_stl_lib/trex_stl_streams.py @@ -361,6 +361,8 @@ class STLStream(object): int_mac_dst_override_mode = int(mac_dst_override_mode); + self.is_default_mac = not (int_mac_src_override_by_pkt or int_mac_dst_override_mode) + self.fields['flags'] = (int_mac_src_override_by_pkt&1) + ((int_mac_dst_override_mode&3)<<1) self.fields['action_count'] = action_count @@ -421,6 +423,10 @@ class STLStream(object): return self.id + def has_custom_mac_addr (self): + """ Return True if src or dst MAC were set as custom """ + return not self.is_default_mac + def get_name (self): """ Get the stream name """ return self.name @@ -835,6 +841,9 @@ class STLProfile(object): def is_pauseable (self): return all([x.get_mode() == "Continuous" for x in self.get_streams()]) + def has_custom_mac_addr (self): + return any([x.has_custom_mac_addr() for x in self.get_streams()]) + def has_flow_stats (self): return any([x.has_flow_stats() for x in self.get_streams()]) diff --git a/scripts/exp/imix.pcap b/scripts/exp/imix.pcap Binary files differindex aec8dac8..dff21f25 100644 --- a/scripts/exp/imix.pcap +++ b/scripts/exp/imix.pcap diff --git a/scripts/exp/imix_3pkt.pcap b/scripts/exp/imix_3pkt.pcap Binary files differindex 29e84d63..065a23fa 100644 --- a/scripts/exp/imix_3pkt.pcap +++ b/scripts/exp/imix_3pkt.pcap diff --git a/scripts/exp/imix_3pkt_vm.pcap b/scripts/exp/imix_3pkt_vm.pcap Binary files differindex 5af466d9..4a97280d 100644 --- a/scripts/exp/imix_3pkt_vm.pcap +++ b/scripts/exp/imix_3pkt_vm.pcap diff --git a/scripts/exp/pcap_with_vm.pcap b/scripts/exp/pcap_with_vm.pcap Binary files differindex b9476261..afc4bbef 100644 --- a/scripts/exp/pcap_with_vm.pcap +++ b/scripts/exp/pcap_with_vm.pcap diff --git a/scripts/exp/udp_1pkt_range_clients_split.pcap b/scripts/exp/udp_1pkt_range_clients_split.pcap Binary files differindex fc5572a8..fb5037cc 100644 --- a/scripts/exp/udp_1pkt_range_clients_split.pcap +++ b/scripts/exp/udp_1pkt_range_clients_split.pcap diff --git a/scripts/exp/udp_1pkt_simple_test.pcap b/scripts/exp/udp_1pkt_simple_test.pcap Binary files differindex 2eeec462..a1d3a2e0 100644 --- a/scripts/exp/udp_1pkt_simple_test.pcap +++ b/scripts/exp/udp_1pkt_simple_test.pcap diff --git a/scripts/exp/udp_1pkt_simple_test2.pcap b/scripts/exp/udp_1pkt_simple_test2.pcap Binary files differindex 002d77dc..2cf16a8f 100644 --- a/scripts/exp/udp_1pkt_simple_test2.pcap +++ b/scripts/exp/udp_1pkt_simple_test2.pcap diff --git a/scripts/exp/udp_1pkt_tuple_gen_split.pcap b/scripts/exp/udp_1pkt_tuple_gen_split.pcap Binary files differindex 08377c6d..873ab47f 100644 --- a/scripts/exp/udp_1pkt_tuple_gen_split.pcap +++ b/scripts/exp/udp_1pkt_tuple_gen_split.pcap diff --git a/scripts/stl/imix.py b/scripts/stl/imix.py index 65e35108..82edbfa5 100644 --- a/scripts/stl/imix.py +++ b/scripts/stl/imix.py @@ -8,8 +8,8 @@ class STLImix(object): def __init__ (self): # default IP range - self.ip_range = {'src': {'start': "10.0.0.1", 'end': "10.0.0.254"}, - 'dst': {'start': "8.0.0.1", 'end': "8.0.0.254"}} + self.ip_range = {'src': {'start': "16.0.0.1", 'end': "16.0.0.254"}, + 'dst': {'start': "48.0.0.1", 'end': "48.0.0.254"}} # default IMIX properties self.imix_table = [ {'size': 60, 'pps': 28, 'isg':0 }, diff --git a/scripts/stl/pcap_with_vm.py b/scripts/stl/pcap_with_vm.py index 7cf2906b..4e85bdf4 100644 --- a/scripts/stl/pcap_with_vm.py +++ b/scripts/stl/pcap_with_vm.py @@ -34,7 +34,7 @@ class STLPcap(object): ipg_usec = 10.0, loop_count = 5, ip_src_range = None, - ip_dst_range = {'start' : '10.0.0.1', 'end': '10.0.0.254'}, + ip_dst_range = {'start' : '16.0.0.1', 'end': '16.0.0.254'}, **kwargs): vm = self.create_vm(ip_src_range, ip_dst_range) diff --git a/scripts/stl/tests/many_streams.py b/scripts/stl/tests/many_streams.py new file mode 100644 index 00000000..a8713a26 --- /dev/null +++ b/scripts/stl/tests/many_streams.py @@ -0,0 +1,50 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def get_streams (self, direction = 0, **kwargs): + s1 = STLStream(name = 's1', + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(pps = 100, total_pkts = 7), + next = 's2' + + ) + s2 = STLStream(name = 's2', + self_start = False, + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.2")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(pps = 317, total_pkts = 13), + next = 's3' + ) + + + s3 = STLStream(name = 's3', + self_start = False, + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.3")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXMultiBurst(pps = 57, pkts_per_burst = 3, count = 5, ibg = 12), + next = 's4' + ) + + s4 = STLStream(name = 's4', + self_start = False, + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.3")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(pps = 4, total_pkts = 22), + next = 's5' + ) + + s5 = STLStream(name = 's5', + self_start = False, + packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.3")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(pps = 17, total_pkts = 27), + action_count = 17, + next = 's1' + ) + + return [ s1, s2, s3, s4, s5 ] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + diff --git a/scripts/stl/tests/multi_burst.py b/scripts/stl/tests/multi_burst.py new file mode 100644 index 00000000..68a239f5 --- /dev/null +++ b/scripts/stl/tests/multi_burst.py @@ -0,0 +1,17 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def get_streams (self, direction = 0, **kwargs): + s1 = STLStream(packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXMultiBurst(pkts_per_burst = 9, count = 2, ibg = 13)) + + return [s1] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + diff --git a/scripts/stl/tests/single_burst.py b/scripts/stl/tests/single_burst.py new file mode 100644 index 00000000..c46ebf87 --- /dev/null +++ b/scripts/stl/tests/single_burst.py @@ -0,0 +1,17 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def get_streams (self, direction = 0, **kwargs): + s1 = STLStream(packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXSingleBurst(total_pkts = 27)) + + return [s1] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + diff --git a/scripts/stl/tests/single_cont.py b/scripts/stl/tests/single_cont.py new file mode 100644 index 00000000..19563105 --- /dev/null +++ b/scripts/stl/tests/single_cont.py @@ -0,0 +1,17 @@ +from trex_stl_lib.api import * + +class STLS1(object): + + def get_streams (self, direction = 0, **kwargs): + s1 = STLStream(packet = STLPktBuilder(pkt = Ether()/IP(src="16.0.0.1",dst="48.0.0.1")/UDP(dport=12,sport=1025)/(10*'x')), + mode = STLTXCont(pps = 2000)) + + return [s1] + + +# dynamic load - used for trex console or simulator +def register(): + return STLS1() + + + diff --git a/scripts/stl/udp_1pkt_simple_test.py b/scripts/stl/udp_1pkt_simple_test.py index 3915412d..5f08af9d 100644 --- a/scripts/stl/udp_1pkt_simple_test.py +++ b/scripts/stl/udp_1pkt_simple_test.py @@ -15,7 +15,7 @@ class STLS1(object): base_pkt_a = Ether()/IP(dst="48.0.0.1",options=IPOption(b'\x01\x01\x01\x00'))/UDP(dport=12,sport=1025) vm1 = STLScVmRaw([ - STLVmFlowVar(name="src",min_value="10.0.0.1",max_value="10.0.0.10",size=4,op="inc"), + STLVmFlowVar(name="src",min_value="16.0.0.1",max_value="16.0.0.10",size=4,op="inc"), STLVmWrFlowVar(fv_name="src",pkt_offset= "IP.src"), # checksum STLVmFixIpv4(offset = "IP") diff --git a/scripts/stl/udp_1pkt_simple_test2.py b/scripts/stl/udp_1pkt_simple_test2.py index 617d98b3..190e5439 100644 --- a/scripts/stl/udp_1pkt_simple_test2.py +++ b/scripts/stl/udp_1pkt_simple_test2.py @@ -15,7 +15,7 @@ class STLS1(object): base_pkt_a = Ether()/IP()/IPv6()/IP(dst="48.0.0.1",options=IPOption(b'\x01\x01\x01\x00'))/UDP(dport=12,sport=1025) vm1 = STLScVmRaw([ - STLVmFlowVar(name="src",min_value="10.0.0.1",max_value="10.0.0.10",size=4,op="inc"), + STLVmFlowVar(name="src",min_value="16.0.0.1",max_value="16.0.0.10",size=4,op="inc"), STLVmWrFlowVar(fv_name="src",pkt_offset= "IP:1.src"), # checksum STLVmFixIpv4(offset = "IP:1") |