From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0081.outbound.protection.outlook.com [104.47.38.81]) by dpdk.org (Postfix) with ESMTP id C1FE61B011 for ; Fri, 12 Jan 2018 17:44:57 +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=RaawORFnzMgW4uHxLTMVka6orNunnPvnbMemvSNuE45DH9IWo38GxE4Ic6IYm7DCsNHaZtbtcapAyUtZBO9exFPJxwYN37KhZGl6iKdjGUll2irfbmOgCyZ8F6W4Br6NZ1WR7qSxe8XeE9YddiH3HFJOPBJIvM9C8VeMoKSqbTI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (119.82.125.132) by DM5PR07MB3465.namprd07.prod.outlook.com (10.164.153.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Fri, 12 Jan 2018 16:44:51 +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: Fri, 12 Jan 2018 22:14:06 +0530 Message-Id: <20180112164416.21374-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180112164416.21374-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20180112164416.21374-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [119.82.125.132] X-ClientProxiedBy: YQXPR0101CA0023.CANPRD01.PROD.OUTLOOK.COM (52.132.74.164) To DM5PR07MB3465.namprd07.prod.outlook.com (10.164.153.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fae08083-1455-430e-9f32-08d559dbcee3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020084)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM5PR07MB3465; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3465; 3:Pp7HS0VGCG+KQAE8XsTpTwx5vMew0mFnU3AAV1L/ht1+d66tFALycWRFpu+6KpVmAjNlfiWiEmOZrfxpTFWthCtxbs4hYXEJ2zZ5kS3xApsXMVqu6XcCAQe4aHXw+fxPLySUpd9we5HyzZg6ORqKjdsiFXGIlU1rn/eUsQdZ5tui7+7nvwBsEIio6eGDuF+i9E5Xl/hY28fw0UwJKZ0YMcqFMhi225isvvK+Q796MgRRxa4CBXjquQnz5UxWPkS6; 25:l+HMXNCOrD7PO+Tbd1F1n11+uhd9TJ6Zr9AgR7IUX/KjRBem8wi7wqKXobqTGqWx/kqYa+y7pP6T7G04pz+T8UrUKztKF5qqlhDN0PEokvrMqqCdbFTtuSF0Pc3Wb5z7cQIc+VZt+6yx+GnQjr/a5cil8xEcxCtzc2kUj6MaOm3l88q28jC+ZBvrMZpbQTBLZf0D/6TGMbq6cDTu38Pk6w82gVXguhcAO6RGc/z4Cbis1fJ5NE09zOcxZKswMMaT9U2ci/d+EavkqgZ5vQIujoW7djixKmOsWXuVwhoflbumcSnqsxGaQJoHXU+BxSoO05tfv944sU5MblzaOFGYmA==; 31:ixmZI+KBhzLYLPkR2dPf2BhxAZD+O1T4Da4yldmw3nZyUjPOTa4ObSG/uBNepAc1w1XkDWEsQSVOwpBy1VDPklhE6CU2RpCimRrV1erghzPZbbRSuoXCUxilFugYjZGpgIXE1NDFSUv8MmcKHJtjR67BpiIjKQOiANJ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oft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040470)(2401047)(8121501046)(5005006)(3002001)(93006095)(10201501046)(3231023)(944501145)(6041268)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR07MB3465; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3465; X-Forefront-PRVS: 0550778858 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(39380400002)(376002)(396003)(366004)(189003)(199004)(50226002)(76176011)(8676002)(6666003)(316002)(48376002)(53416004)(81156014)(53936002)(69596002)(16586007)(81166006)(386003)(16526018)(52116002)(6506007)(51416003)(1076002)(6486002)(2950100002)(105586002)(66066001)(6512007)(50466002)(106356001)(47776003)(4326008)(5660300001)(3846002)(42882006)(6116002)(7736002)(68736007)(97736004)(8656006)(478600001)(107886003)(8936002)(72206003)(36756003)(2906002)(305945005)(25786009)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3465; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DM5PR07MB3465; 23:LJPrRet2Srz0f5OPF7H1Sfgg+ls/ZFcX3vq8nnXou?= =?us-ascii?Q?vDYkC1XrcGzNPoCnXMib7rgAYGUrVjBRRGDvUPDOFsjhAGT4BFiZdIXauFYd?= =?us-ascii?Q?GUR5vI54sHEY1AoPXoiFMRWpEMCpIyzTFOqB5qvqGxxa8hSxndoDfEMnDbrV?= =?us-ascii?Q?+ero3+IkmFlAtRNou6GI+62Ll+xGJSDTO6HgjoO1kJhDXdbG20rB7QqDkpHL?= =?us-ascii?Q?iDf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/nShPAvT SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jan 2018 16:44:51.5589 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fae08083-1455-430e-9f32-08d559dbcee3 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3465 Subject: [dpdk-dev] [PATCH v4 03/13] 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: Fri, 12 Jan 2018 16:44:58 -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