From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0088.outbound.protection.outlook.com [104.47.36.88]) by dpdk.org (Postfix) with ESMTP id B00B21B1A4 for ; Tue, 16 Jan 2018 16:18:24 +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=bUv/3sf4e/2EiTQPs+xrB9U9dnFLmFMoV70etXmrCS4=; b=KNS+8TZtjHYbLjCYhj7gtCJFnMCUNdhC+1TyO9FIbaX/sMILNwIVTXx/jYx61ISjs0xVsXLZ5LFa70tyyVNJC+xuSFEjTnKJGPkfI1A5Yv0LPgaw2GP+EX1Vxp+Ks43TQqjPSurWK7aHLqeU9tDcwx1Jsh8+/zGKwfKQk0cT1xM= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by MWHPR07MB3469.namprd07.prod.outlook.com (10.164.192.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Tue, 16 Jan 2018 15:18:20 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, santosh.shukla@caviumnetworks.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, 16 Jan 2018 20:47:18 +0530 Message-Id: <20180116151728.566-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180116151728.566-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20180116151728.566-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MWHPR21CA0059.namprd21.prod.outlook.com (10.172.93.149) To MWHPR07MB3469.namprd07.prod.outlook.com (10.164.192.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3c31628b-613c-44a2-625a-08d55cf461fe X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:MWHPR07MB3469; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3469; 3:nTA2gPvQGirIAc/zDWmzcLwPtAwL1GwhTuuVDwExs23wM8utJTDzOa6S5sKvQcmE60VElJKmvFt3ryGOuwTxltw2SMIGqfP46cgf5UUXJgGIW13OLtCCfA2LVscNqEykhv3oeUQ/8qNN4B9fw0KDL9/ur3Z/k+cSLTdtRK31/1jGjcRMye71LX2B85WRsT65VtEv3YrS3G2/km1gFIcobivgvbcB66rLw2gbYBgmPTTESVc+3q7egtD35gLXOlYt; 25:5AYNkDl43wpXUZdzDBgjUi6m+iQsFkGF0WkNRZw+xf7da/AK+5s9EUWPuccmycnavkk4PuufIyGlw7K2YTLYXCP1Voz3f6n07zyxHNjVRaxAWalCka4hAPD1IrZ6bM4w6qAcn0rGF9qne1Awpt5eEskQduLy6ij0KUJYC7/V1YU64bwcNMq8mILz+JQ0BOsh79F1p82uaSEtjDkynK58SYsjvU98eMrdqFhtUlTL1DRxNkWXyPcQwBdzsO8cbAopNmKsXG7bsgp5+G+Nl2t8PH5z0VuSNeJ8s1qY9cMAlmL9G6AsRCf2vl0IhKdOrpM0T9DeQi8goStkK1DXWLy95Q==; 31:CpxUxXrBX4umJZtdajJ+1BBMHJvS1/fDqOtusUr1348dNmX8TbTWzivTBLYVyCR57FPvCJUi7Q2xF7b688torpEN1AV7613Wl22cioxOlw3iw5v8lXr9wFFYPAaYy7hRooerUT3MWimXrzmj7woCFfq47T8XuT48S99A92v652cYIKYaBtEPVn6fDVDl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PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(3231023)(944501161)(93006095)(10201501046)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123564045)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:MWHPR07MB3469; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:MWHPR07MB3469; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(366004)(396003)(346002)(376002)(39380400002)(39860400002)(199004)(189003)(2950100002)(4326008)(42882006)(5009440100003)(107886003)(25786009)(68736007)(16526018)(72206003)(478600001)(316002)(5660300001)(16586007)(26005)(50226002)(53936002)(7736002)(305945005)(36756003)(53416004)(6116002)(81166006)(8656006)(69596002)(8676002)(6512007)(81156014)(8936002)(97736004)(386003)(6506007)(50466002)(66066001)(76176011)(52116002)(51416003)(2906002)(47776003)(48376002)(106356001)(3846002)(1076002)(105586002)(6486002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3469; H:Pavan-LT.caveonetworks.com; 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; MWHPR07MB3469; 23:21dNF3WIqPTwjhyPdFYlnCTTSuRdhRbFjFC4Z7e95?= =?us-ascii?Q?Z5h86UNcpYARGnhkZdX1AyLPlO4jTtXSA+uMpqOef6Gau2zMWgJEb5b6EqL1?= =?us-ascii?Q?IWJ/AUY7xDGnDFRJQ6T0ZETRCInXdWPYxkFhm5EFJC/iqazlgOaLJ3AESD2g?= =?us-ascii?Q?m9WNMkxh3YjMmGRIUPN4C0H46PKjWOO2QeczGlOrr0qmApSWZawQu0bS8a5n?= =?us-ascii?Q?mZ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lPIsIjppFPPYFX0D2qJufLuZmPmHugOVmNl6 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 15:18:20.5035 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3c31628b-613c-44a2-625a-08d55cf461fe X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3469 Subject: [dpdk-dev] [PATCH v5 03/14] 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: Tue, 16 Jan 2018 15:18:25 -0000 Signed-off-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- 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 aa3481247..ff60fc36c 100644 --- a/app/test-eventdev/test_pipeline_common.c +++ b/app/test-eventdev/test_pipeline_common.c @@ -5,6 +5,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 645571cf5..569db1de5 100644 --- a/app/test-eventdev/test_pipeline_common.h +++ b/app/test-eventdev/test_pipeline_common.h @@ -52,6 +52,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