From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5199FA2EFC for ; Fri, 20 Sep 2019 08:55:53 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0C2451F2E0; Fri, 20 Sep 2019 08:55:53 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id DFE571F2DF for ; Fri, 20 Sep 2019 08:55:50 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Sep 2019 23:55:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,527,1559545200"; d="scan'208";a="202448841" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 19 Sep 2019 23:55:49 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Sep 2019 23:55:48 -0700 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 19 Sep 2019 23:55:47 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.32]) by shsmsx102.ccr.corp.intel.com ([169.254.2.113]) with mapi id 14.03.0439.000; Fri, 20 Sep 2019 14:55:45 +0800 From: "Chen, Zhaoyan" To: "Han, YingyaX" , "dts@dpdk.org" CC: "Han, YingyaX" , "Chen, Zhaoyan" Thread-Topic: [dts] [PATCH V1]tests/l3fwd: fix Ipv6 66Bit linerate calculation error and remove the old route Thread-Index: AQHVYuXypJyGol+RHk6k2l5HGJ+Hnqc0Ot0g Date: Fri, 20 Sep 2019 06:55:45 +0000 Message-ID: <9DEEADBC57E43F4DA73B571777FECECA41DB668A@SHSMSX104.ccr.corp.intel.com> References: <20190904135926.114476-1-yingyax.han@intel.com> In-Reply-To: <20190904135926.114476-1-yingyax.han@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1]tests/l3fwd: fix Ipv6 66Bit linerate calculation error and remove the old route X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Acked-by: Chen, Zhaoyan > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of hanyingya > Sent: Wednesday, September 4, 2019 9:59 PM > To: dts@dpdk.org > Cc: Han, YingyaX > Subject: [dts] [PATCH V1]tests/l3fwd: fix Ipv6 66Bit linerate calculation= error and > remove the old route >=20 > As DPDK changed l3fwd default route in commit:37afe381bde4277, here we ta= ke the > default route in l3fwd instead of the old one in DTS. >=20 > Signed-off-by: hanyingya > --- > tests/TestSuite_l3fwd.py | 104 ++++++++++----------------------------- > 1 file changed, 27 insertions(+), 77 deletions(-) >=20 > diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py index > afac1c8..aaac8d8 100644 > --- a/tests/TestSuite_l3fwd.py > +++ b/tests/TestSuite_l3fwd.py > @@ -48,62 +48,18 @@ class TestL3fwd(TestCase): >=20 > path =3D "./examples/l3fwd/build/" > cmdline_2_ports =3D { > - "1S/1C/1T": "%s -c %s -n %d -- -p %s -P --config '(P0,0,C{1.1.0}= ), > (P1,0,C{1.1.0})'", > - "1S/1C/2T": "%s -c %s -n %d -- -p %s -P --config '(P0,0,C{1.1.0}= ), > (P1,0,C{1.1.1})'", > - "1S/2C/1T": "%s -c %s -n %d -- -p %s -P --config '(P0,0,C{1.1.0}= ), > (P1,0,C{1.2.0})'", > - "1S/4C/1T": "%s -c %s -n %d -- -p %s -P --config '(P0,0,C{1.1.0}= ), > (P1,0,C{1.2.0}), (P0,1,C{1.3.0}), (P1,1,C{1.4.0})'"} > + "1S/1C/1T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), > (P1,0,C{1.1.0})'", > + "1S/1C/2T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), > (P1,0,C{1.1.1})'", > + "1S/2C/1T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), > (P1,0,C{1.2.0})'", > + "1S/4C/1T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), > + (P1,0,C{1.2.0}), (P0,1,C{1.3.0}), (P1,1,C{1.4.0})'"} >=20 > cmdline_4_ports =3D { > - "1S/1C/1T": "%s -c %s -n %d -- -p %s -P --config '(P0,0,C{1.1.0}= ), > (P1,0,C{1.1.0}), (P2,0,C{1.1.0}), (P3,0,C{1.1.0})'", > - "1S/2C/2T": "%s -c %s -n %d -- -p %s -P --config '(P0,0,C{1.1.0}= ), > (P1,0,C{1.1.1}), (P2,0,C{1.2.0}), (P3,0,C{1.2.1})'", > - "1S/4C/1T": "%s -c %s -n %d -- -p %s -P --config '(P0,0,C{1.1.0}= ), > (P1,0,C{1.2.0}), (P2,1,C{1.3.0}), (P3,1,C{1.4.0})'", > - "1S/8C/1T": "%s -c %s -n %d -- -p %s -P --config '(P0,0,C{1.1.0}= ), > (P1,0,C{1.2.0}), (P2,0,C{1.3.0}), (P3,0,C{1,4,0}),\ > + "1S/1C/1T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), = (P1,0,C{1.1.0}), > (P2,0,C{1.1.0}), (P3,0,C{1.1.0})'", > + "1S/2C/2T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), = (P1,0,C{1.1.1}), > (P2,0,C{1.2.0}), (P3,0,C{1.2.1})'", > + "1S/4C/1T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), = (P1,0,C{1.2.0}), > (P2,1,C{1.3.0}), (P3,1,C{1.4.0})'", > + "1S/8C/1T": "%s -c %s -n %d -- -p %s --config '(P0,0,C{1.1.0}), > + (P1,0,C{1.2.0}), (P2,0,C{1.3.0}), (P3,0,C{1,4,0}),\ > (P0,1,C{1.5.0}), (P1,1,C{1.6.0}), (P2,1,C{1.7.0}), (P3,1,C{1,8,0= })'"} >=20 > - ipv4_em_table =3D [ > - "{{IPv4(10,100,0,1), IPv4(1,2,3,4), 1, 10, IPPROTO_UDP}, P0}", > - "{{IPv4(10,101,0,1), IPv4(1,2,3,4), 1, 10, IPPROTO_UDP}, P0}", > - "{{IPv4(11,100,0,1), IPv4(1,2,3,4), 1, 11, IPPROTO_UDP}, P1}", > - "{{IPv4(11,101,0,1), IPv4(1,2,3,4), 1, 11, IPPROTO_UDP}, P1}", > - "{{IPv4(12,100,0,1), IPv4(1,2,3,4), 1, 12, IPPROTO_UDP}, P2}", > - "{{IPv4(12,101,0,1), IPv4(1,2,3,4), 1, 12, IPPROTO_UDP}, P2}", > - "{{IPv4(13,100,0,1), IPv4(1,2,3,4), 1, 13, IPPROTO_UDP}, P3}", > - "{{IPv4(13,101,0,1), IPv4(1,2,3,4), 1, 13, IPPROTO_UDP}, P3}", > - ] > - > - ipv4_lpm_table =3D [ > - "{IPv4(10,100,0,0), 24, P0}", > - "{IPv4(10,101,0,0), 24, P0}", > - "{IPv4(11,100,0,0), 24, P1}", > - "{IPv4(11,101,0,0), 24, P1}", > - "{IPv4(12,100,0,0), 24, P2}", > - "{IPv4(12,101,0,0), 24, P2}", > - "{IPv4(13,100,0,0), 24, P3}", > - "{IPv4(13,101,0,0), 24, P3}", > - ] > - > - ipv6_em_table =3D [ > - "{{{0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1b, = 0x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,= 0x1e, > 0x67, 0xff, 0xfe, 0x0d, 0xb6, 0x0a}, 1, 10, IPPROTO_UDP}, P0}", > - "{{{0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1b, = 0x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,= 0x1e, > 0x67, 0xff, 0xfe, 0x0d, 0xb6, 0x0a}, 1, 10, IPPROTO_UDP}, P0}", > - "{{{0x2a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1b, = 0x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,= 0x1e, > 0x67, 0xff, 0xfe, 0x0d, 0xb6, 0x0a}, 1, 11, IPPROTO_UDP}, P1}", > - "{{{0x2a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1b, = 0x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,= 0x1e, > 0x67, 0xff, 0xfe, 0x0d, 0xb6, 0x0a}, 1, 11, IPPROTO_UDP}, P1}", > - "{{{0x2b, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1b, = 0x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,= 0x1e, > 0x67, 0xff, 0xfe, 0x0d, 0xb6, 0x0a}, 1, 12, IPPROTO_UDP}, P2}", > - "{{{0x2b, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1b, = 0x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,= 0x1e, > 0x67, 0xff, 0xfe, 0x0d, 0xb6, 0x0a}, 1, 12, IPPROTO_UDP}, P2}", > - "{{{0x2c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1b, = 0x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,= 0x1e, > 0x67, 0xff, 0xfe, 0x0d, 0xb6, 0x0a}, 1, 13, IPPROTO_UDP}, P3}", > - "{{{0x2c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x1b, = 0x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, {0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,= 0x1e, > 0x67, 0xff, 0xfe, 0x0d, 0xb6, 0x0a}, 1, 13, IPPROTO_UDP}, P3}", > - ] > - > - ipv6_lpm_table =3D [ > - "{{0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1b, 0= x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, 64,P0}", > - "{{0xfe, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1b, 0= x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, 64,P0}", > - "{{0x2a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1b, 0= x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, 64,P1}", > - "{{0x2a, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1b, 0= x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, 64,P1}", > - "{{0x2b, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1b, 0= x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, 64,P2}", > - "{{0x2b, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1b, 0= x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, 64,P2}", > - "{{0x2c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x1b, 0= x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, 64,P3}", > - "{{0x2c, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x1b, 0= x21, 0xff, 0xfe, > 0x91, 0x38, 0x05}, 64,P3}", > - ] > - > def set_up_all(self): > """ > Run at the start of each test suite. > @@ -136,8 +92,6 @@ class TestL3fwd(TestCase): > + "define RTE_TEST_RX_DESC_DEFAULT > 2048/' ./examples/l3fwd/main.c", "#", 20) > self.dut.send_expect("sed -i -e 's/define RTE_TEST_TX_DESC_DEFAU= LT.*$/" > + "define RTE_TEST_TX_DESC_DEFAULT > 2048/' ./examples/l3fwd/main.c", "#", 20) > - self.method_table =3D {"ipv4_l3fwd_lpm": TestL3fwd.ipv4_lpm_tabl= e, > "ipv4_l3fwd_em": TestL3fwd.ipv4_em_table, > - "ipv6_l3fwd_lpm": TestL3fwd.ipv6_lpm_table,= "ipv6_l3fwd_em": > TestL3fwd.ipv6_em_table} >=20 > self.pat =3D re.compile("P([0123])") > self.test_results =3D {'header': [], 'data': []} @@ -174,13 +128= ,6 @@ class > TestL3fwd(TestCase): > Prepare long prefix match table, replace P(x) port pattern > """ > l3fwd_method =3D l3_proto + "_l3fwd_" + mode > - l3fwdStr =3D "static struct %s_route %s_route_array[] =3D {\\\n"= % (l3fwd_method, > l3fwd_method) > - for idx in range(len(self.method_table[l3fwd_method])): > - self.method_table[l3fwd_method][idx] =3D self.pat.sub(self.p= ortRepl, > self.method_table[l3fwd_method][idx]) > - l3fwdStr =3D l3fwdStr + '' * 4 + self.method_table[l3fwd_met= hod][idx] + ",\\\n" > - l3fwdStr =3D l3fwdStr + "};" > - self.dut.send_expect(r"sed -i '/%s_route_array\[\].*{/,/^\}\;/c\= \%s' > examples/l3fwd/l3fwd_%s.c" > - % (l3fwd_method, l3fwdStr, mode), "# ") > self.dut.send_expect("make clean -C examples/l3fwd", "# ") > if "lpm" in l3fwd_method: > out =3D self.dut.build_dpdk_apps("./examples/l3fwd", "USER_F= LAGS=3D- > DAPP_LOOKUP_METHOD=3D1") > @@ -256,10 +203,7 @@ class TestL3fwd(TestCase): > if l3_proto =3D=3D 'ipv4': > payload_size =3D frame_size - HEADER_SIZE['eth'] - HEADER_SI= ZE['ip'] - > HEADER_SIZE['udp'] > else: > - # l3_proto =3D=3D 'ipv6' > payload_size =3D frame_size - HEADER_SIZE['eth'] - HEADER_SI= ZE['ipv6'] - > HEADER_SIZE['udp'] > - if frame_size =3D=3D 64: > - payload_size =3D frame_size + 2 - HEADER_SIZE['eth'] - H= EADER_SIZE['ipv6'] - > HEADER_SIZE['udp'] >=20 > pcaps =3D {} > for _port in valports: > @@ -313,12 +257,20 @@ class TestL3fwd(TestCase): > # perpare commandline and core mask > rtCmdLines, core_mask =3D self.perpare_commandline(len(valports)= ) >=20 > - for cores in rtCmdLines.keys(): > - # Start L3fwd appliction > - command_line =3D rtCmdLines[cores] % (TestL3fwd.path + l3_pr= oto + "_l3fwd_" > + mode, core_mask[cores], > - self.dut.get_memory_chan= nels(), > utils.create_mask(valports)) > - self.dut.send_expect(command_line, "L3FWD:", 120) > - for frame_size in self.frame_sizes: > + for frame_size in self.frame_sizes: > + if l3_proto =3D=3D "ipv6" and frame_size =3D=3D 64: > + frame_size +=3D 2 > + for cores in rtCmdLines.keys(): > + # Start L3fwd appliction > + command_line =3D rtCmdLines[cores] % (TestL3fwd.path + l= 3_proto + > "_l3fwd_" + mode, core_mask[cores], > + self.dut.get_memory_= channels(), > utils.create_mask(valports)) > + if self.nic =3D=3D "niantic": > + command_line +=3D " --parse-ptype" > + if frame_size > 1518: > + command_line +=3D " --enable-jumbo --max-pkt-len %d"= % frame_size > + self.dut.send_expect(command_line, "L3FWD:", 120) > + self.logger.info("Executing l3fwd using %s mode, %d port= s, %s and %d > frame size" > + % (mode, len(valports), cores, > + frame_size)) > # crete traffic flow > pcaps =3D self.create_pcap_file(frame_size, l3_proto) > # send the traffic and Measure test @@ -337,14 +289,12 @= @ class > TestL3fwd(TestCase): > pps /=3D 1000000.0 > linerate =3D self.wirespeed(self.nic, frame_size, len(va= lports)) > percentage =3D pps * 100 / linerate > - if mode =3D=3D "ipv6" and frame_size =3D=3D 64: > - frame_size +=3D 2 > data_row =3D [frame_size, mode, cores, str(pps), str(per= centage)] > self.result_table_add(data_row) > self.test_results['data'].append(data_row) > - # Stop L3fwd > - self.dut.send_expect("^C", "#") > - time.sleep(1) > + # Stop L3fwd > + self.dut.send_expect("^C", "#") > + time.sleep(1) > # Print result > self.result_table_print() >=20 > @@ -360,6 +310,8 @@ class TestL3fwd(TestCase): > rtCmdLines, core_mask =3D self.perpare_commandline(len(valports)= ) >=20 > for frame_size in self.frame_sizes: > + if mode =3D=3D "ipv6" and frame_size =3D=3D 64: > + frame_size +=3D 2 > for cores in rtCmdLines.keys(): > # in order to save time, only some of the cases will be = run. > if cores in ["1S/2C/1T", "1S/4C/1T"]: > @@ -390,8 +342,6 @@ class TestL3fwd(TestCase): > # statistical result > linerate =3D self.wirespeed(self.nic, frame_size, le= n(valports)) > zero_loss_throughput =3D (linerate * zero_loss_rate)= / 100 > - if mode =3D=3D "ipv6" and frame_size =3D=3D 64: > - frame_size +=3D 2 > data_row =3D [frame_size, mode, cores, str(zero_loss= _throughput), > str(zero_loss_rate)] > self.result_table_add(data_row) > self.test_results['data'].append(data_row) > -- > 2.17.1