From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0066.outbound.protection.outlook.com [104.47.36.66]) by dpdk.org (Postfix) with ESMTP id 37C3B2BDF for ; Fri, 11 Nov 2016 11:13:18 +0100 (CET) Received: from CY1PR03CA0010.namprd03.prod.outlook.com (10.174.128.20) by CY1PR0301MB0746.namprd03.prod.outlook.com (10.160.159.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6; Fri, 11 Nov 2016 10:13:17 +0000 Received: from BY2FFO11FD022.protection.gbl (2a01:111:f400:7c0c::160) by CY1PR03CA0010.outlook.office365.com (2603:10b6:600::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.721.10 via Frontend Transport; Fri, 11 Nov 2016 10:13:17 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none;nxp.com; dmarc=fail action=none header.from=nxp.com;nxp.com; dkim=none (message not signed) header.d=none; 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 BY2FFO11FD022.mail.protection.outlook.com (10.1.15.211) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.707.3 via Frontend Transport; Fri, 11 Nov 2016 10:13:16 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:664; Count:10 Received: from netperf1.ap.freescale.net ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uABADE1C028784; Fri, 11 Nov 2016 03:13:14 -0700 From: Hemant Agrawal To: CC: , Nipun Gupta Date: Fri, 11 Nov 2016 21:17:10 +0530 Message-ID: <1478879230-15729-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1478875378-15398-1-git-send-email-hemant.agrawal@nxp.com> References: <1478875378-15398-1-git-send-email-hemant.agrawal@nxp.com> X-IncomingHeaderCount: 10 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131233327968684296; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1109001)(1110001)(339900001)(199003)(189002)(76176999)(36756003)(50986999)(33646002)(105606002)(110136003)(106466001)(77096005)(6666003)(5003940100001)(2351001)(92566002)(5660300001)(2950100002)(6916009)(50226002)(50466002)(47776003)(305945005)(2906002)(97736004)(81156014)(4326007)(7846002)(81166006)(68736007)(8676002)(85426001)(356003)(104016004)(87936001)(8936002)(8666005)(48376002)(586003)(626004)(86362001)(189998001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0301MB0746; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD022; 1:vFYcoeDJLdNeZ3W2MjxiKK7+ULUF9EE8JAmDW2XEdMdRVnBmlqdNAF+LbRnle+PiBdvj4LqTL0tdLgwUMAYVQLWGs4Hzb+rGNHs2H+PJmv2EREuoNs3D0xuZh7aPpI7MTX/m0uMvlRzi5Sme3lolnhJ4CEJl7nQkrNHQuRDP5OJcB8t3NQPZexWTcjDQA7nQG81dW/f7beoPVc3uxd7cjnH0j/r2TcvhK0DHhwuqZVrBdvbxEKFNqtyC2A+Ql8bcSUTVa/lr5Uq6E8n8TYw00e0zmNwXQBRD0ivbfG1ZT89ZWl/A95+i/iyGJ1Ctwj8ddkPTozTzAzwAnEiJQqlzxw7GZ5HGFJDINLapJ40573Zg2z2TQaO2j3e5tBfP6L5Cptdx62xvXQfwycrS9h6YyHeH74g4kdgbVUJKOWqqbnNvEGaueYFhiL6tKqAY1QwQbVOCHA1PfSXaVQodJgCSDbF/HlRnvO6dOodG6JBN+iv7Rbvp4MZeoYWCose7bvE/cyfq4rzobtCxpsGILcbwrs4Bf1Oxcb6x1aAc2Oi9dHZopFabYLcVPeYVLkE/j33F5Uoi1+eB9cdsf7sWv1bJYe+q5bPxg9so795Lxs2Q3l8IyA4UWUNSr9VSWZw1SIHrftN4hlXn7g7d3xWDaxPyslJWcssMORt7lNbS6tLngYr0z3spLQ6BrKvYFmPE9uCCW0Z7WSY2iVub+q/i5Pe6LcLOV7F0ZRPMDKqFBjiR4y0= MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0746; 2:9rFjlPoJne5QuNxlUjBy9Tjscf3xa/x0VMwYDC4WEHDhoxhG8E1nPPe+zWOrj1fYivMh1Fpop2ECey+rJ0HamHBQxUl8waEq3pkpNxZMcGbTKdbe7DoWomq4n11b607iT3thDcrO6ouIjWEWvrEeXP0SdVwhB3sqvskhK5NSCNw=; 3:U+ylMR74aqvz4b0QhWHBOHj913ower+wGUsn2l+NE4JwYtrbsq0ZXFEPHLb/BaUgimNjZeKsrkDtK324d5UkXZ2qIpvaHJJOrhU7bdLzdVdaq4Z3KFppDdrS+UDPvDG2fuQAQ42koA2V4AKkPnsvjRGIVmlirg6Ei1hSfu/udIcpyq1RsOXXUV4+jQPLyb24bCbycwjzi92mUIRJx+qMWPB/V7SSWbDWPQ5LPdmGK5VNoGZyVbS5olwghwfDGl/5iDlR+Ig6R7Ujlu5fTeZsfw== X-MS-Office365-Filtering-Correlation-Id: ecdc54d0-fc36-4aa2-9c9f-08d40a1b5aa5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:CY1PR0301MB0746; X-Microsoft-Exchange-Diagnostics: 1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cYPG7EKTSC4wNZ87X4kOH0FPuHfZlHVzvZXNPSFJizk8ia9Hok4MHRx2om5BVHqdOU18=; 4:+YREz1ow5zPdWEgIq+Ay41XU7DvYg0rvBIn5j9hB52TYSNH319oDIZ00ZpW4GZKFp2QFpQsCqTJAcfbdHNotJ7DrBiWT7oK8Sm9OfAC07A7V2e9U0GzNv5vfvPpeLYH5bZW7pTQrKS0EqbzhPA9DkMEyfMagr5lroe8ioNwh19pAyTaNMaUvqV1zbSReOUsgo7xVyJC4ZLleDDYGUHkKYV8aTjIjsI9bOKFi52G0fY9FN4IUpjSHqUFkyhm2jKxrFZpHh5sKLNarctp/OiFs6Yu1sCoKn8zqQjY3AoB6l9g1vUHTyqjYLcnV3eKsi0KZ+IZnvvrUZdRgCQG9I/tul/OdRn8y40mlLtoB39s//U3q/PvzBut9CWMAdNVnw2xDfOcuocIAU7EAw7wXU7BVPTpue6jNcyDIhgytPhnY9oesOeVm6bJDlCRYNBR29pKVk72kcB6iXXcYubZanCf6Hb/31mo1bKc1BucKRFC0NaifsOfpfjF/bLhtoHxLxM2WOYhJFqVBE7k30rVMe+z1PDa7yLydyQPPZEFBaYHS2HZY5O1GPO+fR9EN+sXMgzFJ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(13024025)(13015025)(13023025)(13017025)(13018025)(5005006)(8121501046)(3002001)(10201501046)(6055026); SRVR:CY1PR0301MB0746; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR0301MB0746; X-Forefront-PRVS: 012349AD1C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR0301MB0746; 23:nsHKbelPx9x/szZLrLKJ3DYD7IgjQfIfybLUfjs?= =?us-ascii?Q?lXqqR5vlzNLw4a8lBmF2d4zaK7/H68Z6YPR4meMvJaXO50gxKSye5VNZmdjq?= =?us-ascii?Q?LvqS9Gs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TIGfbqcrF4?= =?us-ascii?Q?vbPQflwXLbgqD/LEmVj8T8kseHrjiM1/5k2CwWSmeliWfZlER+OGX3zQhoej?= =?us-ascii?Q?Jkncp23SJRzbqLNrv0HiesJ8QUHpGlCF8OcmVrctfbTyktslviiQQSyo1tvP?= =?us-ascii?Q?t3yVKzVuBz1M=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0746; 6:XahRoTSVPmepP5aRrtaucp4a1hOaahs6SaB6cBKGPGbFRTk2K1CEirklYVrBz1KlR5czUjz495i9k41v8cxCgyeCJlyUe1XCDs40ar8wsuk/3XzrjEK5w2XBcE+TqJuX03J/nBMNYbSNmlJMiZLO6qTaHez8jY695hENH4/IOItzqs0JAdM8mTDZnDty+VGWG6dp4S58I2HWEg4szJNGgnGqBZUm43NULNWNYR+UoWxYkOBG7JdkKS4g5Bxoi8ltHIKT6O68/SlclBs/XL+R80anzBmOg0xuudHl3/IjBXnUB5Cl/PxjR0wJ1Erkvu6N; 5:U3gtp1kQKn8g34YYO9zuJxlxY935eZH2iTUPW/vneS7wyRgASlwrgGcZjl2KyxeEkpz5lbaG4RXqd5EkBfSbROnLX7JpjbU1g/NaEWdvOjW6GxE7LwcTW6fA6L6eL9rr85FKgjI0LaQ6CNglmdRtoMKk8hfTdaWglfiO8DrB1ajBFn2qni+jXiCv4ix/UgjL; 24:iwoxTxGshtT6RHrwhEOEd833Q1FDvvcDK2/zuUYnRdJ3HiEQBWOMr3+C1Hb1gub8+J67pwC+Xt6qEFq9jnUAM0ijA6RH73OmCATXgTtUfCY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY1PR0301MB0746; 7:T3CE864usNPMkDPhYiqthUJq53cC+FNihxb/zat3DkQ7ncCcVcN3Rc35jJLEnxTlmomryaMMm0bY8lm4K1UXh5KQQlPVJI3yay/6W5wnqI3Hi/YPzYFr9snFVpeaP5bLYd9ivWY4/1RW2kabaZmcNStCo/u1jW1ZZ3qvmtWtHEJ3re21eRYwEtSS9WsuF0heM+jYEELda0tn2TxtdY5T9wl8aJg67PhuhJ+zwZR01QArx3HVN6KJBxjbiCsuz3ajGYc776KeOtGmnlCizIDBXbaIB28pmooG/PZsrXFU9lm6bgxYynhtJbue8OB91BggRF77obw6aB162zJ4q/mT+8dUuwYStwN8Tkt79SSFUao= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2016 10:13:16.5408 (UTC) 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: CY1PR0301MB0746 Subject: [dpdk-dev] [PATCH v2] mempool: Free memzone if mempool populate phys fails X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2016 10:13:18 -0000 From: Nipun Gupta This patch fixes the issue of memzone not being freed incase the rte_mempool_populate_phys fails in the rte_mempool_populate_default This issue was identified when testing with OVS ~2.6 - configure the system with low memory (e.g. < 500 MB) - add bridge and dpdk interfaces - delete brigde - keep on repeating the above sequence. Fixes: d1d914ebbc25 ("mempool: allocate in several memory chunks by default") Signed-off-by: Nipun Gupta --- lib/librte_mempool/rte_mempool.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/librte_mempool/rte_mempool.c b/lib/librte_mempool/rte_mempool.c index e94e56f..aa513b9 100644 --- a/lib/librte_mempool/rte_mempool.c +++ b/lib/librte_mempool/rte_mempool.c @@ -578,8 +578,10 @@ rte_mempool_populate_default(struct rte_mempool *mp) mz->len, pg_sz, rte_mempool_memchunk_mz_free, (void *)(uintptr_t)mz); - if (ret < 0) + if (ret < 0) { + rte_memzone_free(mz); goto fail; + } } return mp->size; -- 1.9.1