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 783C6A04B7; Mon, 21 Sep 2020 03:08:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6755B1D9D6; Mon, 21 Sep 2020 03:08:46 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A23E71D9D2 for ; Mon, 21 Sep 2020 03:08:44 +0200 (CEST) IronPort-SDR: 9OJ+4CGy9W6yKcAl+d369IEVZUN85q+Ct2Swo2Qitdudv7ugoUuJJsUSQjYZPW4jwoBVGj7JE8 pjWmaw2CxIGQ== X-IronPort-AV: E=McAfee;i="6000,8403,9750"; a="178365409" X-IronPort-AV: E=Sophos;i="5.77,284,1596524400"; d="scan'208";a="178365409" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2020 18:08:43 -0700 IronPort-SDR: gHRMWkXW/zzeIiLULlWI5SHYvb8hzozjkLqsFPKuI4e4RVZKImWojFB1P/R8KU4bnJ9R1lWJ0s Sts6wofUXw5A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,284,1596524400"; d="scan'208";a="334028319" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by fmsmga004.fm.intel.com with ESMTP; 20 Sep 2020 18:08:43 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Sun, 20 Sep 2020 18:08:42 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Sun, 20 Sep 2020 18:08:42 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.177) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Sun, 20 Sep 2020 18:08:36 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WsuTDq7RO+uFGRkGiyL5CISJvCExozughH3XWj4xA/5Xc6pPJOQUyWmxey0ZOfdu4b/M1l79farkSxmYkiBQbXjTvIRFpzPR+BzK4kXPKj0Kx1yUw4s9b+D5SfQ0KgrvdlbwO6mP8XIIT8xLHNgYKS7JxJmtuzxiuu1XWaaqZmWHj0FwTv1wyPAj+e34RFia000lQI1PlkDCqwpvIkut4H9l+tPubUFlAcYMk9x6UFJbQ8+/M2sOa1nAaBYwtONO3pAVy78cea5W3QssG7tZZlIp6FSNAnEyddCIhkGh7+ryi+FTH75TTPtL42pbQLsFTZ14P56EMv2d9ZBs39396Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PA5E8YaYDvKJGOWAD5bTrTbG+CUi2kPdml09cCtAKXM=; b=SBs+IBLcNS2axjZ8diF01Efn7R9yYVKgpvGbFmIZkMyEcPSmfOk7EVD10Oo8OgkxpeGsslzG+LH3A7xUmrkT7Xinduqi9zj7jBpeufoZ29LXM2/CjBwoeC++OSPcq3l6tvuc/QF6mX7aTKtE8iMhY0iUfDf9/l/7De4x/UypblXp+XpZsLtDHTeIDgyQBP53G5k5IBw/A1B2bx8gvOjd2eIWBZaHs3pBGFt+4LoE/rfj08nDCI47ezN6WXn1NeRQkDTGyh6NhFkerP7f6jYCYxKeVwjM2msii/3UfYfkC8V5YC9ax/zO+6//IpDDtyCahprxqUt3kesTQgQ70RTKqw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PA5E8YaYDvKJGOWAD5bTrTbG+CUi2kPdml09cCtAKXM=; b=fldBv01DW9xJA77Z+jrmN3oWObCPTcaLhoBwFYYaxgfk35DCf2A/jfEFkEIrUbOrkmaJdwMYw9eumfyKx1CESTaOxaCJrSoJeQAnH7JkaLmJZzowSp3FdgVfQ1puk3LjjoAkDQ8TGKlzeDek37XoO+wpI8br4dExRWfVirdqfeU= Received: from BYAPR11MB2648.namprd11.prod.outlook.com (2603:10b6:a02:c7::10) by BYAPR11MB2741.namprd11.prod.outlook.com (2603:10b6:a02:bf::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14; Mon, 21 Sep 2020 01:08:32 +0000 Received: from BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::6ce6:645f:f3fc:1504]) by BYAPR11MB2648.namprd11.prod.outlook.com ([fe80::6ce6:645f:f3fc:1504%7]) with mapi id 15.20.3391.019; Mon, 21 Sep 2020 01:08:32 +0000 From: "Wang, Yinan" To: "Jiang, YuX" , "dts@dpdk.org" CC: "Jiang, YuX" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_vhost_user_interrupt: add 1 cbdma script Thread-Index: AQHWjLxb54iq4tL1a0udUeR/DJy1walyTd0w Date: Mon, 21 Sep 2020 01:08:32 +0000 Message-ID: References: <20200917063116.7479-1-yux.jiang@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows authentication-results: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.37] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9840129e-107a-4788-fe57-08d85dcadbef x-ms-traffictypediagnostic: BYAPR11MB2741: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:288; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 7Vq+Zuwo8733IsI3hKfWAJVIxHZqE8skHLueFA4Lf/+K9XN1mdXEb+zl3/+ouVDsL0oq+iLDiBgt+niOCyRidCshMphpydJp1ZLh3i90LEp/AkcAoKQd2W5Vhua3t8CD6faKndzFlM8xOGnXrF9jUV+en2eTnMeZ2DDpJEC3JZVhE6LFqLsRSd0JE6tCEZk6Hg39H9Vr88mk+28ZPGyWB8twjqs+JSxOVQMDW7KjDqM2U+TJm1EmghXGWwyvQmRIvLOHKNj4t+yfCpNYSCkWkogTey+Bx8Frew7eivUoRpzEGbsGnCJq4M5s+3HAXg/wnngIku6AHRgKLSJLpNdAxbe6ib7O87ZvQy2WvkWPrXdEYCQ6LdQCaz+PyuqvK531 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB2648.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(346002)(136003)(39860400002)(396003)(376002)(26005)(66946007)(8676002)(7696005)(110136005)(64756008)(66556008)(66446008)(83380400001)(66476007)(6506007)(5660300002)(8936002)(53546011)(186003)(2906002)(86362001)(76116006)(478600001)(52536014)(55016002)(316002)(71200400001)(33656002)(9686003)(4326008)(107886003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: 01/4EUYb9F0otUIkuQJR0b0uAwy96Xr5JvqBIgMq2XD7t23Y8HBRw32d+P6JgKz/vui39gGdLwzOqhFqZlC+Ch0WoAgZlverKd1kLdi2Y+mZy+ias/WpeY9DToL1i/O++YwMGABKUCBdW0+Qyz5ry/TWXtSIIPJNf0peeSeGdChIOaVlPtHp6HpMUqlkFmhBQGA7VnzuIrAyIIJvBPZarkgKZrPH2k01ZgRIXMPdvsDhZ24tThx1UcLTG/vIvPHa/wZy1hUChYnacrO9Pp9CkdMVMHbKCv2b/dqc88vNepyFx4oy9QTHN6sD8B0u+lDAnV0k0YcFBQS+EiYzBhy7We50jOYqfKStIgNpolm12r4eypaVChJ7CBkzw/9oMxmHz61MsKEhO9/PwWkMziYX8PdWCxAV9XVMJxtu3/pwSCjYGJRuIWuaOI8ZN5BXa304DU30W4tSGxRpm/0lqyQpTyh9nFFEolTLO9o4KkXtAVIeakpvKR5L4QLNo7zwzAUqGvrJajhpoyUotkkY7ytaMp5IQ3BqcySkqdt5LDgJSXpFmo7KX0tFRF17lHS68WTQeQMW5jQN/k/FfqMwEzbBrnaEULDy6d0PhxFnBvPd2xzGXRw+5rGnw1YksW5rT1MVaSf+1tBG4808003HkhbTaQ== Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB2648.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9840129e-107a-4788-fe57-08d85dcadbef X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Sep 2020 01:08:32.6281 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: fzGYK4cTg3b/BTaXc56KiikusZFNkgSERxbmCXYrZrLiCh66yx/I1g1z2cjcezAr8SOfnQwVNsxSV0/oPLmtUg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2741 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH V1] tests/TestSuite_vhost_user_interrupt: add 1 cbdma script 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: Wang, Yinan > -----Original Message----- > From: dts On Behalf Of Jiang, YuX > Sent: 2020?9?17? 14:32 > To: dts@dpdk.org > Cc: Jiang, YuX > Subject: Re: [dts] [PATCH V1] tests/TestSuite_vhost_user_interrupt: add 1 > cbdma script >=20 > Tested-by: Jiang, YuX >=20 > Best Regards > Jiang yu >=20 >=20 > > -----Original Message----- > > From: Jiang, YuX > > Sent: Thursday, September 17, 2020 2:31 PM > > To: dts@dpdk.org > > Cc: Jiang, YuX > > Subject: [dts] [PATCH V1] tests/TestSuite_vhost_user_interrupt: add 1 > > cbdma script > > > > From: JiangYu > > > > 1, add 1 cbdma TCs; 2, adapt app_name to kill > > > > Signed-off-by: JiangYu > > --- > > tests/TestSuite_vhost_user_interrupt.py | 87 > > +++++++++++++++++++++++++++++---- > > 1 file changed, 78 insertions(+), 9 deletions(-) > > > > diff --git a/tests/TestSuite_vhost_user_interrupt.py > > b/tests/TestSuite_vhost_user_interrupt.py > > index 487e058..bc340c4 100644 > > --- a/tests/TestSuite_vhost_user_interrupt.py > > +++ b/tests/TestSuite_vhost_user_interrupt.py > > @@ -36,6 +36,7 @@ Vhost enqueue interrupt need test with l3fwd-power > > sample > > > > import utils > > import time > > +import re > > from test_case import TestCase > > > > > > @@ -53,6 +54,15 @@ class TestVhostUserInterrupt(TestCase): > > self.prepare_l3fwd_power() > > self.app_l3fwd_power_path =3D self.dut.apps_name['l3fwd-power'= ] > > self.app_testpmd_path =3D self.dut.apps_name['test-pmd'] > > + self.testpmd_name =3D self.app_testpmd_path.split("/")[-1] > > + self.l3fwdpower_name =3D self.app_l3fwd_power_path.split("/")[= -1] > > + > > + self.dut_ports =3D self.dut.get_ports() > > + self.ports_socket =3D self.dut.get_numa_id(self.dut_ports[0]) > > + # get cbdma device > > + self.cbdma_dev_infos =3D [] > > + self.dmas_info =3D None > > + self.device_str =3D None > > > > def set_up(self): > > """ > > @@ -60,8 +70,8 @@ class TestVhostUserInterrupt(TestCase): > > """ > > # Clean the execution ENV > > self.verify_info =3D [] > > - self.dut.send_expect("killall -s INT testpmd", "#") > > - self.dut.send_expect("killall l3fwd-power", "#") > > + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, = "#") > > + self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") > > self.dut.send_expect("rm -rf ./vhost-net*", "#") > > self.vhost =3D self.dut.new_session(suite=3D"vhost-l3fwd") > > self.virtio_user =3D self.dut.new_session(suite=3D"virtio-user= ") > > @@ -85,12 +95,15 @@ class TestVhostUserInterrupt(TestCase): > > self.core_list_virtio =3D core_list[0: self.queues+1] > > self.core_list_l3fwd =3D core_list[self.queues+1: need_num] > > > > - def lanuch_virtio_user(self, packed=3DFalse): > > + def lanuch_virtio_user(self, packed=3DFalse, cbdma=3DFalse): > > """ > > launch virtio-user with server mode > > """ > > vdev =3D "net_virtio_user0,mac=3D%s,path=3D./vhost- > > net,server=3D1,queues=3D%d" % (self.vmac, self.queues) if not packed el= se > > "net_virtio_user0,mac=3D%s,path=3D./vhost- > > net,server=3D1,queues=3D%d,packed_vq=3D1" % (self.vmac, self.queues) > > - eal_params =3D > > self.dut.create_eal_parameters(cores=3Dself.core_list_virtio, prefix=3D= 'virtio', > > no_pci=3DTrue, ports=3D[self.pci_info], vdevs=3D[vdev]) > > + if cbdma =3D=3DTrue: > > + eal_params =3D > > self.dut.create_eal_parameters(cores=3Dself.core_list_virtio, prefix=3D= 'virtio', > > no_pci=3DTrue, vdevs=3D[vdev]) > > + else: > > + eal_params =3D > > + self.dut.create_eal_parameters(cores=3Dself.core_list_virtio, > > + prefix=3D'virtio', no_pci=3DTrue, ports=3D[self.pci_info], vdevs=3D[v= dev]) > > if self.check_2M_env: > > eal_params +=3D " --single-file-segments" > > para =3D " -- -i --rxq=3D%d --txq=3D%d --rss-ip" % (self.queue= s, self.queues) > > @@ -98,12 +111,51 @@ class TestVhostUserInterrupt(TestCase): > > self.virtio_user.send_expect(command_line_client, "testpmd> ",= 120) > > self.virtio_user.send_expect("set fwd txonly", "testpmd> ", 20= ) > > > > + def get_cbdma_ports_info_and_bind_to_dpdk(self, cbdma_num): > > + """ > > + get all cbdma ports > > + """ > > + str_info =3D 'Misc (rawdev) devices using kernel driver' > > + out =3D self.dut.send_expect('./usertools/dpdk-devbind.py --st= atus-dev > > misc', '# ', 30) > > + device_info =3D out.split('\n') > > + for device in device_info: > > + pci_info =3D re.search('\s*(0000:\d*:\d*.\d*)', device) > > + if pci_info is not None: > > + dev_info =3D pci_info.group(1) > > + # the numa id of ioat dev, only add the device which > > + # on same socket with nic dev > > + bus =3D int(dev_info[5:7], base=3D16) > > + if bus >=3D 128: > > + cur_socket =3D 1 > > + else: > > + cur_socket =3D 0 > > + if self.ports_socket =3D=3D cur_socket: > > + self.cbdma_dev_infos.append(pci_info.group(1)) > > + self.verify(len(self.cbdma_dev_infos) >=3D cbdma_num, 'There n= o > > enough cbdma device to run this suite') > > + used_cbdma =3D self.cbdma_dev_infos[0:cbdma_num] > > + dmas_info =3D '' > > + for dmas in used_cbdma: > > + number =3D used_cbdma.index(dmas) > > + dmas =3D 'txq{}@{};'.format(number, dmas) > > + dmas_info +=3D dmas > > + self.dmas_info =3D dmas_info[:-1] > > + self.device_str =3D ' '.join(used_cbdma) > > + self.dut.setup_modules(self.target, "igb_uio","None") > > + self.dut.send_expect('./usertools/dpdk-devbind.py --force -- > > bind=3D%s %s %s' % > > + ("igb_uio", self.device_str, > > + self.pci_info), '# ', 60) > > + > > + def bind_cbdma_device_to_kernel(self): > > + if self.device_str is not None: > > + self.dut.send_expect('modprobe ioatdma', '# ') > > + self.dut.send_expect('./usertools/dpdk-devbind.py -u %s' % > > self.device_str, '# ', 30) > > + self.dut.send_expect('./usertools/dpdk-devbind.py --force > > + --bind=3Dioatdma %s' % self.device_str, '# ', 60) > > + > > @property > > def check_2M_env(self): > > out =3D self.dut.send_expect("cat /proc/meminfo |grep > > Hugepagesize|awk '{print($2)}'", "# ") > > return True if out =3D=3D '2048' else False > > > > - def lanuch_l3fwd_power(self): > > + def lanuch_l3fwd_power(self, cbdma=3DFalse): > > """ > > launch l3fwd-power with a virtual vhost device > > """ > > @@ -118,9 +170,15 @@ class TestVhostUserInterrupt(TestCase): > > self.verify_info.append(info) > > > > example_cmd =3D self.app_l3fwd_power_path + " " > > - vdev =3D 'net_vhost0,iface=3Dvhost-net,queues=3D%d,client=3D1'= % self.queues > > + if cbdma =3D=3DTrue: > > + example_cmd +=3D " --log-level=3D9 " > > + self.get_cbdma_ports_info_and_bind_to_dpdk(4) > > + vdev =3D "'net_vhost0,iface=3Dvhost- > > net,queues=3D%d,client=3D1,dmas=3D[%s]'" % (self.queues, self.dmas_info= ) > > + eal_params =3D > > self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, > > ports=3Dself.cbdma_dev_infos[0:4], vdevs=3D[vdev]) > > + else: > > + vdev =3D 'net_vhost0,iface=3Dvhost-net,queues=3D%d,client= =3D1' % > > self.queues > > + eal_params =3D > > + self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, > > + no_pci=3DTrue, ports=3D[self.pci_info], vdevs=3D[vdev]) > > para =3D " -- -p 0x1 --parse-ptype 1 --config '%s' --interrupt= -only" % > > config_info > > - eal_params =3D > > self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, no_pci=3DT= rue, > > ports=3D[self.pci_info], vdevs=3D[vdev]) > > command_line_client =3D example_cmd + eal_params + para > > self.vhost.get_session_before(timeout=3D2) > > self.vhost.send_expect(command_line_client, "POWER", 40) @@ - > > 205,13 +263,23 @@ class TestVhostUserInterrupt(TestCase): > > self.lanuch_l3fwd_power() > > self.send_and_verify() > > > > + def > > test_wake_up_split_ring_vhost_user_core_with_l3fwd_power_sample_wh > > en_multi_queues_enabled_and_cbdma_enabled(self): > > + """ > > + Check the virtio-user interrupt can work with multi queue and > > cbdma_enabled > > + """ > > + self.queues =3D 4 > > + self.get_core_list() > > + self.lanuch_virtio_user(cbdma=3DTrue) > > + self.lanuch_l3fwd_power(cbdma=3DTrue) > > + self.send_and_verify() > > + > > def tear_down(self): > > """ > > Run after each test case. > > """ > > self.close_testpmd_and_session() > > - self.dut.send_expect("killall l3fwd-power", "#") > > - self.dut.send_expect("killall -s INT testpmd", "#") > > + self.dut.send_expect("killall %s" % self.l3fwdpower_name, "#") > > + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, > > + "#") > > self.dut.kill_all() > > > > def tear_down_all(self): > > @@ -219,6 +287,7 @@ class TestVhostUserInterrupt(TestCase): > > Run after each test suite. > > """ > > # revert the code > > + self.bind_cbdma_device_to_kernel() > > self.dut.send_expect("mv ./main.c ./examples/l3fwd-power/", "#= ") > > self.dut.build_dpdk_apps('examples/l3fwd-power') > > pass > > -- > > 2.7.4