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 B75A9A0571; Tue, 3 Mar 2020 16:34:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CA5531BFF0; Tue, 3 Mar 2020 16:34:58 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id A2E821BFE9 for ; Tue, 3 Mar 2020 16:34:56 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Mar 2020 07:34:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,511,1574150400"; d="scan'208";a="228949754" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by orsmga007.jf.intel.com with ESMTP; 03 Mar 2020 07:34:54 -0800 Received: from orsmsx115.amr.corp.intel.com (10.22.240.11) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Mar 2020 07:34:54 -0800 Received: from ORSEDG002.ED.cps.intel.com (10.7.248.5) by ORSMSX115.amr.corp.intel.com (10.22.240.11) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Mar 2020 07:34:54 -0800 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.105) by edgegateway.intel.com (134.134.137.101) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 3 Mar 2020 07:34:54 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dbVZ+e+UzLqnHkOg7axLvf/aeSA0NAnKxJNyUiasdimq8N7tgqyXe5jwp7QLQOfkGN2GDuboxuhp9MoPpaIFRUsHUBUXI+VSYDKe5GYzcqaHJpC/2dSO8I8GKJ16BuV1671QNJ2Y6gMVNoSKGrMT1dooQ0FRRnCoPa4OSNkPSMZz9+jrD6VWCvtxUHzyyM7Wsj+ng+Nq5dz8ibdf6kq7fjb3sIuRrUoEg+LNPf5vQjP5GaZTFoAPtZEYG/cWuGdSgLs18vMTT3mTgDKxXu5wQYyvhQX5c3erJbqwQGLYOmiNSzKp8OX3sU7JuZqNdYoXNUqq+SEkiEDS0UtVFde41A== 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=uFZrzRl4hKXushI9t85H6mpxZjnYrxOCm2QDHO6TTjk=; b=iSrw5EVlES9Y2jT8jxZ67scZOb7AxU/CKOVVGnS0t8cZWlqL9ZgnJZunQ0k7OFieEXqXjnU/Yi4ifS8ICzjgZ783EnhgSp1zEDg9gFoeRUMEqvq15Ry4RrJVwfd/9LrQZv5tSWyJmqFjvRy+6Utnl5ocvSB3s6ZFxHxXS8E83qLdDgWyksCmTViAFT1JlJRdSHyrbrnhqNzRIKHPpSmt/JxtorWgr5HxUS2VZr/NovUo7lnHWUXHna0KNJf3ky5csl5id2QywNHT1JXbSeFaL2nROUwKS8WbeyFcGBeLhWlsJcCC1PP2vHeYAFsEVho7ZzZYlni8CNdZdsRG53cFnQ== 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=uFZrzRl4hKXushI9t85H6mpxZjnYrxOCm2QDHO6TTjk=; b=a4ky+Cy6KyAQWUD5kSlyRFYm+WKLdpV/DbDG2kwERWXhKmOF68jgElIuSNogYZw/7Qtzn7MunjY+xlnN7BRZ/nEiS4FlwdjHGC4uq3a/e/zNalsk3lzGv1tXe94lzmD3qvH+izmrtS35TPVBkvtmPaXiQ5IEuf6PrUIGwGeBtAU= Received: from SN6PR11MB2558.namprd11.prod.outlook.com (2603:10b6:805:5d::19) by SN6PR11MB3471.namprd11.prod.outlook.com (2603:10b6:805:c1::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.14; Tue, 3 Mar 2020 15:34:53 +0000 Received: from SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::395e:eb75:6ab7:2ba5]) by SN6PR11MB2558.namprd11.prod.outlook.com ([fe80::395e:eb75:6ab7:2ba5%3]) with mapi id 15.20.2772.019; Tue, 3 Mar 2020 15:34:53 +0000 From: "Ananyev, Konstantin" To: "Dharmappa, Savinay" , "dev@dpdk.org" CC: "Iremonger, Bernard" , "akhil.goyal@nxp.com" Thread-Topic: [PATCH v2] app: test: measure libipsec performance Thread-Index: AQHV8IfUSjFvzssiI024tLsh8dHdjqg2/ZYw Date: Tue, 3 Mar 2020 15:34:52 +0000 Message-ID: References: <20200302105357.29509-1-savinay.dharmappa@intel.com> <20200302114319.3886-1-savinay.dharmappa@intel.com> In-Reply-To: <20200302114319.3886-1-savinay.dharmappa@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjE1N2U5ODktN2E3Yy00NjViLTgyZTMtMzQ3MGZlZWUzOWM0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiZFU0cHgrcDk4RTBzWU9aVEJUdVJBWFhzZnMxYzhKU1RiUm93UHZpTnE4R0ZHb0xnOVBoblliU1RPamNcL2VMYnkifQ== dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.2.0.6 x-ctpclassification: CTP_NT authentication-results: spf=none (sender IP is ) smtp.mailfrom=konstantin.ananyev@intel.com; x-originating-ip: [192.198.151.164] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 376c247a-80df-4f04-32d4-08d7bf886b32 x-ms-traffictypediagnostic: SN6PR11MB3471: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:7219; x-forefront-prvs: 03319F6FEF x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(376002)(346002)(136003)(366004)(396003)(189003)(199004)(9686003)(71200400001)(81166006)(81156014)(66476007)(86362001)(55016002)(76116006)(4326008)(5660300002)(66556008)(66446008)(64756008)(66946007)(6506007)(8676002)(33656002)(316002)(26005)(186003)(8936002)(110136005)(478600001)(52536014)(54906003)(2906002)(7696005); DIR:OUT; SFP:1102; SCL:1; SRVR:SN6PR11MB3471; H:SN6PR11MB2558.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8Gz/407OxdpM1VltqyZKGZEAzny/Dg/F+g7VjnOtI06bEPtk7YWM90aIeKPgu/7LYg+KIWoTZ/btgsGRBbJGDT1S0nYChC7/i2fjQuhmhs09y76FB6JrG+1udBUmLWYszqt2OtWKbLNKRLuYPNRCWSEz2WwEtgVq5J5Tzb1us8Rw4JMLXg//Obtd9lh0k3u5tjHjwJedO+cBnzK3twzpmSrR8T6V36/zeQb+WgjA3RH7hhtE3Hzj7l6c0waImDoYOAKifpEUunmVHYT9LebfmfnZS0vkuR/sDumtFNNhXZhkykWcbJgktz/NSSBFqXR1BlqO7Mr/SzsQbgMTrwYV4Ijo4Mwnpi6wFTvSHqExbDqwjiD0+/QKRewTQ0tGGgWK+E8YiUpb/1VJp4zC+utVaJjUOtkXZA5OSUkKGMHvH4rolrN0KrddUjNEys8eIB10 x-ms-exchange-antispam-messagedata: xqOMhN1mKMtjOOSo2tePmoccXd1hJfu69tzxmInXtqWWWgaeuxoXuBd+wohizoSh/DECsqFKAvpTbujLPmZNP0Dda+F/ENmcoHifw73lyYyC5Lok6TLDKPcETqZxg9l+xBM8l1qNGaXQdqG93j7NKw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 376c247a-80df-4f04-32d4-08d7bf886b32 X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Mar 2020 15:34:52.8975 (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: 54vNUtJx85skCqUt9EIE1zy6MiHwTDpAI9GSx4jMltdnrpVcwPskrc2VdWqefIpR4h+zHlhRErjVCJoUSSEEYrF3j2N37xHnngc8POBTHGE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3471 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] app: test: measure libipsec performance X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Savinay, > +static int > +testsuite_setup(void) > +{ > + struct rte_mbuf *mbuf[NUM_MBUF]; > + int ret, i; > + > + mbuf_pool =3D rte_pktmbuf_pool_create("IPSEC_PERF_MBUFPOOL", > + NUM_MBUFS, MBUF_CACHE_SIZE, 0, MBUF_SIZE, > + rte_socket_id()); > + if (mbuf_pool =3D=3D NULL) { > + RTE_LOG(ERR, USER1, "Can't create MBUFPOOL\n"); > + return TEST_FAILED; > + } > + > + cop_pool =3D rte_crypto_op_pool_create( > + "MBUF_CRYPTO_SYM_OP_POOL", > + RTE_CRYPTO_OP_TYPE_SYMMETRIC, > + NUM_MBUFS, MBUF_CACHE_SIZE, > + DEFAULT_NUM_XFORMS * > + sizeof(struct rte_crypto_sym_xform) + > + MAXIMUM_IV_LENGTH, > + rte_socket_id()); > + if (cop_pool =3D=3D NULL) { > + RTE_LOG(ERR, USER1, "Can't create CRYPTO_OP_POOL\n"); > + return TEST_FAILED; > + } > + > + ring_inb_prepare =3D rte_ring_create("ring0", RING_SIZE, > + SOCKET_ID_ANY, 0); > + if (ring_inb_prepare =3D=3D NULL) > + return TEST_FAILED; > + > + ring_inb_process =3D rte_ring_create("ring1", RING_SIZE, > + SOCKET_ID_ANY, 0); > + if (ring_inb_process =3D=3D NULL) > + return TEST_FAILED; > + > + ring_outb_prepare =3D rte_ring_create("ring2", RING_SIZE, > + SOCKET_ID_ANY, 0); > + if (ring_outb_prepare =3D=3D NULL) > + return TEST_FAILED; > + > + ring_outb_process =3D rte_ring_create("ring3", RING_SIZE, > + SOCKET_ID_ANY, 0); > + if (ring_outb_process =3D=3D NULL) > + return TEST_FAILED; > + > + for (i =3D 0; i < NUM_MBUF; i++) > + mbuf[i] =3D generate_mbuf_data(mbuf_pool); > + I think enqueue below could be moved to the loop above, so don't need to allocate mbuf[NUM_MBUF] at stack. struct rte_mbuf *mbuf; ... for (i =3D 0; i < NUM_MBUF; i++) { mbuf =3D generate_mbuf_data(mbuf_pool); if (mbuf =3D=3D NULL && rte_ring_sp_enqueue_bulk(ring_inb_prepare, (void **)mbuf, 1) =3D=3D 0) break; } If (i !=3D NUM_BUF) return TEST_FAILED; > + ret =3D rte_ring_sp_enqueue_bulk(ring_inb_prepare, (void **)mbuf, > + NUM_MBUF, NULL); > + if (ret =3D=3D 0) > + return TEST_FAILED; > + > + return TEST_SUCCESS; > +} > +