From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0066.outbound.protection.outlook.com [104.47.37.66]) by dpdk.org (Postfix) with ESMTP id 757541B31F for ; Tue, 16 Jan 2018 18:47:32 +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=hng7C/4YavEelY+zqGAK7wFPSP7riLM5+x7H71nblTDC/uOUe6GVjK95gvh0hcMaqazt2dFL3v1XIhnLgECNjkxuIQzPn3SUcUy2PyYn78DWEFph1kgZ3Rd6Zv/l2AeDFfoEccD2zyG7RP4AvUgAnaj2Fkqc+KqXFPYAZwbSUVQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (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 17:47:26 +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 23:15:55 +0530 Message-Id: <20180116174607.10821-3-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180116174607.10821-1-pbhagavatula@caviumnetworks.com> References: <20171130072406.15605-1-pbhagavatula@caviumnetworks.com> <20180116174607.10821-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: HK2PR02CA0158.apcprd02.prod.outlook.com (10.171.30.18) To CY4PR07MB3464.namprd07.prod.outlook.com (10.171.252.145) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bb1a7254-6074-42fb-1e6c-08d55d0937a1 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:m7cqBkSyg1hKiWmlaD64hJQZr1Z4L3Lp0m9zGurK2f5L8XR4m5hd0oZgabXtBAqMy4D+BUDESEDarEWOTyTwkYGvsBJ5ltirD7bEvD3T4IdB0V80FfZiPaT3KuHcRcc8zPeCqy+4lDULUYfXBXF7LOE8u+jST4MRyMd/piYoD3ngQfkOMq2eENIAKE1yZBIkmFcW7AezdF9N/65MUHWd3yJ5u2KE+4PhOa33MUaY4qpdUH80quNWE9fU5JMluvq4; 25:rdUWgqPQCFsqktgJ/9NlcvthxJg+GvD8p3DryMjXM6iwAxKcNbq8KXgLrqSoInRqDCXVDqwbTmVylHTi/hiEr/NKe6VQPGpxvPQEVoyPZ2J/Q98Fbg61OWD9vHNBHXD34Eioq1CU6fd8Y1SQUm0uuHC/58/QHii5Ba4zGzBTwPrkAqsyd4Jp7sQPRTqo0ShfkZ6O9wInHuiLc3GYY0OW7cuQYSOSwVcnowI3+YyxWUQqjmnaJn4GgJSkgdPqTxgVnE05iFC/p+AV3GmtZ6TwkdlfFEG8eCf0FX4kE4DVs4PJeKcS6JWCkT2nQ0wkGJZYSuEvJ4nNM6azaV6Le+AI4g==; 31:Pb68gBC1a/T4ukEYfrL/qtF33A4yySPNBgMg2w11+tSMLOWJPpGOoVihfmZ9/yOyCWlliYCgPP2mx/GpMKaqzm+xkQd1WNZ9xmFT/R+F5jPYy1P33lUO0FAXhxsFVhdzMI0qj+npDJK472FRLTsDInug5OnDNulmgCPZ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mTbsXh 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)(3231023)(944501161)(93006095)(3002001)(10201501046)(6041268)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(20161123558120)(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)(6069001)(346002)(366004)(39860400002)(376002)(39380400002)(396003)(189003)(199004)(81166006)(97736004)(8676002)(6116002)(5009440100003)(52116002)(305945005)(8936002)(107886003)(1076002)(51416003)(81156014)(25786009)(8656006)(4326008)(50466002)(6486002)(5660300001)(3846002)(7736002)(50226002)(16526018)(68736007)(106356001)(26005)(76176011)(53936002)(6512007)(47776003)(48376002)(16586007)(386003)(6506007)(66066001)(72206003)(2950100002)(36756003)(2906002)(105586002)(478600001)(316002)(6666003)(42882006)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3464; H:localhost.localdomain; 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:7Ugqc1bapywrGyM9K21Gy2z3s63ogeBnHKgMgj6fv?= =?us-ascii?Q?ErSzADeGUaAozF73yDk2eZ/Mq3Dn2+fcRb8Dh5sc2zZBEQT5GNLvQVQI6lzZ?= =?us-ascii?Q?ZK+sjpjuDt5BR85QHf6djda0hP/MKBtkVpZfLEHOhTtCpp9TWmrBi0N8lj1X?= =?us-ascii?Q?ubEfx7perdPauQHIDXFutBzWlKctKYtlm9X2kHdt2ztgDM9p2tGZeZQg5O7Q?= =?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JSz60a/eHPJRh5Ww99TxWN2lFnjSOXRN7kmwyCCLo+vrEmjvflzWKeigfko427iON SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Jan 2018 17:47:26.5312 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bb1a7254-6074-42fb-1e6c-08d55d0937a1 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 v7 03/15] 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 17:47:33 -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