From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0049.outbound.protection.outlook.com [104.47.37.49]) by dpdk.org (Postfix) with ESMTP id 536771B013 for ; Mon, 18 Dec 2017 22:44:58 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=46CULN9lgffG3CwbmHlyETKfcaD87w4jPVb5i1PWdKE=; b=jkxQzo6ZZkX7fBnO/DxHMmp8NBRuvn71YKd4jjXPOv54G0OljOCLCa5GUznkW4yMIiJDshhN5MKrG5X5E93cJUmtaAuNEcxFNq6xRQVybmYlOqDG0aqruw2vKD6MdLO9tdGHagrn3Qg8xcfPCJLYF4JodcQ4nLaPxXqTwsWW1zE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Mon, 18 Dec 2017 21:44:53 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.com, bruce.richardson@intel.com, harry.van.haaren@intel.com, gage.eads@intel.com, hemant.agrawal@nxp.com, nipun.gupta@nxp.com, liang.j.ma@intel.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Tue, 19 Dec 2017 03:13:56 +0530 Message-Id: <20171218214405.26763-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171218214405.26763-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20171218214405.26763-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: HK2PR02CA0163.apcprd02.prod.outlook.com (10.171.30.23) To DM5PR07MB3467.namprd07.prod.outlook.com (10.164.153.22) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5c6f6617-d705-4851-bf53-08d5466094a6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:DM5PR07MB3467; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3467; 3:LrETCCJYkOpxU+kDsru82vzTZZQ39yfidG2qasUhgQ5qXg2bUW63pGJagCj2vzQz/Ioxb5xZKskQAXh4vEYelsIebaUMbQ6pRz6k8zV54aq/LT0WSl6i4IDgjiXGGFif9mHgH/N7rqoUzX9bVKZv18ylFnYxSsXVKf9Bn7Pf1giMgJI7oH6mIOJDqLHyvXlt1N0q09gO14lOpQUMrnBmQ1n8DssZb3H9aJ2NmBeC75z2lia+1+VimZjt76OsebKB; 25:NRVNp7432btq7eW51u89odWIQjDB0MfUjbjc3QkvB6ULS8l1EWnUxALBMzZYTHoZNJpFcHy0rknDh8BFtLk8GwRiAysa22przjgZcl2D2MCYqWiPiOtKQZp8P6qX+5yY0KQbrU2nFNSv/7MYEb1JwB02DZOifDHlWwqCwjijCBXc1Fgn5k9DMK6G8URTNF6wHoZrDutoM3IAv8I+08+VDgEyMIDBGZK0cCFjx2YRnP0Rvqy/U6y/Qdqhfg5I5F4P+HfnWBJZy+LIZsxElratBiKVeC2f8loqS3n1fdU6m0U2r5+6h7mgw4SwYFCWZDKN/9Z5sDB0315X6jSoxewguA==; 31:L9iVtXoL4POEwlID1AZnpvBd59cnwDLMDY9YZBWcy99lxL3qWaAWE8GoWtEX2qFYFbJMZtydnoS5YYli10fwFwa8uGUNaDgD1XDmVa8eavxVHmXiZm/SIVCC0VD/d1tJJ+VYygqWwbyMJawUMYJAcbIckCIl/lkr3620JOsB/q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Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(8121501046)(5005006)(10201501046)(93006095)(3002001)(3231023)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123562025)(20161123564025)(20161123555025)(20161123560025)(6072148)(201708071742011); SRVR:DM5PR07MB3467; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3467; X-Forefront-PRVS: 0525BB0ADF X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(396003)(366004)(376002)(39860400002)(346002)(199004)(189003)(4326008)(2906002)(53936002)(305945005)(25786009)(1076002)(8936002)(50226002)(16526018)(6506007)(386003)(68736007)(52116002)(478600001)(51416003)(48376002)(5009440100003)(3846002)(6116002)(72206003)(36756003)(6486002)(107886003)(8676002)(5660300001)(106356001)(105586002)(8656006)(2950100002)(42882006)(6512007)(16586007)(7736002)(66066001)(47776003)(76176011)(50466002)(81166006)(81156014)(316002)(97736004)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3467; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR07MB3467; 23:c3kNW0VZb+bmsG4RXL8vf5pGg5pJo5FG7JNraPbZF?= =?us-ascii?Q?++1aHpuWaA7dxb0Po5lHfS1APCgQmG/YuKCefR+c/9i/Por1pqTt2ok/ONLY?= =?us-ascii?Q?yQV6NLwxpGaU2BZsFL0KNFNtkcPcCO5L+gXGssqp6rH2uPYjT9yVqg22DDFz?= =?us-ascii?Q?25nAUWKg2C3Q7uxfqiSTijm976KdINEZ2avR3jYpY7d4fwnOywC+YrXwdFqP?= =?us-ascii?Q?ODNKmGk/q7JaKGhkXvBifjR85M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X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Dec 2017 21:44:53.0212 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5c6f6617-d705-4851-bf53-08d5466094a6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3467 Subject: [dpdk-dev] [PATCH v2 03/12] app/eventdev: add mempool setup and destroy 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: , X-List-Received-Date: Mon, 18 Dec 2017 21:44:58 -0000 Signed-off-by: Pavan Nikhilesh --- app/test-eventdev/test_pipeline_common.c | 29 +++++++++++++++++++++++++++++ app/test-eventdev/test_pipeline_common.h | 2 ++ 2 files changed, 31 insertions(+) diff --git a/app/test-eventdev/test_pipeline_common.c b/app/test-eventdev/test_pipeline_common.c index 6e9088719..d34003362 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -32,6 +32,35 @@ #include "test_pipeline_common.h" +int +pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt) +{ + struct test_pipeline *t = evt_test_priv(test); + + t->pool = rte_pktmbuf_pool_create(test->name, /* mempool name */ + opt->pool_sz, /* number of elements*/ + 512, /* cache size*/ + 0, + RTE_MBUF_DEFAULT_BUF_SIZE, + opt->socket_id); /* flags */ + + if (t->pool == NULL) { + evt_err("failed to create mempool"); + return -ENOMEM; + } + + return 0; +} + +void +pipeline_mempool_destroy(struct evt_test *test, struct evt_options *opt) +{ + RTE_SET_USED(opt); + struct test_pipeline *t = evt_test_priv(test); + + rte_mempool_free(t->pool); +} + int pipeline_test_setup(struct evt_test *test, struct evt_options *opt) { diff --git a/app/test-eventdev/test_pipeline_common.h b/app/test-eventdev/test_pipeline_common.h index f87d02d6b..35367d546 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -79,6 +79,8 @@ struct test_pipeline { } __rte_cache_aligned; int pipeline_test_setup(struct evt_test *test, struct evt_options *opt); +int pipeline_mempool_setup(struct evt_test *test, struct evt_options *opt); void pipeline_test_destroy(struct evt_test *test, struct evt_options *opt); +void pipeline_mempool_destroy(struct evt_test *test, struct evt_options *opt); #endif /* _TEST_PIPELINE_COMMON_ */ -- 2.14.1