From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-BL2-obe.outbound.protection.outlook.com (mail-bl2nam02on0062.outbound.protection.outlook.com [104.47.38.62]) by dpdk.org (Postfix) with ESMTP id AE2281B220 for ; Wed, 10 Jan 2018 15:52:22 +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=52ufyF6A8sCuvy+WaWjKFYcxGZvl4eRs029OBfOh05M=; b=UHkoPlEfO4W24t12QPB0XdfhZ6dIaSscJ8xDkNN3e/+ERADvl9p7mfqMMov0lyPE9ajhISvy0yiBO6KAb7CjSB3ECM0pC0O1zJKcosZPHvQgfBj8y+HszHvbzAgJcV0SuIEFb1J57JtCbHqhL24820wCl89qy5f1VITSBB9iF4A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.386.5; Wed, 10 Jan 2018 14:52:16 +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: Wed, 10 Jan 2018 20:21:35 +0530 Message-Id: <20180110145144.28403-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180110145144.28403-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20180110145144.28403-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BN6PR16CA0009.namprd16.prod.outlook.com (10.172.212.147) To DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 76cea20c-389a-48b7-ca31-08d55839bff4 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:Uf571PNlF/OTZ39RQF4jm0h8KRbT255UJ4upsLza38SbbUysz+V3xNiAOK7WmmHRzSY26l7Ay+yh+qvJITLrDQNrM2PmyE7xBJyfmIvdJVl+xitZxaPTBJWeLERlXUkO0iS5psmWvr1e/2oOcqi11CYDGUFRSBXtOHMpph6eoynolMUNrGKEGUoHcV8DCf2EPSrsDGURHLt4PDcSgkXlyHDSdhKJmXRsNfnMBwXohPycxyraB3QfaLUNm0vpM6nP; 25:4qh4pAD4GHxmt6uy2XPV68WY10KIx5sNETa6oo7ragMuw2/HmOTRfOA2KFeZzotMk1mayI4CEU8NqvHnWCmkPwHUWoSo0zboWogUqWxTpY6bAUubszBAWhj9fkpsLRrNWK1PdP64jzptHXBFS5g7zp+gya0JO4RJLxxnxjFYVmF95IHH0GdStA4kseuRaXCVWtpLbxQ77PtwSjqMusCpDEu71k4zIpiV9cjG5Ga7RRHzAmpnibKa425IgfU17O+L61wVPHurvHcqszP8vzeAmMRGHgi5kTlETZognRhZ6xXWPnV8lCW6PuxBUQoOezveVjjU5gL5cLqct7pFn9Mrug==; 31:caWhfKmaXLSYGS5jttR45aigdXJyNc/O/5eyAk6NLzKvaRCEiVD8qKhsY8dbzNnhDY5glHB8z42AkxnW6GkGc4G9xtZnjmitSoT8LcvOh7qGy2/7burIb20m0eBtpNGbOcsJrIsHeSx4UgUhv2SZUm1qhKeu4M9aKApHuyXGjQeP2uXTrk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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:(6040470)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(3231023)(944501075)(6041268)(20161123560045)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3466; X-Forefront-PRVS: 0548586081 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(376002)(396003)(39380400002)(199004)(189003)(76176011)(25786009)(107886003)(4326008)(6666003)(2950100002)(106356001)(42882006)(8656006)(8676002)(105586002)(53936002)(6486002)(52116002)(53416004)(6512007)(50466002)(47776003)(5009440100003)(305945005)(68736007)(51416003)(386003)(6506007)(69596002)(36756003)(72206003)(2906002)(16586007)(50226002)(316002)(478600001)(7736002)(48376002)(3846002)(1076002)(6116002)(5660300001)(66066001)(16526018)(81166006)(97736004)(81156014)(8936002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; 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; DM5PR07MB3466; 23:DWMGBEffLG2Dr0v+5KJIk0dc6HgbdH7b2rcouCDHj?= =?us-ascii?Q?BS6p0ybKCjnhk3SeFHUC77pttfO6X20WGaa5PprhkcJuKuTCAf6kOroHTxFV?= =?us-ascii?Q?ozd/krwP21H2okGPtJsbNjghdi7ga0jVDroU9kqaombHtKlxDTExGyr2KFKd?= =?us-ascii?Q?aRsP6TbXPwJ1Kg+sHsPiOO+2x1XUkart2CJH1VMmMK39Foe3ObMinNZ8KlEF?= =?us-ascii?Q?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aA3qz1uVY8YOAJ+UHC7YUAC8JIxjy4PM/i99 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Jan 2018 14:52:16.3569 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 76cea20c-389a-48b7-ca31-08d55839bff4 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3466 Subject: [dpdk-dev] [PATCH v3 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: Wed, 10 Jan 2018 14:52:23 -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.15.1