From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0075.outbound.protection.outlook.com [104.47.42.75]) by dpdk.org (Postfix) with ESMTP id 26839D4AA for ; Fri, 11 Nov 2016 10:09:09 +0100 (CET) Received: from BN6PR03CA0034.namprd03.prod.outlook.com (10.175.124.20) by CY4PR03MB2469.namprd03.prod.outlook.com (10.168.163.147) 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 09:09:08 +0000 Received: from BL2FFO11FD015.protection.gbl (2a01:111:f400:7c09::128) by BN6PR03CA0034.outlook.office365.com (2603:10b6:404:10c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.707.6 via Frontend Transport; Fri, 11 Nov 2016 09:09:08 +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 BL2FFO11FD015.mail.protection.outlook.com (10.173.160.223) 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 09:09:07 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:; UpperCasedChecksum:; SizeAsReceived:516; Count:8 Received: from netperf1.ap.freescale.net ([10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id uAB995Qc002649; Fri, 11 Nov 2016 02:09:06 -0700 From: Hemant Agrawal To: CC: , Nipun Gupta Date: Fri, 11 Nov 2016 20:12:58 +0530 Message-ID: <1478875378-15398-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 1.9.1 X-IncomingHeaderCount: 8 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131233289480696547; (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)(189002)(199003)(48376002)(50466002)(92566002)(4326007)(5660300001)(81166006)(8936002)(6666003)(87936001)(8676002)(6916009)(2906002)(106466001)(2351001)(105606002)(110136003)(7846002)(50226002)(5003940100001)(81156014)(356003)(8666005)(305945005)(77096005)(86362001)(68736007)(85426001)(626004)(50986999)(586003)(104016004)(97736004)(36756003)(189998001)(33646002)(47776003)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2469; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD015; 1:IwBlxPePXpdIqyAveK/FtU5XqC04YY9snziQ4tRdby/Dl5DBTli5sjpVHmCGCegHqdVRlTN2jgDW9+Wl/492w3HlcgCkg5JCFRBW/ONW5hqNFs24LYUIEBSCKAoud5jwbKa3Ll5VUI/0taDCMv+YzVdsQJej4UztdQDC4ekXdWp2JLw2ttkrf7vTCPMigOhqpaKjmvqr4/tY9akJFsC/Zh0pFhkUFgWHXT4WpHQGNVqwSBsslP6J3CQhoeA7t1fNv+CaKuf4WZJeTXONhsGYTbYSyL4KqNkVQqcXJu7DP1waJzKdUQdPiWUxUIwK0hnxG6nGSc3ItqFt1y4nZFQhKYbBhQSKgVmGgRm0BzqMB+c6GXbIhQmp+lLSVHX+qLI/09mrI05jvy32qE5U1ZtCadPJu5BBQUn0ZcrvX4Gw6IzO8yKgQ/UYB99fpyZ1jy5VebL92oHiERlzvtZFc087oHFpMmdNO3ZDuAn8oWFwUSv9R+bM08tMeF/coG/B8AkFdQd6Yg/uXlWzU6foMx8KUiAABF/FoojdukHvLVBNoz7PCL4z9pNAnzJo2y+eUG5EXCIVdJ8HMnh7++ulyKdKeW53iWPExZ0qBEH4BuVE131Nsb8YE1p3mazyN63losUSktA232tohK0US/Fweq6Ztl8IVeevCz0uiAAcbToAqw5tNCfbB0N3oyS7SQnHWi/qNHPfU9pY6OZ/B1psFnjKftBxE1JfPq/H006dtKoJXJY= MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2469; 2:UeuPHjy+7kfagDFHlbVKNRnEkJlCeYzwxRI2q8SNuofy2sh1tRnNuENQECliY7yn5n8LmK14dgpgM8HUZT1N2zyQm2+zKsBPBl6eL5BTCfquxF3983MVGO07g71AAcGT54AeXwyqOtAo2sjvvsUGds9PMSt2fgPjZZTbYl/Jo7o=; 3:8nEjUoyrCJlUbeHSIwDjM0FcxpGYrenJNXcj1Nr12qtbR1xVHHLT94cv9txRub/b7bVg3r0LKmfxSmQalJmv5QlQOLDh46A0lpQbasJk9KVe59CJedQfL2jWvrMyrs3taVvxgvU/ggH5UiuSfX9vWDO7I6Ninm8ooMU1a8a8w6BY7GMhHXpJRUyZmf8mcQV4THbfreqLJBqFTwrKFTt5loR084SdLt63gyj1r9DntFH3EGrqnI/YqVw/2YrZPFicVYR5tcS4+7Rkkb4qVrrD7A==; 25:rja3Br70hKHs+CLxnI2XLuDxAk8ziPV39N5IEfOg2AYXvKdnFGJQLqAGpQJHa2fxxhi73y2mvt3vw8p5AS/dddc1sn0umM1BKXZqYuiIvRv/rqBgaspBs+PFC/ojZi7pL0j52uvbGt5qCYin7s3b65OCtIwuSBuQy9BpSOBK1ISlVrfTkh16AY9tpnbrncxBgSPtsgDqFUA1IFz/ogn4VwS7UaOzvnMekbQw05FMyJcg2C6OHBNNVD3dSAhEHmLqh2LdyJEL2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1rvdWMAwXxKPRuhfoIXTqqgkNyeKvhSI7WoleiWCVgFQhrcNMcdq3oIpFwtWK4q4ALFuUd72V07Gn0Igw65ahEvRedIgCninwy4BuxrhWY98mYn8S3lbXDXLNurX6vBN85Kh11O0m6IqRM= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13024025)(13018025)(13023025)(13015025)(13017025)(3002001)(10201501046)(6055026); SRVR:CY4PR03MB2469; BCL:0; PCL:0; RULEID:(400006); SRVR:CY4PR03MB2469; X-Forefront-PRVS: 012349AD1C X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR03MB2469; 23:fvUghp/yygKAOhG0u91Z3H2SKIfNKTEfBif+mWNyW?= =?us-ascii?Q?KfR52jFBau4h8IAln3XpvUuDLTp59RTHzzyAnA7apBGf/zuC/1NVPM203O75?= =?us-ascii?Q?YCxS0ul3zQZO/6VNkUYz+xtsGFjW4pjvVU74m9bO2DE9shxZoEB5Kc54E29Q?= =?us-ascii?Q?h+36zhGUqTaUb3U+pDojjMw3ama4XxZFReboTdAn8GtytFkq15FqrRzAkmPe?= =?us-ascii?Q?rRnNFTeQ1OD+TDfEFARjl/pHZ5jssRBvkaLOqEO9uCQpDV88n+LO+WqSYBkq?= =?us-ascii?Q?nCT31gbOsFAV9hu0/yI8H583Q+QkCtCTMKcTgAR7ZAv2/FrTPGzpelC0j3lw?= =?us-ascii?Q?FylHznJoGndGlkPGFtDPnt0qcqGg9Jt8+TQ8drPVeXtFJRWxIiIRTKDukSIi?= =?us-ascii?Q?GaJOWWOc9/RoGI/aCUCsOl8RyF71UvYMRZc1s/KAXc0QPYejmn6d0UUdzpov?= =?us-ascii?Q?G6ojN4YdXgtm2SVk4HECLS6n1w/Kb/WTNiJ95pSqHYw1PNgi3oLZWi2bP3MZ?= =?us-ascii?Q?0vbIsc+8zaiaP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/espt/jB4DYWxY5uLGUFHzAk4cQntuXRTBvK2jauWto+bAnKyBabf6l7PAiMcMEtCFK0/pJYbMAI0OZURgw3+ZNdlL18QHyeBXR1Oa50Pm8VZ8xkyEhpLoqQGnfV1lvjAD/+vreuECBv13rXfpioKrL5y0pcq; 24:gkvYppmE7Cs9UR69kPa/KB/4Ym0WKQ1BlYnOtRVfcJu1oFmQJsyGL7ttbXsILlzBx3OIUIg/PrZ8drePngwMa4AVxH63poO74+n+TiVf1wM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2469; 7:Er9E6HSZjFa8BPoolApVHiSnRLffUp6/hB5KivbV0345Qj69QnfZegg93ZBdn+ZGJTDZARxHWc8KmsBZ/VGaH2b89RmKCf/5GctheHE3tZCRhrKMBHDXcsKH85OFPreU/vySdFSF7/m4vFXDSSAmwrqyFjayvKnVPqwrWrnIgq5AzogF6/F6aUyegFnS2UalziD6c75ZEQq7nh6dR1pXTZQRE0a14daod2rGXQeyA3GV20mQGhCa/r/WBUq5+TUA9/mvZwqCu5h4rTGO+M0mYfzPPEzIBc1CyyKm3ZKAweGHlCOV2kDNzHfn38aGwHXIiVANCJtHJnaEe2Fffy9mPHRvU1Kh0awqCPSTHQK5maI= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Nov 2016 09:09:07.8824 (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: CY4PR03MB2469 Subject: [dpdk-dev] [PATCH] 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 09:09:10 -0000 From: Nipun Gupta This fixes the issue of memzone not being freed, if 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. 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