From patchwork Mon Jan 15 06:11:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124474 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp568765lje; Sun, 14 Jan 2018 22:13:33 -0800 (PST) X-Google-Smtp-Source: ACJfBotStdQyEFinIdN2+VI+wbAi+mecOjVMRqb5O21lyQhBanxEhwsywHpytRK67Yp0AYZwy8Jo X-Received: by 10.223.137.26 with SMTP id s26mr30293883wrs.164.1515996813848; Sun, 14 Jan 2018 22:13:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515996813; cv=none; d=google.com; s=arc-20160816; b=vng3m8czP9C2pMRc1NstzW/WBi2gBf1Lin3YBJflX8rrEfCzSCAm7x5DoUgWEnlLIu zr6p3ktRdqGknbb2tSnw2Ev5dlVy6AERB7hDOQXVp5PeKUOVfz7LvH+iN8FiDupNBYP4 Mr8y09ug3+lXAOEeqJDYdqTOyPTDqvDmmGuELonVlX3mhESw+ClgYX5kosawND3R2F0U BjPP8P3cDX+6tnVHXkcSQPegcW4WtFTuy0uzO58sRLR5tFIBwRWPOWNmTG7d8z7E/xWY vqOjP6dwJGJ98ebAUzYjy8fiAt2UEMCtm0vwV+ghHTUb8l0wMmRmjDCAwB1x79KyRMVC 0tfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=v7zhtCA7kodLNihcXrxMuHqTr1f7naOTU1DOoCrY/Jo=; b=e4Bq4I4LSQr14aUbFtGakWmtMHJ7lqJZwf164l3MUYhbGNKlElFD+gXPzXB3skhJMD aRBMYFR1ODOOOdsixFwSU9WVMX0iz9+fLLD5I9KD5doMPoqMRux9DLucEIbJRCccaKSV HZM7J/j61PLZEB8VXakBjWAV0Mv+4EQKGQvuzUwRuAVZjitrLQDgoAx4lVx2rwGVoY8m aYuWZtbRHRZYwI+xcBKr6iHdrO2Gur3RgCKdxJTdW6KZqVCmSSS2dymifbZ7U0mEERt7 gJBD5q3uyxF8DwnQE+fsErTtSwzlEum2uevPbzF0w8N8TqTpj9Z9iE0vWeOggA+CyDf0 xEjg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id j23si10852738wra.308.2018.01.14.22.13.33; Sun, 14 Jan 2018 22:13:33 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 35A91A823; Mon, 15 Jan 2018 07:12:43 +0100 (CET) Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0056.outbound.protection.outlook.com [104.47.36.56]) by dpdk.org (Postfix) with ESMTP id EBFF612009 for ; Mon, 15 Jan 2018 07:12:38 +0100 (CET) Received: from CY4PR03CA0090.namprd03.prod.outlook.com (2603:10b6:910:4d::31) by BN1PR0301MB0723.namprd03.prod.outlook.com (2a01:111:e400:4c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Mon, 15 Jan 2018 06:12:37 +0000 Received: from BY2FFO11OLC003.protection.gbl (2a01:111:f400:7c0c::156) by CY4PR03CA0090.outlook.office365.com (2603:10b6:910:4d::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Mon, 15 Jan 2018 06:12:36 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11OLC003.mail.protection.outlook.com (10.1.15.183) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 06:12:36 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0F6CKAJ011776; Sun, 14 Jan 2018 23:12:33 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 15 Jan 2018 11:41:14 +0530 Message-ID: <1515996674-26338-6-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604703563665310; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(346002)(376002)(396003)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(50226002)(47776003)(59450400001)(2906002)(8936002)(68736007)(2950100002)(2351001)(105606002)(305945005)(4326008)(6666003)(106466001)(6916009)(498600001)(77096006)(53936002)(48376002)(5660300001)(51416003)(104016004)(296002)(76176011)(50466002)(81166006)(54906003)(97736004)(81156014)(8676002)(86362001)(316002)(85426001)(356003)(16586007)(36756003); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR0301MB0723; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11OLC003; 1:nsDwRHh4Vt1/CVg5cau4AlfCsV7snIZw5FfZ/Zy5CqY1yaY/4Hd4b3RjKpJq2oi0XhKLPe2uLoRLhq5zBpdVxKBHKyOqwWQpFFSQvRgLO4/Uj5B0smrdsL63Ef+4oXVU MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 55330b68-9fb4-4519-6e41-08d55bdef923 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN1PR0301MB0723; X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0723; 3:8cvo+b50eBFXmegHVyOEQhT2Yf0wruxHCYd2zDx05W62Dzdg5QoTJ2a0X8ir+Kl+xbIUnNZytLzJ950JAYHoIuulGgDIdVMH9qSbtdT3atySQv5GuJdAtJZjCvhgl1T5NJLZ6EyArB043aaU6+uX2aWIMtO6yuAlPFEVZ8DY97KV64IRNN0rel/6K8zXc2p79IHGwz1s25GclLjgznx7TGLAT9XSJHHFyjKaVKe9cqJaLzTdH8c5CQ5OaHZ88YSqWsRXSPnXBccq15LHiApSLkEro/ekNcAGCqF1AhbJH3JVeFqPwd/ZKST6KAl4PJXjbiImPteTMw56o5aB8Divz/G8+/905ZhRMamflBdteVI=; 25:4HLSOmffArJHdyWrsLLorJVTQvDAig+h92SX4ugQ/JzJhdvFhyJs9CarY8Q82+oGTno9an9FjwtQac//u8IebmQ52fCgzLHOwoTYaR2Y3BHVvG2I2LKg4jBB4REzpMCAlpCNFXuEtqpfyg8wWyIsgreFrs/Mj+0q5qe4PRUtLNBxlCBg5VD/2Uf7JwErO5keKoeziYY9WQh5WexMQrHg3fkPtDiZ8xut8iru7QpEJRx4mLsMoJ77lD0gDV/q1FGydUE0ryLCauEL9Zduvl4Pd0vblcs7TxGAfBKHqQW54NKfttQPMEDHuWvyojUhEodJqNyJBHNMS1viXBc+15PCyg== X-MS-TrafficTypeDiagnostic: BN1PR0301MB0723: X-Microsoft-Exchange-Diagnostics: 1; BN1PR0301MB0723; 31:a6npbtlx47dm5qk8jHrv5e8t2pw3OQkgwfvopthO3m2TO4V4tL3cGxT3gSG+k4lg7D2NG6C9gw0ETY5ulyjGmttpGdMYTPlRYL40vV0XnkThEwRMrlsHa38nQM+rDc4KmNAgvhnHnEs45EXzUkKLS7NUsln4ZTNCGSm6zDHJj/ynPOuidFEWmvfcadp/qTiQLnfE/x4E8PSQPZ7Y80M7gN5m8UWZGK551mVOftCpCw4=; 4:D14qf2Y9/o5VaHzXJlTloIN8IUczmmQAiWTO89cCm3BqSG53Gso2B2tBNlUCoh28/RbOWwadMZBW0C7CYccY8MPcvXrtziCAtWucTjQ+QjUq/ZUfbwNh6DHjesyFD0kZVpS5A41q6C4nanKBQ18MF3cse/0qD6cYxa3HSCnAwQANaPpkaBxpFCsuux2gVIiOyB/4SMvp5XYtrG/AXz6AiDjnJTUI4HxvbJMp8qT0g4DO4m9dtqanRXM/fEBSTXu7xX9eIxZgWs3C9usxx1VsWGqiKUjnN5PwlF9U8pxSooHsaiV97xISzWEQZIc3LhLE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(3231023)(944501161)(10201501046)(6055026)(6096035)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123556025)(20161123563025)(20161123565025)(20161123559100)(20161123561025)(201708071742011); SRVR:BN1PR0301MB0723; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN1PR0301MB0723; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN1PR0301MB0723; 23:aPKw1WPwZH4siWc9I55ZNK1Z2v7ssOFRjZs0X8q?= 2CN6wjDKmvRpyxRNbXHhdCcyzlr4NHTNJCiVodvVK9bAcBPAV8sa7Z/Lod4o5LZ8Jeh4iQMUQN5oH4wxbO4NYb9YAdiLbuW/V6Iz8plgq7VVY6hC3UdP5gjtkKCCKP1EjRik76MF7IPEG0vWjoZ8UZeYVSRkq7tj9TpR9FFNp44QBu9e7FdKj9ght40dl1o/8YMRXMF5CC+NVdRCBUKri0gGX8nyQhl7dHQNofwTr/HJtRuk309STIvJblZAuUzdXXt/Sxjlt/BYbW++fTeE9cJUtawTiZUHQRkJQ4C4YklDCsRS03EmdjSlHsRqveJCeiONK8Fcfueq0JRAVNgCvMp3btnpCDKH5XypUue5ppaIyHzYUotWtVhCmbfOOE3U3CDcSzmSDhG0hy1uPlQqbuqqgBjbG/26GtpH3EDzFEpLVaJLujoNj9V7UH68w4vduXG4axt8rVjKQrlcj54W88VqeWypp6S7ETIZETI2LOT8GY2PCTI1/KtbIjwiGBRzuidIjDYovwKXYfwX66crHIokCsXUPYWA6Jgmr3HiH/7bSKiy4w4M5mHM4o0hkKLkZSQrRBoU4WdJjjmvVPozP6bFPfNpkaXa0VbWg5j0HnSxmjunzVOuKCR5fsIS/3BHnR957ER+NE/6OqUNfmNylwkPLo6AKWgzA1djGNzA2tZYlXIOqXKeoT3wsLn7RXRBHC/XWPEEpUMy+P6qHuLwrevmqBNKltbUSNnvU+w9zFM3XABKrMWKx01hInqg8mxRWp04y/wYf36Fzt8v43ara6RLN2EoUjJMIgRqm6VkCK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Jf8YQPxMO6P0Vc1cTbcyzMcVpoSOBzgJ80JoseR/t2IRhCA3I0ML5qbx/EwLjfBzfh/lRv7uvrvEZQVLw8lPVi1TIzkCBdbb0ip6jc69Kr7p7QcWjZQ4QMjCZCtjVdNhDVKGCVtVMi SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 06:12:36.1637 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 55330b68-9fb4-4519-6e41-08d55bdef923 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN1PR0301MB0723 Subject: [dpdk-dev] [PATCH v2 5/5] mbuf: add user command line config mempools ops API 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch add the user command line configured mempool ops name API to librte_mbuf and sends a deprecation notice to remove the similar API from eal. Signed-off-by: Hemant Agrawal --- doc/guides/rel_notes/deprecation.rst | 7 +++++++ lib/librte_mbuf/rte_mbuf.c | 8 +++++++- lib/librte_mbuf/rte_mbuf.h | 10 ++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 1 + 4 files changed, 25 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst index 13e8543..ec8018f 100644 --- a/doc/guides/rel_notes/deprecation.rst +++ b/doc/guides/rel_notes/deprecation.rst @@ -8,6 +8,13 @@ API and ABI deprecation notices are to be posted here. Deprecation Notices ------------------- +* eal: a mbuf specific API was part of eal APIs. This is now being + moved to librte_mbuf to be with other similar APIs. + The following API is target to be deprecated on 18.05. + + - ``rte_eal_mbuf_default_mempool_ops`` replaced by + ``rte_mbuf_user_mempool_ops'' + * eal: several API and ABI changes are planned for ``rte_devargs`` in v18.02. The format of device command line parameters will change. The bus will need to be explicitly stated in the device declaration. The enum ``rte_devtype`` diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 482676c..c587d3a 100644 --- a/lib/librte_mbuf/rte_mbuf.c +++ b/lib/librte_mbuf/rte_mbuf.c @@ -168,12 +168,18 @@ rte_mbuf_platform_mempool_ops(void) return internal_config.plat_mbuf_pool_ops_name; } +const char * +rte_mbuf_user_mempool_ops(void) +{ + return internal_config.user_mbuf_pool_ops_name; +} + /* Return mbuf pool ops name */ static const char * rte_mbuf_best_mempool_ops(void) { /* User defined mempool ops takes the priority */ - const char *best_ops = rte_eal_mbuf_default_mempool_ops(); + const char *best_ops = rte_mbuf_user_mempool_ops(); if (best_ops) return best_ops; diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index f958e3c..7feacc0 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -1143,6 +1143,16 @@ const char* rte_mbuf_platform_mempool_ops(void); /** + * Get user command line configured pool ops name for mbuf + * + * @return + * returns user pool ops name. + */ + +const char* +rte_mbuf_user_mempool_ops(void); + +/** * Get the data room size of mbufs stored in a pktmbuf_pool * * The data room size is the amount of data that can be stored in a diff --git a/lib/librte_mbuf/rte_mbuf_version.map b/lib/librte_mbuf/rte_mbuf_version.map index 9b53502..d4af497 100644 --- a/lib/librte_mbuf/rte_mbuf_version.map +++ b/lib/librte_mbuf/rte_mbuf_version.map @@ -41,6 +41,7 @@ DPDK_18.02 { rte_mbuf_platform_mempool_ops; rte_mbuf_register_platform_mempool_ops; + rte_mbuf_user_mempool_ops; rte_pktmbuf_pool_create_specific; } DPDK_16.11;