From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0089.outbound.protection.outlook.com [104.47.37.89]) by dpdk.org (Postfix) with ESMTP id 64E991B2BC for ; Tue, 16 Jan 2018 16:40:42 +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=Ha7O5dxFixLcyRR0uFGVV6g62M5sbltnmYezD5BmfJkK6GjBNgOJcRtffyg//uZCNAv9UCWUs9E9K1HqejDaP1yY2g+uAZxBGVBxKYOtezOBycLNEX9OXvTH1qL9iRXPnt31fkNluMZUybRk9v4a1gyLEfzdli3+m+1IPUSlqwQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (111.93.218.67) by CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) 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:40:38 +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 21:09:52 +0530 Message-Id: <20180116154003.3762-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180116154003.3762-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20180116154003.3762-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: MWHPR02CA0016.namprd02.prod.outlook.com (10.168.209.154) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb6c4bff-3125-4c23-4ed8-08d55cf77f88 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY4PR07MB3464; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3464; 3:4aHBC4HA3jkpxBDUI13SqlJWS44l0cQB8P33euBL5aOZ/sG2jCZc6VqbPFD6DVaF3PjQxwW9P8K+Tu6UqxxOiHfFuGyQTS/HHH7SSI81bJaFu01lUdYRFBlILHH11S71HxFtfsrWcI/3mBIRqPvW8fhpQsR7nbgAolIFG0MlJGrxNeNfDdpxTnhLJzMy8WuiuTTAOG5ya+VuDnVcUT8QZJGZqGeHnkfAwlahjNoOfH/7g8+Q84CmmjPbaF6wbnze; 25:NgvS74BBynu509MSTXJfoHNI5tPQdZV078rwKFZiyYKSIt5xu3bSeQoc71DJ+TqxqzzDz144tb0QBG7x/Q3vK5SzdJ+4A+ViEVU5+KovSMMajhAzkGro1R/uCONzLpVDee+L3KuRq94lkrR3TndjVCZwuhic6HQ9ypFdXsWcsd4xAyclLbPTwVwerDf3Z5WNkRkUisoX0GAbKi3Rd1wJ1YeyHWSYZW0Z/wPKkKklQiwDPuAFyiQbN/Pl2UBgGrjwl7iPzZQwOEkWtZMDpETYKRHX5su3cMLI+pi5ZY5DjgBz4VnQi7xo3UdIPM75AZONGOdXRtBBcE2ejhBuj1UQbw==; 31:2qFgXFkyGtP9N8IzU7qIwjVLsHPRU8XILLp/p1ehAxQSpJ8XzsaKGQUCA55KcTD4ahSRMH5NH3hfXNKtkXhHUqhHcU0qp9J3rZF1jMzvZ5XXpqgsjxbbhTRzdLiXsuIHRFzMhkWcuDBu0byjRK5TqN/p8Q66ki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tn76EZpYdisRc+Go6K X-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)(93006095)(3231023)(944501161)(10201501046)(3002001)(6041268)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123562045)(6072148)(201708071742011); SRVR:CY4PR07MB3464; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:CY4PR07MB3464; X-Forefront-PRVS: 0554B1F54F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(366004)(346002)(39380400002)(396003)(376002)(189003)(199004)(81166006)(97736004)(8676002)(6116002)(5009440100003)(52116002)(305945005)(8936002)(107886003)(1076002)(51416003)(81156014)(25786009)(8656006)(4326008)(50466002)(50226002)(6486002)(5660300001)(3846002)(7736002)(16526018)(68736007)(69596002)(42882006)(106356001)(26005)(76176011)(53936002)(6512007)(47776003)(48376002)(16586007)(386003)(6506007)(66066001)(72206003)(2950100002)(36756003)(2906002)(478600001)(105586002)(316002)(53416004)(6666003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; 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; CY4PR07MB3464; 23:Vkma4nnf152fUk17MMChF+/371Ko+gxqyhE5YtARz?= =?us-ascii?Q?3OQIqKK+oBp8gXmQzgOaGDO0yntCdGgRAJXQnos9Cht9fGUT6mHmPJpiiQk9?= =?us-ascii?Q?pUDYNoxxVpGWOum/yNobDgiG6CbA9L0U1Xxc2cYnQRINvDt3nwRTKjg4+8B2?= =?us-ascii?Q?SbOVK8drfOMuUfRmn3am++XbiJ2/CgIJ3eoiir4VwN5ZRw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RHbZNwupBqNoMKgP6zIgeKxO+L8FsY2ffBz9FV0jQOSbZkoA9n3FcF0Es8t64TB0VtTfoiW9WOKXqQIYBqHg/V7Jrc SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 15:40:38.3172 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb6c4bff-3125-4c23-4ed8-08d55cf77f88 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3464 Subject: [dpdk-dev] [PATCH v6 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:40:42 -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