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 B4F98A04B0; Fri, 14 Aug 2020 11:43:10 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 654591C0CD; Fri, 14 Aug 2020 11:43:10 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 5F9B51C0C5 for ; Fri, 14 Aug 2020 11:43:08 +0200 (CEST) IronPort-SDR: cUwLgv7ENdWV8QlMQxp3RS0HXiF/aFT/qJjEO58iwQg2yl98iL3NYpsJu/ZcAWzNXxNqw6/u16 WgS0IXf+pjyA== X-IronPort-AV: E=McAfee;i="6000,8403,9712"; a="154343584" X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="154343584" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Aug 2020 02:43:07 -0700 IronPort-SDR: 6FTOlYrGqNrC2y71RXjb7Mja+S2rH8VxKOxh06yi9SucZRvN0b0zx1IyWKaUqnC9ssSO0i/T89 SCU1357k/zyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,311,1592895600"; d="scan'208";a="440068058" Received: from fmsmsx603-2.cps.intel.com (HELO fmsmsx603.amr.corp.intel.com) ([10.18.84.213]) by orsmga004.jf.intel.com with ESMTP; 14 Aug 2020 02:43:07 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Fri, 14 Aug 2020 02:43:06 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Fri, 14 Aug 2020 02:43:06 -0700 Received: from NAM04-BN3-obe.outbound.protection.outlook.com (104.47.46.50) 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; Fri, 14 Aug 2020 02:43:06 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=S6cuy2H/9FUCM95PXnL3fWv9Y3RVqY9cELSfBwsO3bJFVRbvspehlxVGqZfW2yVOm/1YqlZ7m0zwcJYeK/qyzT/2gOqk9TTadU4br2VEDI8fXkMOuGh8bJYDpVW2aGg08uOP1bXocFCIjU6u90Y9IK8T2pEfztWRa1VwQ/zFC4P8T6pKub2D0ZgYAgHhehG4qXnXQtW0k1lFf6Z2wR/N55KIgmpH61/0Ld9VyeloBDyMdHdewCq2Yk72eu/e3GXsAKlp5cafiigLLEnsBZZBoH0mls1C2d74N8787bE4r7irOpCrGT53Y+QrdwMWIaD2lRFESiGSoH+uPSqxQkZSbQ== 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=8OaRjTHBJUcrqcNBmbI87KmJC8ZXgM7wtSgPYmdLVzE=; b=JnOY/ym4pp50CCKzPAp3/XGEmYLnHGIGuSjmRxBxPMa/ZksMxAC78gr+m6Gqhi7cN91gslyh4Tfzy8GckbGPXTpQcMBSxij2CDOsO0M4PdKgSeI6etkd+GHr2zCGilrD1qvoHamwfaF64XJKirbulv/ew5iIPUDrjxwFiVhcZWSIQ7IU0H1MKc+q9VXUsR3Pw4TdwtAq+Dz0UMWMkqLIvM/ohjHtJdsODAdY4qm0thxLyFdXRram2Jfg8p/Jw70G+zKIVY8mBSQnVSPrB8+A7iMC8+hfbJff4kxNhm63YOscpCqCFY747HLrmIb1HlhF7FkTIRXRBZF6N/Mabv8yhw== 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=8OaRjTHBJUcrqcNBmbI87KmJC8ZXgM7wtSgPYmdLVzE=; b=Raiz4EQ1sA6eema7U5j9q4FRmqAa93ulGsZgtljEriq8TrxlqtBmhZCZ5E4nNCQgRIsruzsWpaBQuT6Smpr9VM36KYBMZTLd4rtqrnZ2PAZ+30RLrbXTF0jzD2S3xBC9R6UHXsec4zldrANo/XmmxFPOjj2AndXR1LDQEe5SRGU= Received: from MWHPR1101MB2254.namprd11.prod.outlook.com (2603:10b6:301:58::11) by MWHPR1101MB2253.namprd11.prod.outlook.com (2603:10b6:301:52::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16; Fri, 14 Aug 2020 09:43:04 +0000 Received: from MWHPR1101MB2254.namprd11.prod.outlook.com ([fe80::206d:f3f3:b571:41ee]) by MWHPR1101MB2254.namprd11.prod.outlook.com ([fe80::206d:f3f3:b571:41ee%11]) with mapi id 15.20.3283.016; Fri, 14 Aug 2020 09:43:04 +0000 From: "Xiao, QimaiX" To: "dts@dpdk.org" Thread-Topic: [dts][PATCH V1] update virtio func cases to support 2M hugepage env Thread-Index: AQHWch39CyvmMlTMEkOG+bhUvFdXl6k3WlAw Date: Fri, 14 Aug 2020 09:43:04 +0000 Message-ID: References: <20200814091520.62326-1-qimaix.xiao@intel.com> In-Reply-To: <20200814091520.62326-1-qimaix.xiao@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.102.204.36] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 89df957d-1eb2-4425-8968-08d840367126 x-ms-traffictypediagnostic: MWHPR1101MB2253: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:626; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MS6CT8gPZ4iLHWBOBVIeeMwVpFtN55InkjKNNRs/GvU8x+NilSPSsZrFdQQYt4MIaobirGEgmXww1pc85iOUT277tBnknCvnz3ZhCnPTyU0V7k7ZzTYnDAc0AEOnZF1g+V8ZBR05GRpZ3Cb9XslxXOjEqCsNqzjqKMxnbYrq53vWKCla7tXqrtHV3mRbIlidbGtyIllak3mJI410K89OmK1m+EEj3YT2+BscTPpsu+3U8Ada02WU/OhuL/dIsCevQJ8szzJBdSLncgclIBJ1nWvYaaMG6hW9DP3vl+l0ZX6t8i3o/m+X9OYfEZgTWuMMWUZRwqF3TVdfjl1NZZyyTw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR1101MB2254.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(39860400002)(396003)(346002)(366004)(376002)(9686003)(83380400001)(52536014)(33656002)(316002)(478600001)(7696005)(55016002)(30864003)(86362001)(6916009)(15650500001)(66446008)(8676002)(19627235002)(5660300002)(66946007)(64756008)(76116006)(2906002)(66556008)(53546011)(66476007)(26005)(71200400001)(6506007)(8936002)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: bzArrSDVNzUciRRLWPJYj0DrAM+z8ByS6w/4wLb4WfBtotj+8+aAyOQyu75kZw4Y6vvmqqKXR4pjEnpmp/MlZyvrn+TY02OuXEq1+ZUkNonsvXFGpJi1XlsilBCPFOpn2BujSJkKTaSrjwWm4writQ6rohcS8dzQ77ujoDgPtglxRHx9tyIYlvgcZrdpF3GJqYmw3ITLlzUOvz7whoVV0t0lPXqi3J1Ep0KL13hBt8fioYJcxDZbYd8PtKpR3Wzi/203PLCVuwXHkEnF5xBX5qpQjJmxM+dLaPRPgxJMuDY1wzWG4Tlq3LR2JchQGDp8f9FB2ozVx9SV0Ej+Kbzqyo9hZBrddBKX5iDlbgp4clAuxau+5bPVPQWT4OaQKSXhWY14FbPPheeOBnAANG3X4gu9JmHR2LfsT8U2D9fu18dP1dZWEVfPN88HRqD8WGzGmwSeRgPAPKs9/h2UIcliL+yroMJF+0T6SJ3+wQJiSt3cSpJC9DR9vbnakuzso6aCRSBLq0odid+KVb0AeBh980wwbzysGWL5E75bqdBkDX5lsaNNpIBa2K27VaOZRjC9gE0hLbBKRp3xw6F8lvouhBqtC4TXKhhpPy7SdPPnY14h0TtrDtPtvbXbewO5HaTmoY48J5mLiW9sCmFlNebTmg== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MWHPR1101MB2254.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 89df957d-1eb2-4425-8968-08d840367126 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Aug 2020 09:43:04.0948 (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: CUxOIoFOQQVaED18e1fsINedFBMnHgRHiDbTc5ky16l4BHgBxu9s9mBALLFlcKjRgLRIUON6UJCAcQJw/NTLaw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR1101MB2253 X-OriginatorOrg: intel.com Subject: Re: [dts] [PATCH V1] update virtio func cases to support 2M hugepage env 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" Tested-by: Xiao, QimaiX Regards, Xiao Qimai > -----Original Message----- > From: Xiao, QimaiX > Sent: Friday, August 14, 2020 5:15 PM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts][PATCH V1] update virtio func cases to support 2M hugepage > env >=20 > *. add eal parameter single-file-segments for 2M env test >=20 > Signed-off-by: Xiao Qimai > --- > tests/TestSuite_loopback_multi_paths_port_restart.py | 7 +++++++ > tests/TestSuite_loopback_multi_queues.py | 7 +++++++ > tests/TestSuite_loopback_virtio_user_server_mode.py | 9 +++++++++ > ...estSuite_pvp_virtio_user_multi_queues_port_restart.py | 7 +++++++ > tests/TestSuite_vhost_1024_ethports.py | 9 +++++++++ > tests/TestSuite_vhost_enqueue_interrupt.py | 7 +++++++ > tests/TestSuite_vhost_event_idx_interrupt.py | 7 +++++++ > tests/TestSuite_vhost_virtio_user_interrupt.py | 7 +++++++ > tests/TestSuite_vm2vm_virtio_pmd.py | 9 +++++++++ > tests/TestSuite_vm2vm_virtio_user.py | 9 +++++++++ > 10 files changed, 78 insertions(+) >=20 > diff --git a/tests/TestSuite_loopback_multi_paths_port_restart.py > b/tests/TestSuite_loopback_multi_paths_port_restart.py > index 3f44232..1e91af4 100644 > --- a/tests/TestSuite_loopback_multi_paths_port_restart.py > +++ b/tests/TestSuite_loopback_multi_paths_port_restart.py > @@ -84,11 +84,18 @@ class TestLoopbackPortRestart(TestCase): > self.vhost.send_expect(command_line_client, "testpmd> ", 120) > self.vhost.send_expect("set fwd mac", "testpmd> ", 120) >=20 > + @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 start_virtio_user_testpmd(self, pmd_arg): > """ > start testpmd of vhost user > """ > eal_param =3D self.dut.create_eal_parameters(cores=3Dself.core_l= ist_user, > prefix=3D'virtio', no_pci=3DTrue, > vdevs=3D['net_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost-net,%s'= % > pmd_arg["version"]]) > + if self.check_2M_env: > + eal_param +=3D " --single-file-segments" > command_line_user =3D self.dut.target + "/app/testpmd " + eal_pa= ram + " > -- -i %s --rss-ip --nb-cores=3D1 --txd=3D1024 --rxd=3D1024" % pmd_arg["pa= th"] > self.virtio_user.send_expect(command_line_user, "testpmd> ", 120= ) > self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120) di= ff --git > a/tests/TestSuite_loopback_multi_queues.py > b/tests/TestSuite_loopback_multi_queues.py > index 10abb72..8300dfc 100644 > --- a/tests/TestSuite_loopback_multi_queues.py > +++ b/tests/TestSuite_loopback_multi_queues.py > @@ -93,11 +93,18 @@ class TestLoopbackMultiQueues(TestCase): > self.vhost.send_expect(command_line_client, "testpmd> ", 120) > self.vhost.send_expect("set fwd mac", "testpmd> ", 120) >=20 > + @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 start_virtio_testpmd(self, args): > """ > start testpmd on virtio > """ > eal_param =3D self.dut.create_eal_parameters(cores=3Dself.core_l= ist_user, > prefix=3D'virtio', no_pci=3DTrue, > vdevs=3D['net_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost- > net,queues=3D%d,%s' % (self.queue_number, args["version"])]) > + if self.check_2M_env: > + eal_param +=3D " --single-file-segments" > command_line_user =3D self.dut.target + "/app/testpmd " + eal_pa= ram + " > -- -i %s --nb-cores=3D%d --rxq=3D%d --txq=3D%d --txd=3D1024 --rxd=3D1024"= % > (args["path"], self.nb_cores, self.queue_number, self.queue_number) > self.virtio_user.send_expect(command_line_user, "testpmd> ", 120= ) > self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120) di= ff --git > a/tests/TestSuite_loopback_virtio_user_server_mode.py > b/tests/TestSuite_loopback_virtio_user_server_mode.py > index 742aa09..d329d46 100644 > --- a/tests/TestSuite_loopback_virtio_user_server_mode.py > +++ b/tests/TestSuite_loopback_virtio_user_server_mode.py > @@ -82,11 +82,18 @@ class TestLoopbackVirtioUserServerMode(TestCase): > self.vhost.send_expect(command_line_client, "testpmd> ", 120) > self.vhost.send_expect("set fwd mac", "testpmd> ", 120) >=20 > + @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_virtio_user_testpmd(self, args): > """ > start testpmd of vhost user > """ > eal_param =3D self.dut.create_eal_parameters(cores=3Dself.core_l= ist_user, > prefix=3D'virtio', no_pci=3DTrue, > vdevs=3D['net_virtio_user0,mac=3D00:01:02:03:04:05,path=3Dvhost- > net,server=3D1,queues=3D1,%s' % args["version"]]) > + if self.check_2M_env: > + eal_param +=3D " --single-file-segments" > command_line_user =3D self.dut.target + "/app/testpmd " + eal_pa= ram + " > -- -i --rxq=3D1 --txq=3D1 --no-numa" > self.virtio_user.send_expect(command_line_user, "testpmd> ", 120= ) > self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120) @@= - > 102,6 +109,8 @@ class TestLoopbackVirtioUserServerMode(TestCase): > start testpmd of vhost user > """ > eal_param =3D self.dut.create_eal_parameters(cores=3Dself.core_l= ist_user, > prefix=3D'virtio', no_pci=3DTrue, > vdevs=3D['net_virtio_user0,mac=3D00:01:02:03:04:05,path=3Dvhost- > net,server=3D1,queues=3D%d,%s' % (self.queue_number, mode)]) > + if self.check_2M_env: > + eal_param +=3D " --single-file-segments" > command_line_user =3D self.dut.target + "/app/testpmd " + eal_pa= ram + " > -- -i %s --nb-cores=3D%d --rxq=3D%d --txq=3D%d" % (extern_params, self.nb= _cores, > self.queue_number, self.queue_number) > self.virtio_user.send_expect(command_line_user, "testpmd> ", 120= ) > self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120) di= ff --git > a/tests/TestSuite_pvp_virtio_user_multi_queues_port_restart.py > b/tests/TestSuite_pvp_virtio_user_multi_queues_port_restart.py > index 0cd6fb2..c35f79d 100644 > --- a/tests/TestSuite_pvp_virtio_user_multi_queues_port_restart.py > +++ b/tests/TestSuite_pvp_virtio_user_multi_queues_port_restart.py > @@ -99,6 +99,11 @@ class > TestPVPVirtioUserMultiQueuesPortRestart(TestCase): > self.vhost.send_expect("set fwd mac", "testpmd> ", 120) > self.vhost.send_expect("start", "testpmd> ", 120) >=20 > + @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 start_virtio_user_testpmd(self, vdevs, vector_flag=3DFalse): > """ > start testpmd in vm depend on different path @@ -106,6 +111,8 @@ > class TestPVPVirtioUserMultiQueuesPortRestart(TestCase): > testcmd =3D self.dut.target + "/app/testpmd " > eal_params =3D self.dut.create_eal_parameters(cores=3Dself.core_= list[5:8], > prefix=3D'virtio', no_pci=3DTrue, > vdevs=3D[vdevs]) > + if self.check_2M_env: > + eal_params +=3D " --single-file-segments" > if vector_flag: > para =3D " -- -i --tx-offloads=3D0x0 --enable-hw-vlan-strip = --rss-ip --nb- > cores=3D2 --rxq=3D%s --txq=3D%s --rss-ip" % ( > self.queue_number, self.queue_number) diff --git > a/tests/TestSuite_vhost_1024_ethports.py > b/tests/TestSuite_vhost_1024_ethports.py > index 6e02c83..b764936 100644 > --- a/tests/TestSuite_vhost_1024_ethports.py > +++ b/tests/TestSuite_vhost_1024_ethports.py > @@ -71,10 +71,19 @@ class TestVhost1024Ethports(TestCase): > "sed -i > 's/CONFIG_RTE_MAX_ETHPORTS=3D1024$/CONFIG_RTE_MAX_ETHPORTS=3D32/ > ' config/common_base", '#', 30) > self.dut.build_install_dpdk(self.target) >=20 > + @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 test_launch_vhost_with_1024_ethports(self): > """ > Test function of launch vhost with 1024 ethports > """ > + if self.check_2M_env: > + hugepages =3D int(self.dut.get_total_huge_pages()) > + if hugepages< 20480: > + self.dut.send_expect('echo 20480 > > + /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages', > expected=3D'# > + ', timeout=3D30) > command_line_vdev =3D '' > for ethport in range(self.max_ethport): > command_line_vdev +=3D '--vdev "eth_vhost%d,iface=3Dvhost- > net%d,queues=3D%d" ' %(ethport, ethport, self.queue) diff --git > a/tests/TestSuite_vhost_enqueue_interrupt.py > b/tests/TestSuite_vhost_enqueue_interrupt.py > index 9d3f5bc..5520782 100644 > --- a/tests/TestSuite_vhost_enqueue_interrupt.py > +++ b/tests/TestSuite_vhost_enqueue_interrupt.py > @@ -89,11 +89,18 @@ class TestVhostEnqueueInterrupt(TestCase): > """ > vdev =3D "net_virtio_user0,mac=3D%s,path=3D./vhost- > net,server=3D1,queues=3D%d" % (self.vmac, self.queues) if not packed else > "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 self.check_2M_env: > + eal_params +=3D " --single-file-segments" > para =3D " -- -i --rxq=3D%d --txq=3D%d --rss-ip" % (self.queues,= self.queues) > command_line_client =3D self.dut.target + "/app/testpmd " + eal= _params > + para > self.virtio_user.send_expect(command_line_client, "testpmd> ", 1= 20) > self.virtio_user.send_expect("set fwd txonly", "testpmd> ", 20) >=20 > + @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): > """ > launch l3fwd-power with a virtual vhost device diff --git > a/tests/TestSuite_vhost_event_idx_interrupt.py > b/tests/TestSuite_vhost_event_idx_interrupt.py > index 4bb40c7..e82bd46 100644 > --- a/tests/TestSuite_vhost_event_idx_interrupt.py > +++ b/tests/TestSuite_vhost_event_idx_interrupt.py > @@ -82,6 +82,11 @@ class TestVhostEventIdxInterrupt(TestCase): > out =3D self.dut.send_expect("make -C examples/l3fwd-power", "#"= ) > self.verify("Error" not in out, "compilation l3fwd-power error") >=20 > + @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): > """ > launch l3fwd-power with a virtual vhost device @@ -109,6 +114,8 = @@ > class TestVhostEventIdxInterrupt(TestCase): > example_para =3D "./examples/l3fwd-power/build/l3fwd-power " > para =3D " --log-level=3D9 %s -- -p %s --parse-ptype 1 --config = '%s' --interrupt- > only" % (vdev_info, port_info, config_info) > eal_params =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, no_pci=3DTru= e) > + if self.check_2M_env: > + eal_params +=3D " --single-file-segments " > command_line_client =3D example_para + eal_params + para > self.vhost.get_session_before(timeout=3D2) > self.vhost.send_expect(command_line_client, "POWER", 40) diff --= git > a/tests/TestSuite_vhost_virtio_user_interrupt.py > b/tests/TestSuite_vhost_virtio_user_interrupt.py > index 2f430d8..e882c3a 100644 > --- a/tests/TestSuite_vhost_virtio_user_interrupt.py > +++ b/tests/TestSuite_vhost_virtio_user_interrupt.py > @@ -89,11 +89,18 @@ class TestVirtioUserInterrupt(TestCase): > out =3D self.dut.build_dpdk_apps("./examples/l3fwd-power") > self.verify("Error" not in out, "compilation l3fwd-power error") >=20 > + @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 launch_l3fwd(self, path, packed=3DFalse): > self.core_interrupt =3D self.core_list_l3fwd[0] > example_para =3D "./examples/l3fwd-power/build/l3fwd-power " > vdev =3D "virtio_user0,path=3D%s,cq=3D1" % path if not packed el= se > "virtio_user0,path=3D%s,cq=3D1,packed_vq=3D1" % path > eal_params =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_l3fwd, prefix=3D'l3= fwd- > pwd', no_pci=3DTrue, ports=3D[self.pci_info], vdevs=3D[vdev]) > + if self.check_2M_env: > + eal_params +=3D " --single-file-segments" > para =3D " --config=3D'(0,0,%s)' --parse-ptype --interrupt-only"= % > self.core_interrupt > cmd_l3fwd =3D example_para + eal_params + " --log-level=3D'user1= ,7' -- -p 1 > " + para > self.l3fwd.get_session_before(timeout=3D2) > diff --git a/tests/TestSuite_vm2vm_virtio_pmd.py > b/tests/TestSuite_vm2vm_virtio_pmd.py > index 7fea5bf..c26a084 100644 > --- a/tests/TestSuite_vm2vm_virtio_pmd.py > +++ b/tests/TestSuite_vm2vm_virtio_pmd.py > @@ -112,6 +112,11 @@ class TestVM2VMVirtioPMD(TestCase): > self.vhost_user.send_expect("set fwd mac", "testpmd> ", 30) > self.vhost_user.send_expect("start", "testpmd> ", 30) >=20 > + @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 start_virtio_testpmd_with_vhost_net1(self, path_mode, > extern_param): > """ > launch the testpmd as virtio with vhost_net1 @@ -121,6 +126,8 @@ > class TestVM2VMVirtioPMD(TestCase): > testcmd =3D self.dut.target + "/app/testpmd " > vdev =3D "--vdev=3Dnet_virtio_user1,mac=3D00:01:02:03:04:05,path= =3D./vhost- > net1,queues=3D1,%s " % path_mode > eal_params =3D self.dut.create_eal_parameters(cores=3Dvirtio_mas= k, > no_pci=3DTrue, prefix=3D'virtio', ports=3D[self.pci_info]) > + if self.check_2M_env: > + eal_params +=3D " --single-file-segments" > para =3D " -- -i --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 %s" % = extern_param > command_line =3D testcmd + eal_params + vdev + para > self.virtio_user1.send_expect(command_line, 'testpmd> ', 30) @@ = - > 136,6 +143,8 @@ class TestVM2VMVirtioPMD(TestCase): > testcmd =3D self.dut.target + "/app/testpmd " > vdev =3D "--vdev=3Dnet_virtio_user0,mac=3D00:01:02:03:04:05,path= =3D./vhost- > net0,queues=3D1,%s " % path_mode > eal_params =3D self.dut.create_eal_parameters(cores=3Dvirtio_mas= k, > no_pci=3DTrue, prefix=3D'virtio0', ports=3D[self.pci_info]) > + if self.check_2M_env: > + eal_params +=3D " --single-file-segments " > para =3D " -- -i --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 %s" % = extern_param > command_line =3D testcmd + eal_params + vdev + para > self.virtio_user0.send_expect(command_line, 'testpmd> ', 30) dif= f --git > a/tests/TestSuite_vm2vm_virtio_user.py > b/tests/TestSuite_vm2vm_virtio_user.py > index 343e2d2..e743e61 100644 > --- a/tests/TestSuite_vm2vm_virtio_user.py > +++ b/tests/TestSuite_vm2vm_virtio_user.py > @@ -125,12 +125,19 @@ class TestVM2VMVirtioUser(TestCase): > self.pmd_vhost.execute_cmd(self.command_line, timeout=3D30) > self.pmd_vhost.execute_cmd('set fwd %s' % fwd_mode) >=20 > + @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 start_virtio_testpmd_with_vhost_net1(self, path_mode, > extern_params, ringsize): > """ > launch the testpmd as virtio with vhost_net1 > """ > eal_params =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_virtio1, > no_pci=3DTrue, prefix=3Dself.virtio_prefix, fixed_prefix= =3DTrue) > + if self.check_2M_env: > + eal_params +=3D " --single-file-segments " > vdev_params =3D '-- > vdev=3Dnet_virtio_user1,mac=3D00:01:02:03:04:05,path=3D./vhost- > net1,queues=3D1,%s,queue_size=3D%d ' % (path_mode, ringsize) > command_line =3D self.dut.target + "/app/testpmd %s " + \ > "--socket-mem %s %s -- -i --nb-cores=3D1 --txd=3D%d --rxd=3D= %d %s" > @@ -147,6 +154,8 @@ class TestVM2VMVirtioUser(TestCase): > """ > eal_params =3D > self.dut.create_eal_parameters(cores=3Dself.core_list_virtio0, > no_pci=3DTrue, prefix=3D'virtio0') > + if self.check_2M_env: > + eal_params +=3D " --single-file-segments " > vdev_params =3D '-- > vdev=3Dnet_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost- > net0,queues=3D1,%s,queue_size=3D%d ' % (path_mode, ringsize) > command_line =3D self.dut.target + '/app/testpmd %s ' + \ > '--socket-mem %s %s -- -i --nb-cores=3D1 --txd=3D%d --rxd=3D= %d %s' > -- > 2.25.1