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 D11D1A051A; Fri, 17 Jan 2020 06:33:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BE8E31D171; Fri, 17 Jan 2020 06:33:01 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 1208A1D16F for ; Fri, 17 Jan 2020 06:32:59 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 16 Jan 2020 21:32:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,328,1574150400"; d="scan'208";a="373556333" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga004.jf.intel.com with ESMTP; 16 Jan 2020 21:32:57 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 16 Jan 2020 21:32:45 -0800 Received: from fmsmsx608.amr.corp.intel.com (10.18.126.88) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Thu, 16 Jan 2020 21:32:45 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx608.amr.corp.intel.com (10.18.126.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.1713.5 via Frontend Transport; Thu, 16 Jan 2020 21:32:44 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.30]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.197]) with mapi id 14.03.0439.000; Fri, 17 Jan 2020 13:32:43 +0800 From: "Tu, Lijuan" To: "Han, YingyaX" , "dts@dpdk.org" CC: "Han, YingyaX" Thread-Topic: [dts] [PATCH V2]nic_single_core_perf: support CVL nic single core test Thread-Index: AQHVzFBmc+3Z8YILy0WKsfdZTC05YqfuVlsw Date: Fri, 17 Jan 2020 05:32:42 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBAC7CE@SHSMSX101.ccr.corp.intel.com> References: <1579167631-63456-1-git-send-email-yingyax.han@intel.com> In-Reply-To: <1579167631-63456-1-git-send-email-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 V2]nic_single_core_perf: support CVL nic single core test 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" Hi yingya, Applied failed, please rework it. > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of han,yingya > Sent: Thursday, January 16, 2020 5:41 PM > To: dts@dpdk.org > Cc: Han, YingyaX > Subject: [dts] [PATCH V2]nic_single_core_perf: support CVL nic single cor= e > test >=20 > From: hanyingya >=20 > Signed-off-by: hanyingya > --- > tests/TestSuite_nic_single_core_perf.py | 88 +++++++++++++++---------- > 1 file changed, 55 insertions(+), 33 deletions(-) >=20 > diff --git a/tests/TestSuite_nic_single_core_perf.py > b/tests/TestSuite_nic_single_core_perf.py > index f43b5db..3108957 100644 > --- a/tests/TestSuite_nic_single_core_perf.py > +++ b/tests/TestSuite_nic_single_core_perf.py > @@ -53,17 +53,21 @@ class TestNicSingleCorePerf(TestCase): > Run at the start of each test suite. > PMD prerequisites. > """ > - self.verify(self.nic in ['niantic', 'fortville_25g', 'fortville_= spirit', > - 'ConnectX5_MT4121', 'ConnectX4_LX_MT411= 7'], > + self.verify(self.nic in ['niantic', 'fortville_25g', 'fortville_= spirit', > 'ConnectX5_MT4121', > + 'ConnectX4_LX_MT4117', > + 'columbiaville_100g', 'columbiaville_25g'], > "Not required NIC ") >=20 > self.headers_size =3D HEADER_SIZE['eth'] + HEADER_SIZE['ip'] >=20 > - # Update DPDK config file and rebuild to get best perf on fortvi= lle > + # Update DPDK config file and rebuild to get best perf on fortvi= lle and > columbiaville. > if self.nic in ["fortville_25g", "fortville_spirit"]: > self.dut.send_expect( > "sed -i -e > 's/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=3Dn/CONFIG_RTE_LIBRTE_I40E > _16BYTE_RX_DESC=3Dy/' ./config/common_base", "#", 20) > self.dut.build_install_dpdk(self.target) > + elif self.nic in ["columbiaville_100g", "columbiaville_25g"]: > + self.dut.send_expect( > + "sed -i -e > 's/CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC=3Dn/CONFIG_RTE_LIBRTE_ICE_1 > 6BYTE_RX_DESC=3Dy/' ./config/common_base", "#", 20) > + self.dut.build_install_dpdk(self.target) >=20 > # Based on h/w type, choose how many ports to use > self.dut_ports =3D self.dut.get_ports() @@ -135,41 +139,55 @@ cl= ass > TestNicSingleCorePerf(TestCase): > 'IP(src=3D"1.2.3.4",dst=3D"192.18.2.0")', > 'IP(src=3D"1.2.3.4",dst=3D"192.18.2.1")'] >=20 > - def create_pacap_file(self, frame_size): > + def create_pacap_file(self, frame_size, port_num): > """ > Prepare traffic flow > """ > payload_size =3D frame_size - HEADER_SIZE['ip'] - HEADER_SIZE['e= th'] > pcaps =3D {} > for _port in self.dut_ports: > - index =3D self.dut_ports[_port] > - cnt =3D 0 > - for layer in self.flows()[_port * 2:(_port + 1) * 2]: > - flow =3D ['Ether(src=3D"52:00:00:00:00:00")/%s/("X"*%d)'= % (layer, > payload_size)] > - pcap =3D os.sep.join([self.output_path, > "dst{0}_{1}.pcap".format(index, cnt)]) > + if 1 =3D=3D port_num: > + flow =3D ['Ether(src=3D"52:00:00:00:00:00")/%s/("X"*%d)'= % > (self.flows()[_port], payload_size)] > + pcap =3D os.sep.join([self.output_path, > + "dst{0}.pcap".format(_port)]) > self.tester.scapy_append('wrpcap("%s", [%s])' % (pcap, > string.join(flow, ','))) > self.tester.scapy_execute() > - if index not in pcaps: > - pcaps[index] =3D [] > - pcaps[index].append(pcap) > - cnt +=3D 1 > + pcaps[_port] =3D [] > + pcaps[_port].append(pcap) > + else: > + index =3D self.dut_ports[_port] > + cnt =3D 0 > + for layer in self.flows()[_port * 2:(_port + 1) * 2]: > + flow =3D ['Ether(src=3D"52:00:00:00:00:00")/%s/("X"*= %d)' % (layer, > payload_size)] > + pcap =3D os.sep.join([self.output_path, > "dst{0}_{1}.pcap".format(index, cnt)]) > + self.tester.scapy_append('wrpcap("%s", [%s])' % (pca= p, > string.join(flow, ','))) > + self.tester.scapy_execute() > + if index not in pcaps: > + pcaps[index] =3D [] > + pcaps[index].append(pcap) > + cnt +=3D 1 > return pcaps >=20 > - def prepare_stream(self, pcaps): > + def prepare_stream(self, pcaps, port_num): > """ > create streams for ports,one port one stream > """ > tgen_input =3D [] > - for rxPort in range(self.nb_ports): > - if rxPort % self.nb_ports =3D=3D 0 or self.nb_ports % rxPort= =3D=3D 2: > - txIntf =3D self.tester.get_local_port(self.dut_ports[rxP= ort + 1]) > - port_id =3D self.dut_ports[rxPort + 1] > - else: > - txIntf =3D self.tester.get_local_port(self.dut_ports[rxP= ort - 1]) > - port_id =3D self.dut_ports[rxPort - 1] > - rxIntf =3D self.tester.get_local_port(self.dut_ports[rxPort]= ) > - for pcap in pcaps[port_id]: > + if 1 =3D=3D port_num: > + txIntf =3D self.tester.get_local_port(self.dut_ports[0]) > + rxIntf =3D txIntf > + for pcap in pcaps[0]: > tgen_input.append((txIntf, rxIntf, pcap)) > + else: > + for rxPort in range(self.nb_ports): > + if rxPort % self.nb_ports =3D=3D 0 or self.nb_ports % rx= Port =3D=3D 2: > + txIntf =3D self.tester.get_local_port(self.dut_ports= [rxPort + 1]) > + port_id =3D self.dut_ports[rxPort + 1] > + else: > + txIntf =3D self.tester.get_local_port(self.dut_ports= [rxPort - 1]) > + port_id =3D self.dut_ports[rxPort - 1] > + rxIntf =3D self.tester.get_local_port(self.dut_ports[rxP= ort]) > + for pcap in pcaps[port_id]: > + tgen_input.append((txIntf, rxIntf, pcap)) > return tgen_input >=20 > def test_perf_nic_single_core(self): > @@ -177,8 +195,7 @@ class TestNicSingleCorePerf(TestCase): > Run nic single core performance > """ > self.nb_ports =3D len(self.dut_ports) > - self.verify(self.nb_ports =3D=3D 2 or self.nb_ports =3D=3D 4, > - "Require 2 or 4 ports to test") > + self.verify(self.nb_ports >=3D 1, "At least 1 port is required t= o > + test") > self.perf_test(self.nb_ports) > self.handle_results() >=20 > @@ -203,8 +220,7 @@ class TestNicSingleCorePerf(TestCase): > if load_global_setting(UPDATE_EXPECTED) =3D=3D "yes": > for frame_size in self.test_parameters.keys(): > for nb_desc in self.test_parameters[frame_size]: > - self.expected_throughput[frame_size][nb_desc] =3D \ > - round(self.throughput[frame_size][nb_desc], 3) > + self.expected_throughput[frame_size][nb_desc] =3D > + round(self.throughput[frame_size][nb_desc], 3) >=20 > def perf_test(self, port_num): > """ > @@ -212,12 +228,12 @@ class TestNicSingleCorePerf(TestCase): > """ > # ports whitelist > eal_para =3D "" > - for i in range(self.nb_ports): > + for i in range(port_num): > eal_para +=3D " -w " + self.dut.ports_info[i]['pci'] >=20 > # run testpmd with 2 cores, one for interaction ,and one for for= warding > core_config =3D "1S/2C/1T" > - core_list =3D self.dut.get_core_list(core_config, socket =3D sel= f.socket) > + core_list =3D self.dut.get_core_list(core_config, > + socket=3Dself.socket) > self.logger.info("Executing Test Using cores: %s" % core_list) > port_mask =3D utils.create_mask(self.dut_ports) >=20 > @@ -226,17 +242,20 @@ class TestNicSingleCorePerf(TestCase): > # fortville has to use 2 queues at least to get the best perform= ance > if self.nic in ["fortville_25g", "fortville_spirit"]: > param +=3D " --rxq=3D2 --txq=3D2" > + # columbiaville use one queue per port for best performance. > + elif self.nic in ["columbiaville_100g", "columbiaville_25g"]: > + param +=3D " --rxq=3D%d --rxq=3D%d" % (port_num, port_num) >=20 > for frame_size in self.test_parameters.keys(): > self.throughput[frame_size] =3D dict() > - pcaps =3D self.create_pacap_file(frame_size) > - tgenInput =3D self.prepare_stream(pcaps) > + pcaps =3D self.create_pacap_file(frame_size, port_num) > + tgenInput =3D self.prepare_stream(pcaps, port_num) > for nb_desc in self.test_parameters[frame_size]: > self.logger.info("Test running at parameters: " + > "framesize: {}, rxd/txd: {}".format(frame_size, nb_d= esc)) > parameter =3D param + " --txd=3D%d --rxd=3D%d" % (nb_des= c, nb_desc) > self.pmdout.start_testpmd( > - core_config, parameter, eal_para, socket =3D self.so= cket) > + core_config, parameter, eal_para, > + socket=3Dself.socket) > self.dut.send_expect("start", "testpmd> ", 15) >=20 > vm_config =3D self.set_fields() @@ -365,5 +384,8 @@ clas= s > TestNicSingleCorePerf(TestCase): > self.dut.send_expect( > "sed -i -e > 's/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=3Dy/CONFIG_RTE_LIBRTE_I40E > _16BYTE_RX_DESC=3Dn/' ./config/common_base", "#", 20) > self.dut.build_install_dpdk(self.target) > - > + elif self.nic in ["columbiaville_100g", "columbiaville_25g"]: > + self.dut.send_expect( > + "sed -i -e > 's/CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC=3Dy/CONFIG_RTE_LIBRTE_ICE_1 > 6BYTE_RX_DESC=3Dn/' ./config/common_base", "#", 20) > + self.dut.build_install_dpdk(self.target) > self.dut.kill_all() > -- > 2.17.1