From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0048.outbound.protection.outlook.com [104.47.36.48]) by dpdk.org (Postfix) with ESMTP id 116711B00E for ; Wed, 13 Dec 2017 20:56:18 +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=mUu+ylkDZyRlnx67Xb9n7bgTAHGfUa/aDDFzLqacPaI=; b=S1zV0C6wrUg+Nog63dIqEdqfm7Fjx3GjgeH2O0H6pwQ75iTo7ro8n/tfTm2vOxw1iM4fmFa2b85dj2eH/GJhP336CH04C4NGnMvs2TJUNL1sY9hNO2Jqqeg43Igim51NPQmUlXEI7xpcz47HP5tAVFJJuFn15MLB8Ygf4AywEMs= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (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.302.9; Wed, 13 Dec 2017 19:56:14 +0000 From: Pavan Nikhilesh To: jerin.jacob@caviumnetworks.com, jingjing.wu@intel.com, bruce.richardson@intel.com, hemant.agrawal@nxp.com, ferruh.yigit@intel.com, thomas@monjalon.net, olivier.matz@6wind.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Thu, 14 Dec 2017 01:25:36 +0530 Message-Id: <20171213195538.14290-2-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171213195538.14290-1-pbhagavatula@caviumnetworks.com> References: <20171213195538.14290-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: HK2PR02CA0186.apcprd02.prod.outlook.com (10.171.31.22) To DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 347475a4-e12a-40df-e172-08d542639304 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:KGwlXQfcY1zUxmuj0XxPJEF+G6yTTLzO+lvHOeq0l8lrSS01MUjIp9AjrWimsBlAJurXHAPEVal7BBwChmPdR3o/J1h/ygxQK42ieYF4IpA6xvNuZPyktcnvFnwG1N5grmicb+lSsUOosAzwQeT9HX2HtnWiaLUPap7qrmPtFiBB+XJK0CFK5hs+lUlnebvgJGBTmtkMGxGZR85hKIaJ8a2ymM7/ynx3QpldEGq9OA1G4k809kSCSXyfWKCmiB/7; 25:B1THNQO45ak7TWSM0kNYod3L7+uLfpufT/ux9NlWVJSRk937rPe3+J64tel4v0aSF8a4DikJgJOBh4kDMypNwdas1tGozJYmvRFxqEnASM8TyMAvHOSh0ZpoeBUx2YDlDf3tdH90EC0+2oBPmyt5NnsJl48AKsZHXAmcaiwq6QEkwBM1ywPjY075aJVeMr8d72JpoDLvKvb2AEDsza7W0EHaBPO0pig3GSSZDqjZdCksYTiquvA49xTmibnflfa0gB6fve8plyL+gqxGaHdI3mvdNkcdibaTeRzS9p0y/iSmsZDwHQSas66OXGDkq9ysgo0g0zeCM4D5N1+A98GHsw==; 31:q13Abg4rJJWZowq0dihNeIUYPpDpnPFgkzlf840Y1GGDPyKkzIAzgFM5HP2PUrTUYEnWx+qsWH1vKxrByJqXD6wvGh0h616ppYgtnCRmlHtMDxTPq7Em4btt5+dgkz0YthSrPJ0tovZcH0QucIQPohQ+1DoA6JvT0+V8HX8vxS6B141MK4n3lmlgZRMqHyu2nS27vP6uOfueblpxP4hQicPWeF7ufwZ0TUjxLj2/PLw= X-MS-TrafficTypeDiagnostic: DM5PR07MB3466: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 20:G9OmfptpbcvjE64ZaOVjVqqA+AnnZUzY9HruFqHJ9/PtnZpRb4fuuZSSHee5r4sQ6csi2GCreCb+QJo0MkWHceDkSFqdlAIFa1mUZBiauJN6a9MnL6A7fpPGMAR3/iIe342huCp26WgaF74BhMh3sbAwBVtmL80yNYi38YpJsRmvTf3LpsZVoeqWJryoUHN0L209dm1klnhCc1Swq5Peqi1QIrtjN0FfQJuwzsOggUnUJ/z93jMm/60k9uYH4YdYFPeqDB/fL5IpVpRY5VxW+0yXT2vpGGr2BC/ixjjnVyQWVyo37ykpIdKWJ32tJ92cCeCZauav68ZEG8kpvkJLS5WXfKysfUm2of7D40QmQEvUiBY58py+YY5IdOqbaTH8uQ9GcmtAC+qbDoBQIN7b4QQPnLxSZrGQDQzyBK7ZawJ3KPEcB3ghMWjzfTG9ECURZwIwgDRj5w76g1eQDwBDE0/UFCsBKbQqF38v4jbaR1I2NSrRyaood9K3qjbk9q36SpqdwKgJ5ZLyuoi1c+rPOt3cN1qkNaENCfwifYYpGMVRNF421Q6uTGbGoO9adTzdi3qyp/w7nNlDkeFeyX4SkKfM1uoUo7KR9QWZ3ic0U3s=; 4:ui9UQFaUa4bxGL/AclFKC0+4mLa2tViTWzWSPhGq5fxo1WqUx/773GplTWid9p3bB4QkOhE+depQvr8U4x8WaBypKOzGRuR71N6lxefWNWxc2oejLyC5CsYGIXi3p04CMdNFT/vbXTyhbdUdYQRS68nRVmcaEZl9wIifbbJa7mpf84mD2L+iSq2XwXM5Ekf3GbUw/ZEsi4mgkazM0SHO6dipE3l0X0EFoYStYA12/j+wrYFRXsYU9quP8ySQ5o7EPmhtBeGZqJVgM3ieSInxQQ== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040450)(2401047)(5005006)(8121501046)(10201501046)(3002001)(93006095)(3231023)(6041248)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3466; X-Forefront-PRVS: 052017CAF1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(39860400002)(346002)(376002)(189003)(199004)(97736004)(2950100002)(6512007)(47776003)(2906002)(36756003)(1076002)(5660300001)(52116002)(6116002)(105586002)(305945005)(7736002)(3846002)(66066001)(6486002)(72206003)(50466002)(50226002)(25786009)(48376002)(8676002)(81166006)(81156014)(478600001)(4326008)(316002)(8936002)(68736007)(16586007)(53936002)(6666003)(8656006)(107886003)(51416003)(106356001)(76176011)(16526018)(6506007)(42882006)(5009440100003)(386003)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; 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; DM5PR07MB3466; 23:6tpQqxq0U3HSTnmmTvR7D1tGqSEXNi1CLxRyXZYnJ?= =?us-ascii?Q?KQd9SOw0im4tLKuoNZ8XS3WXhgZntMpNkEpvHzaI0uIKBiQ6jd52K6ETXzSF?= =?us-ascii?Q?pD7i3luxchmvy3kKaHOO0ELiKdtBeLOH5iL+hjbcs2b6/e6zLX8xiVTL6QSO?= =?us-ascii?Q?aY2LyjPMPF57Z++z70R/MBEkGh0EfXydrKX0rNW1h+2xv7SQ4QTEcjZjtFQB?= =?us-ascii?Q?OqIxUcCoJmNDXGZuetXHwSAbmLP61XdinOm02Rqeed/rYu1rP5imsvAl/yip?= =?us-ascii?Q?KkvNlYh6kAAl3Ldwyoc/fpAiJiLeJUZyxlAqWNHuWCGxTcLMwC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1; DM5PR07MB3466; 6:fs3zyAGfd8SlvCbZTm0CReN+vicpmAKGRjh/Xv3aob9qKu4lG/xiNKGQOVjHyaO5Tk6UPujBmlfOm301E5dk/iHhu+GBL2m+a5dFFMXsigkRmCAqacxmLLXU+jAhxcKN1aB9MCuIUlM2H+yRKCIRh6tWG1c0RLOQy4YO8grpwKBMNXgonLKbDmFoKyzKEFr68Hny75XI/Qwf6HuLs0C8ReMX6jNmCvmY+Ria5Xq7Awpw1brlr5L4njhPbjXpmfLXG3X+qiAtNZEhK4SL3gIoi50yCpFFNKnCatNnQVBCvQyDLZqppfcMTvkBhtE8EeETc82E8w0QBgLMFTzQ0JfEkvMy0PZDI6XNUoNL/cbdENo=; 5:Rz0HflPVZokV2dqYHMSViS0j35k51+oZNa248cU/fvlOjSYhyhabuEucWlhDxO1+Myz6y6xQwvLTUpnWjH8dEZiGMAuBpk+hhUJ2EZefc1xCMHzQoBPKM/76R4UKV16WhT6AkYxj8SeMvmwJiEdfSVLWdW83WW4r8f0qQUNaMZ4=; 24:HNEiARHP5ng3gS9L38l9vmeFd3R2EwIb+e3p9qwJHul2VR3/vg0kLOVjUE5VsfOyIJagYdPglNo48UBLWx0Q0UdomWNKfa1GFKiijvzUhrs=; 7:wp3jF/LGjBqKy6QtL8PwpumLg0UEllrS004CAgAxA/Fc0sk8K4LT5VwVAFdxrgiki0Vtbx4PIZJE5uORYW2ZC/ZLRrSLKwLv9JsZV7x6epM/g+7Xk409U3bCGTADuYEoqfnKxUQOXHXgyYsWUdPh2beinFhZAlyXDDjYh/I2tP0J2dZhxugHi9Bdp/yVNykOJEd27s8KTmgl3cmsfc3EU23C3x1N0F6uF9uVfrsL62UMABZmZ8tXxEcr6bGn9xt5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Dec 2017 19:56:14.7933 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 347475a4-e12a-40df-e172-08d542639304 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 1/3] eal: add API to set default mbuf mempool ops 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, 13 Dec 2017 19:56:19 -0000 Add new API to set the default mbuf mempool ops name i.e. set the provided ops name to `internal_config.mbuf_pool_ops_name`. Signed-off-by: Pavan Nikhilesh --- lib/librte_eal/bsdapp/eal/eal.c | 6 ++++++ lib/librte_eal/common/include/rte_eal.h | 9 +++++++++ lib/librte_eal/linuxapp/eal/eal.c | 6 ++++++ lib/librte_eal/rte_eal_version.map | 6 ++++++ 4 files changed, 27 insertions(+) diff --git a/lib/librte_eal/bsdapp/eal/eal.c b/lib/librte_eal/bsdapp/eal/eal.c index 369a682a8..dc87ffbdc 100644 --- a/lib/librte_eal/bsdapp/eal/eal.c +++ b/lib/librte_eal/bsdapp/eal/eal.c @@ -117,6 +117,12 @@ rte_eal_mbuf_default_mempool_ops(void) return internal_config.mbuf_pool_ops_name; } +void +rte_eal_set_mbuf_default_mempool_ops(const char *ops_name) +{ + internal_config.mbuf_pool_ops_name = ops_name; +} + /* Return a pointer to the configuration structure */ struct rte_config * rte_eal_get_configuration(void) diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h index 8e4e71cc1..eb7db5797 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h @@ -335,6 +335,15 @@ enum rte_iova_mode rte_eal_iova_mode(void); const char * rte_eal_mbuf_default_mempool_ops(void); +/** + * Set default pool ops name for mbuf + * + * @param ops_name + * mempool ops name that is to be set as default. + */ +void +rte_eal_set_mbuf_default_mempool_ops(const char *ops_name); + #ifdef __cplusplus } #endif diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c index 229eec9f1..5c6feff64 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -127,6 +127,12 @@ rte_eal_mbuf_default_mempool_ops(void) return internal_config.mbuf_pool_ops_name; } +void +rte_eal_set_mbuf_default_mempool_ops(const char *ops_name) +{ + internal_config.mbuf_pool_ops_name = ops_name; +} + /* Return a pointer to the configuration structure */ struct rte_config * rte_eal_get_configuration(void) diff --git a/lib/librte_eal/rte_eal_version.map b/lib/librte_eal/rte_eal_version.map index f4f46c1be..43a6fa97f 100644 --- a/lib/librte_eal/rte_eal_version.map +++ b/lib/librte_eal/rte_eal_version.map @@ -200,6 +200,12 @@ DPDK_17.11 { } DPDK_17.08; +DPDK_18.02 { + global: + + rte_eal_set_mbuf_default_mempool_ops; +} DPDK_17.11; + EXPERIMENTAL { global: -- 2.14.1