From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0056.outbound.protection.outlook.com [104.47.42.56]) by dpdk.org (Postfix) with ESMTP id 92856397D for ; Fri, 15 Dec 2017 17:00:52 +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=hLBXkY7GnimoIDUxBJPkpekHgMz9CCqxpG8PaFA1mfQ=; b=F6Sir41WztwAZX8ErLg283kFAm8ArYmGgnfXoh73Ge0AIm6Nadgk1ZcV1kectI9PkYSJUqoLbhdtwVYjl0h6zE5Vpn6J8rVovShGKqaDSlAdd51GEv3aTr6lZp/7jpYvC/YbpJz9D56IuNE10WUh0YeOfA0Xsn1fGfDxh+MSUJo= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Pavan.Bhagavatula@cavium.com; Received: from Pavan-LT.caveonetworks.com (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; Fri, 15 Dec 2017 16:00:49 +0000 From: Pavan Nikhilesh To: santosh.shukla@caviumnetworks.com, olivier.matz@6wind.com Cc: dev@dpdk.org, Pavan Nikhilesh Date: Fri, 15 Dec 2017 21:30:30 +0530 Message-Id: <20171215160031.11354-1-pbhagavatula@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: YQXPR0101CA0071.CANPRD01.PROD.OUTLOOK.COM (52.132.74.48) To DM5PR07MB3466.namprd07.prod.outlook.com (10.164.153.21) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 44a229be-f5a0-48f9-8d3a-08d543d50393 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(5600026)(4604075)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603307); SRVR:DM5PR07MB3466; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 3:1VcCh6HKTDo0XHDFJQ3fRPPmC61bUkCVJbKnlQt7CdFsn6CHB4RC1VAqVH4Mf2Uo5LWTKa0G7TZeKhf/zOdZji4/H/qKzj03PZZqd9NPHHbTjoGE83Atxe4BnhHxjEoNKLIsWXLuCEaXUbolXJeClwrZMAywpWHMk0CL9duipvocMbnorI+UITz8bsdLQOXfDzmTOufIzB/Dwd2tQsFtAnnUl68YJfLB4uWXXAkzTzGunMnQZptqYN/83XfDalyX; 25:bX4FjmKnM4gQoAIdE32d8qt+Pa91jLyJ2zuoS4pmQ3KU8MLQG6D3wMeSrdO/+zHtM6chmRSEhtJtFm2XXrrLuRBMb5tHGpOYxsB1mmVABEPlGLzLy/pWnM9JPtkh/2285cGc6r8C+P9YNEGQSLMqynLvxI4sBz2IjpEcfGsc/gIIZxE+9vWRT9RsGG6qoKM4gMp0t/INLqWPSdODGuqC8znAxbWGmS6HGpLxdQgS5uure7iCUOYdUqT77VX1qDpecxpKTbG8JF16qcnbOoorA+msg283wjcBrlxuFtoF9VoTMVaOJh7e54VcJkVMWyBPggQmtBNLOafS4gELeUB1bg==; 31:iDDriW0ZeayGGKjAfj/R2dZ+ldDbffGFB/knY4RC0qC3CPpPghEljqgCCDgyIvJYZ+yV0M3G/8PxtT7X+3vbXhZHXOeSv/2CJGPrig4Q2FPj9dpg3h7dJql8M0QlrCaBhNoxtbYnMswgqT8vG+Orm+BjHAbrxkONFcfuhgd6ZWt1cWhEtITVmelfQ3AoC0j4rSoRgH2DxQCYezApOZ4WXrWB2uvNMZYRsGyxvkG+A1w= X-MS-TrafficTypeDiagnostic: DM5PR07MB3466: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3466; 20:T4SvuJXqS9mDj4Q88Aa8e9jNN5F/Ht/xfosI9fPqyb8k+DadoRYw+Mh4JRQliKZ/0QZvSKe+ZbDpPQ+/Z66SW9SYlnug5xQ8ORMUwcmdED+mvIUvH33nhW2uV4FnGdBknAORrAmPGdeeSxFfcPw+JT7BrZVq7kFBYT5Srq0If2DMIZ9dPdsvE3ird9bmlww0TJaaw6hGPg62aKAf4hgnrPWlpiuRNpjGbuzrbGDGth+k4WdMnHoCFBUU0M7Ifq96zInZqGFzFeXAQLfnaxPtbFPICIKbMvCwqsoPusb2TcJI7i1/HDIY5809G6mJg0AWzRqV3A/1XEHPuacnfeTXs4pu49ueDvGdMyim+A9QBx2P6jn6fMPNUkqCO5uNiF8v1dvxsyGRYv+Y2RKarjzw+te6D3f2nLJ8Q0Sqdj2q1S0HHQAFS5s894oVor3QjD+NNDExeoQKiPxNrDjqDdca87kKBmRVuPhvlLt/bBgJT8j4Ny0LoyA1mKzoLVIB1ku6y7bcElvUkcn0mmblWdJWZictZ/vORe8BGn/MXP0KcXvtUY/maZcnUx6p2kP5VZQdMle5GYHY935FBGdwf9KSjFuzNcC82zaWt9J39FAL2J0=; 4:GxWvw47euQbWfGqhmsB+1SO1JPj4PFDQ6+sP9pUSbc5Cz97FHGdaCBGF5INhtlWcrKqPQWCceRnoEJYqMnXrGeVIegu48IQ0mIplbMzM7Tzyy8+KQtupnu/jXAjee9s29t99WcePYRzkxjNUPgjrCRRir7AwOxqElskrFzP9MKnrzc7HoCPwybgmJ+yAXET0qo+LuTZMt7sg+chQZeMzaraO4gIuj9xEK9HuWz0c57Te2oKv75uVgSOgM9K28IGPS36SUBjQsaCNw1vMeUkFbg== 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)(3231023)(93006095)(3002001)(10201501046)(6041248)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(20161123555025)(20161123560025)(6072148)(201708071742011); SRVR:DM5PR07MB3466; BCL:0; PCL:0; RULEID:(100000803101)(100110400095); SRVR:DM5PR07MB3466; X-Forefront-PRVS: 05220145DE X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(376002)(396003)(199004)(189003)(50226002)(51416003)(305945005)(25786009)(5660300001)(2906002)(6512007)(6486002)(8936002)(48376002)(50466002)(52116002)(53416004)(7736002)(105586002)(106356001)(1076002)(478600001)(4326008)(72206003)(107886003)(6506007)(69596002)(36756003)(53936002)(47776003)(16526018)(386003)(5009440100003)(66066001)(81156014)(6666003)(42882006)(16586007)(81166006)(68736007)(3846002)(6116002)(8676002)(97736004)(316002)(42262002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3466; H:Pavan-LT.caveonetworks.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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:zoYpD6/r1905HnBa3OqTgtRfzxBWWPGneEDM9UbJl?= =?us-ascii?Q?QQkM2B9eIBtXEYmD+5UTDSl6V+RyZpMbCpsaMj/3omjX+JLqv2KILzxcMrnL?= =?us-ascii?Q?N8elYNohrfzbxBFtAZ5OM2EY5iisWCWUCXczBDTGtZh3N3QTF5A000nB9Cf5?= =?us-ascii?Q?vF9Rz2ihz7A9s3R08dY0uzr9DJEFomR/aYnKc+hPdPJqUi+hGdqyevGrVBla?= =?us-ascii?Q?GOVV3iliGMxATujIoUDxiZvSyoj6/lDqcHxYU4rTL3GxMFeUHcc7Pa8RLGSv?= =?us-ascii?Q?zmqnXh+49lpey88+sSvVzinnDUXTPfRMRtsCN0C8ZzHPXUjNhTa4OlEzXsR3?= =?us-ascii?Q?5KxTnnqU73kxQKPnKpIwm9PiGSTiANAbsPXkSBhElG9e54300xVvMGO+nl3a?= =?us-ascii?Q?bKpjZExsMuafS3F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o5n8FVQbWtBEUNhc7kd4U5Zq1rD5zv6tRR5Ely/Rxy5tKfyGc+MiOWQS4MOFe51pfJ5UEgNLEQuHCGanvJ5EdAsj24c454TSw9AdDFcvk72Uycml6dOKvshAKMkiZYGTP2jHbfVhvM4dzAZ1WqSkC2Na+i6H48mquv4slVBBIU+OXPhbY4LPtIPU9QU9nHbbpMqfrC5Rdwv6dUITrtG2VQXy3i9gEhOzJYqUZBE=; 5:k1He2Rayx+zPT4EGaStKDd4B2uSOFCFGcWDVQO4KB8o/+utvC0lgDYSnXjE4RJ7AZ1yhiUIoAM7rWTiV303pkgsVqXzSPIiAhVIPqV8RZ9Z62y7lF0FKpkCHea4iQ2y0kNsRJcbqSW+nWuY8OwhgDZ30CpDgF9WjqlUVhw4oM1g=; 24:nXbFZut0fmGcA6PXcNYY1bQUq/vUISx8oNv/eLXErqwkP0O4SRSKdVD3/DgijVFO8qGMj4xOFhOre/8WNR7mRo2TuVeQvT6Hx+5aST9YaQQ=; 7:b9y3Jiv8xCQuuIj5JM4ZR5CMq0JjqNttmRhTBgxmZ7R10Z95Efj5kPU4t+thskLhpzX9sTJUPOW82UosbJUMqxR0YqziizaEHDjktxdLR5VT6a/uU4mQ2gsXBXNvKFm48f2E6bdmRmbVi6PlhkbMNKboJ1rGrpkqOzC/YnZXBW5oiTOPidcq+iButK94gAcCjT9E2dzxH4oHKWjSgaKBOgukFuFORBrPOA8ovxPN2+N2EyzHI3e+7C2q6C6vewFA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2017 16:00:49.3170 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 44a229be-f5a0-48f9-8d3a-08d543d50393 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/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: Fri, 15 Dec 2017 16:00:53 -0000 Mempool creation needs to be completed first before notifying mempool to register the mempool area. Signed-off-by: Pavan Nikhilesh --- 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 d50dba4..6d17022 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.7.4