From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0073.outbound.protection.outlook.com [104.47.36.73]) by dpdk.org (Postfix) with ESMTP id C51A81B015 for ; Tue, 19 Dec 2017 19:10:24 +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=+4RA8nQMEH2SVfyN4dMm5FOa8O0cfbxQgsD5gwN+TRs=; b=VByhHauov0enfgbBpFRxIkNVtbDLJvpEPbgJjv1E7Qcjpy3qzp/tC4k2ZzVGBONKfV0TYurE+iPoAZhuhjLe9PIJLPOgFrHHKbLnmJh29+U9jgI1yXb0Ly791/w96ci77+8mtD4tLs2P9fkSBt1V+VFjwvynrRs8EDT3RlRt+II= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3468.namprd07.prod.outlook.com (10.164.153.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.345.14; Tue, 19 Dec 2017 18:10:21 +0000 From: Pavan Nikhilesh To: santosh.shukla@caviumnetworks.com, olivier.matz@6wind.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Tue, 19 Dec 2017 23:39:27 +0530 Message-Id: <20171219180928.2702-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20171215160031.11354-1-pbhagavatula@caviumnetworks.com> References: <20171215160031.11354-1-pbhagavatula@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: SG2PR06CA0139.apcprd06.prod.outlook.com (10.175.208.145) To DM5PR07MB3468.namprd07.prod.outlook.com (10.164.153.23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7ade7f1a-0577-46fa-da83-08d5470bc5ef X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:DM5PR07MB3468; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3468; 3:tBWrQK3WRQeMVX+2RsjrogoJjHYgiKmhC0wsmmqBqbYeE6ljMIpgufY7HXyRG5Ticp++8FDUJY7DY8qKaChuYSkecP1urBjshQkmyEi8m3dNuxSr2cB2VPjM07oL+xKEYTDeN28+O3Ocr8X/HkMPlBAJA1MJxzXqQvqOsvlrNR88w6f8ei24E7hMUnY8odGyi5/gr7HHE+k7/8X1eC5bdmPSnfwgMkxEsFvgALyySu7cUrcAf0zzvx5mfEq2sp21; 25:oHl/QzWPYeE24WHarG0N68hndtvATSvZVI0AkybV2eeWlz6/sS/P1+sU/ne+MiSjGs4mMBxiesHabngX1A/qzlTNPKg+KafJdHQFpNnC8A+Hylv9OpYLdn+eYSgeKPUymOCUq/rvFexh5RiLDepsVzwD0q1CdP5Y8WMEcelT/6zrU4KpVjWG+FOsquPWCLpLbFYVcn0Fu3G5zCLSiMAS3xwm6HKu5nnz6WkqoUmx6dTzQT/Y08z2dUYaqJaJrv/hZKKL19wOQHc0BprvvmBeOCiWY2UuFz474nUApRTNq6oEmeXjmyanrHcXpObRva1vxUP/vbk2Cq11s/LyERWv9w==; 31:GvtAOOOy1HU2GOUdXPpN6Tw7GgYkEeEtNl40siw5TTcUyr3cEyYasptVn+W+rzgCkVYouqjbXFyqkw3bCs9zS2881UrnigfMc0Wn8V6QOtJorkugv1KjntgWO4FsHwT9A2CwSYiBnQ6GRy1NfIOSFrC9/mkoLrdtn5CH3mazzarxYSfG3era1PhZ8r9bvEf/aaS/ESUf63IQ5xplUulphXIdtL8R5CPB3OudLgw1rs0= X-MS-TrafficTypeDiagnostic: DM5PR07MB3468: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3468; 20:vmWhrbNMoBcppOoCDWbFQwQmO7x1Js6C74P/mIKJjKBbk9LKQj5ZekGQpYhILCxp+OXUB2Rg7NZ37u3+WY9bwntsV+IP65ar5oRniCv9Y4I4QprmMnHJc2DpPtplQHQvp6TV+61O+7lmpTD1cxO5mw9ctjZHySwXIzb4kuDcbptYTyM1A1Z+sz5RHJJo/IetaGOXRU+8dC6pgrANDUVYrMCLho2b5g5aPuLJatlRNYXQIVXO21rwiMelTRTgKGYC7qz8wNG9Gn4Cz1kzHyq98UpJ6t5VFP5s1Ce0e5+ek1rRavk7liA4riQVSkcxnfoU0SBeVuDkfLULDyQLjMD678gleFZY3cdc/mvd87KeOiqyic1WUdAk0+eYUtlSTd12YfXC3uvANlsdFBpPX//3urfH5PLgna6yE8cdzOpq+EnPlqRqBSgqHAERksYFDL1AewilCUPIcBf4qC0zoX5Lw4OVW78FX3JzDWT18Kzs2urX6jMOBKs87uk+ryY4Molia8B6uH/0HgMbiKt9zcJ/k5y0JdBfDicmY79kOx0AQrdo+1/rXkljHsuWjf81/Td82k+87HdcHMhI7DT4G6HgeYk44jP5Ak5lcVvvTzy74CY=; 4:f/PgMke9O0Gtp7lSzC2QhAnb+YCImh56F70S8q6IxeYAlqncNKWFot1DDmLZY8ZFz3DK8Hdqo/aPMZKV9yIq4W60eVF3UAmcdUVKd2aTkDmh1cPwCpRX8bh5SxH0dRJI/TtoUBq1NlC3ZjviWc552XyHMQJe86oHDXpWZr30jVMzQnC5ekyW3Kt2hx9f9iqKjSZAhFcFlmgIsC2BXt+NWAqMbTzkZsCFfwJRzaayAhPlyPnGoaZd7SNAl9hZWqyGWYylNcP5I86BH5C69Mig4Q== 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)(93006095)(3231023)(3002001)(10201501046)(6041248)(20161123564025)(20161123558100)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM5PR07MB3468; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3468; X-Forefront-PRVS: 052670E5A4 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(366004)(376002)(346002)(39860400002)(396003)(189003)(199004)(68736007)(8676002)(5660300001)(81166006)(81156014)(36756003)(2950100002)(52116002)(7736002)(42882006)(16526018)(386003)(76176011)(97736004)(51416003)(4326008)(6506007)(2906002)(16586007)(305945005)(47776003)(6486002)(50466002)(48376002)(107886003)(8936002)(316002)(106356001)(105586002)(50226002)(478600001)(6512007)(5009440100003)(1076002)(72206003)(3846002)(6116002)(25786009)(53936002)(66066001)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3468; 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; DM5PR07MB3468; 23:743fKW2vFhLxzQX+CkR7ZCreTGB5uUuLzRnJQh0Et?= =?us-ascii?Q?3EEZa2S+JD1YxMCdqcmxbTVWOn3ENegNuRTEwoIfrCJ6iEEtr2roK8Ah2Fq3?= =?us-ascii?Q?EvDEvn/Dx+PNf5IBy3PJ0y0spouRMdRFZZUWII8GWLFB2G8YxIDo4+5My9LS?= =?us-ascii?Q?H/SjiRDmV1gk2Ml46s681bFMjkA79V0+ycbNCLT53ilq4X1xHO9/OpHw0qmM?= =?us-ascii?Q?Knq8rR1NFCl3PYaFaQHARiMX/r7TAQhEPROmz+CJ7+084bewCmguG2iwoYWv?= =?us-ascii?Q?pv8fuJKuJGhIn/w3OHiQCBgXV/TlKLZp30enBu55P+WVev0mDvfaT+6RsMEF?= =?us-ascii?Q?kMuRm6oFzQxf6SDprT2qDqD8oL0/hR3+NgD0JA48cOdwWDB6nZbakl1iq7cK?= =?us-ascii?Q?gjtGOb0oG98oN1AR4Ryj/j+quUrasye+8wjfvQXz1+FCWgqyuKxmWmbnOMAr?= =?us-ascii?Q?C3/tj4DMBeaWfGrU8rDS18ksDsP2d9RfKzzC0KkKT9xyP5ii+DD0fJ4I8DhM?= =?us-ascii?Q?P8P/OTtcppDkVILNCuHlRbwkiHOpvn5o9KXhlyUKqak6C6qDutgHEvdQvUVz?= =?us-ascii?Q?XfeocNaTGL/3rnVJwkYxgFxtyk1H2OLj5dZyzhu+PAEicrjnekiVELFggVHO?= =?us-ascii?Q?3yA1KP9qKGgX3/P0Vi2d1Dp/Tf3stqSe8yMj9351CCNjS4Xt+mOLcJZPUog3?= =?us-ascii?Q?MvXtzOYdA/cB7utoAAgNIU8JosjKmM1WUWNzA0HVPKPdLrnsjbULZ6PDdR0c?= =?us-ascii?Q?H1f+wQwcwm+nD3YQxOkudRJYqrqzFi1mBwZKCVoE3qAvE5OJUtFK4xGCs0VV?= =?us-ascii?Q?pzYpjoMN737xM45Ey/2VA2EdmLaCQKBmU7IHIsG0soFpWJQ9xPvVE2fAK5+w?= =?us-ascii?Q?9eLV5ywZN8YgX3JFQJpIpE62963vndZUkBUVdDfU4MJ/qzXxvAk4YtF5CTR8?= =?us-ascii?Q?iCJ18H6bZDg/nvSw3C86nLNu6MP3L/hDAkcndfiVe0K52wfnqAcnEd34i/va?= =?us-ascii?Q?PNst4kozaZJ5TT398DL64YUsecFaQZffwV/nHdXJ1HOLwYR9oaov+4NOvIjc?= =?us-ascii?Q?4B5842vfnKrCT4obrBBNsHsp0+INx1a+OFjY6QMJtWohYgqodWVAHX2s8k5Q?= =?us-ascii?Q?5B9IuBVh4SaVhJ3NUDXHGDAj7Gf548J?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3468; 6:cq48lT3qpl/Zs9M4zpEH/arCNMnQWtaYgAEK0tf/QitV94I8izopN/ryN1mqtsncCD0WhOxrOUHkNgOnFenJq8884IQs1CtIwdQWpmDpegv0LDOffnxSQ9yzoujbCArwfKahJpEsEf5uVkBbQKADrXBYdM4AUMrYXwt8yB+SOz//9INksFzB8UiEVs4A9TYWBgT/JAvDhcqW+p17/S1WTQJ80+7OC08jDr2BAn6Tt4O4PRPgvF3gAhEMW31Z+tJ/CdHOrxn+73UY+5jOc/6RW2gFonDtBpECcDors2aToU+7C22Nk80xAm9lCRjI9Lk1x/iYX9N81EgijJnoO0CxHLaZKuLs5EwJXFdGMMq6DZ4=; 5:BU5EyF2N11sLm6Qb+Ij1kA2vo+ksoRpKPQqFk2yu2E/fjCgD9DBhSibPox7WalFh3R+lwI8Qm0teaJiUGRnjQfMcE0I+VogYpYgXV3BjbjwUM5Xx5KA1KJ5oxXFr8yWIhcglYz4GjU16Gg1/TgdM1EwYS6tUAP7sOM25iv1JSGs=; 24:/IPEncQzNJ4jsc9dj21JYFgnjr/CzNDnm/274Axd4zkYSH/5iSlHdjqAiuFMvbdXKvzurHnILMga9nMJOkhFWUCV454Zul4s9r2JBil2gfs=; 7:J7i8EleTSzkCzW3LgauskRhxlrmbB6polG6rIy3/ZlCRE6wlhqLpX+ireQhRpS64Zegd47VI55pxgALdyaDzGG6rD4sdINcHHiyfPzov0KuRnoMVs5gpaKAQED0ajiGcY37f7BBL3Xm9OVJLkZ4lSLQ3/hlj/owuuu5gw4UgUUCkWZ5bkwvGt86X43mH4wsMtOpnDVNinK0t7nIblgTbxQPwsdYKV6cXwgqLQncD4BKqpt2CXF1LJOY/g16bV1GG SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Dec 2017 18:10:21.6492 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 7ade7f1a-0577-46fa-da83-08d5470bc5ef X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3468 Subject: [dpdk-dev] [PATCH v2 1/2] mempool: notify mempool area after mempool alloc 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, 19 Dec 2017 18:10:25 -0000 Mempool creation needs to be completed first before notifying mempool to register the mempool area. Signed-off-by: Pavan Nikhilesh Acked-by: Santosh Shukla --- v2 Changes: - Redo commit log. lib/librte_mempool/rte_mempool.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index d50dba493..6d1702252 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -367,11 +367,6 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr, struct rte_mempool_memhdr *memhdr; int ret; - /* Notify memory area to mempool */ - ret = rte_mempool_ops_register_memory_area(mp, vaddr, iova, len); - if (ret != -ENOTSUP && ret < 0) - return ret; - /* create the internal ring if not already done */ if ((mp->flags & MEMPOOL_F_POOL_CREATED) == 0) { ret = rte_mempool_ops_alloc(mp); @@ -380,6 +375,11 @@ rte_mempool_populate_iova(struct rte_mempool *mp, char *vaddr, mp->flags |= MEMPOOL_F_POOL_CREATED; } + /* Notify memory area to mempool */ + ret = rte_mempool_ops_register_memory_area(mp, vaddr, iova, len); + if (ret != -ENOTSUP && ret < 0) + return ret; + /* mempool is already populated */ if (mp->populated_size >= mp->size) return -ENOSPC; -- 2.14.1