From patchwork Thu Jul 28 03:09:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Forrest Shi X-Patchwork-Id: 72922 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp625371qga; Wed, 27 Jul 2016 20:22:26 -0700 (PDT) X-Received: by 10.55.15.132 with SMTP id 4mr41153316qkp.178.1469676146480; Wed, 27 Jul 2016 20:22:26 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id x35si6593484qtd.43.2016.07.27.20.22.25; Wed, 27 Jul 2016 20:22:26 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id D4C016850B; Thu, 28 Jul 2016 03:22:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id A778A617D9; Thu, 28 Jul 2016 03:22:22 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 43EE4684FF; Thu, 28 Jul 2016 03:22:18 +0000 (UTC) Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0076.outbound.protection.outlook.com [104.47.37.76]) by lists.linaro.org (Postfix) with ESMTPS id DF47C6850B for ; Thu, 28 Jul 2016 03:20:39 +0000 (UTC) Received: from BN3PR0301CA0084.namprd03.prod.outlook.com (10.160.152.180) by SN2PR03MB2303.namprd03.prod.outlook.com (10.166.210.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15; Thu, 28 Jul 2016 03:20:37 +0000 Received: from BL2FFO11OLC003.protection.gbl (2a01:111:f400:7c09::153) by BN3PR0301CA0084.outlook.office365.com (2a01:111:e400:401e::52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.549.15 via Frontend Transport; Thu, 28 Jul 2016 03:20:37 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 192.88.168.50 as permitted sender) Received: from tx30smr01.am.freescale.net (192.88.168.50) by BL2FFO11OLC003.mail.protection.outlook.com (10.173.161.187) with Microsoft SMTP Server (TLS) id 15.1.539.16 via Frontend Transport; Thu, 28 Jul 2016 03:20:37 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6S3KZOs008139; Wed, 27 Jul 2016 20:20:36 -0700 From: To: Date: Thu, 28 Jul 2016 11:09:29 +0800 Message-ID: <1469675371-20274-1-git-send-email-forrest.shi@linaro.org> X-Mailer: git-send-email 2.1.0.27.g96db324 X-EOPAttributedMessage: 0 X-Matching-Connectors: 131141496380146722; (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)(189002)(199003)(68736007)(8936002)(36756003)(2906002)(189998001)(2351001)(50226002)(8676002)(81166006)(19580405001)(305945005)(81156014)(110136002)(77096005)(229853001)(19580395003)(106466001)(2876002)(356003)(7846002)(87936001)(4326007)(105596002)(33646002)(586003)(5003940100001)(104016004)(50986999)(11100500001)(86362001)(86152002)(92566002)(50466002)(47776003)(48376002)(6806005)(97736004); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2303; H:tx30smr01.am.freescale.net; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC003; 1:aQRflVlwdPhpnT+WS5/GtNkB9g6kv1HLC05xPyMlA3Q+lmLEmV+04vk3/E3ht1roR7UNfwm1DpFM9ek0TVbMDGWXA6/zrmsTgwU5KygldOEsftK5ZByBSDaSgwJ/1oBdSmD9U/TMCa3TTs0JX5OGEjmnae15ALhuLF4MTluRu6bx3UJZp9NOcP6H9Wn8Z5Pxoxxu20ZyxSj1sb9DzNgcqBbTFGA7G/RLypa4ILwRFXmJcjVCEXRY4wvMlYX0DXhA0KzF6Y796LAOKWEVqDSxe7c4qJF/wRo0RGkDKGcc/1I6D1ClEr4AyP5nPXeArF9tQndfvpX/5VEQwn7Zk/kcpKYJ+2QVQx8voTkKgIkVtR6kY5cgPNlYa0cnnRudre2TTNfCATYXZb0W9jgtiUj+Y26oR0uhNzPWGeTkxedYEVlOb8KvGyJS+hyLpZRXefVSqMFSyVp1mp2WFs/mkFAMQx4jkUrq6YyDuhoCvmMJY6WACvewR4IMMNjc6f9T7EPEDBT/VuMXLKFt27i+fxjRju10YcUTKwRjMandP2kTWA04q7kYEpeD3qSh2KQ71aJJXW3KpbtvQ4rynS1hJufED7t37OZk0ZRfo3Hhtn+leHfDCMdOh7Flt0iWv9yl5bmL5EEUD1VbwvuDbu/i6wgBew== MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 78372fdb-7623-447e-4422-08d3b6962584 X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2303; 2:GO4TmuVocvKbDBWdA0xtgpYdZrF3rDJ8G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UMEUwtnSD2Kzsg/QP5vZJso8XUccPSAiuPbfSSMDHR/W/Dw3XkB7jX3MnBeIGw==; 4:aRLMOkfa0ekbBPDp7P/rT3ty83B/BpACZyuWB3YSe5Gq3n0ZKhZGVEeWppLCNykApwEdIqLPulxdk7ACGF7F8t2fT2ER6lJZkbhw/PFl3DBro+qn1NlOptYJO8VDTCenNG0z1JcbK/dSR8wbJMJC4FnT+K/8KVBk+ihL9z7IpibHhvgCOnG7Mkmyka1P7rOVJ8eihm2nLa/c/ouJj0pj1CtY3uvahT0Wc9yDt7HDN9UNV3/CZDVB+MHhSZjrGZEEV4isklGYRiPBQou950DQ1lHsu62OpYkD7T2o2DAGftOsD0kNMljPqkRajHfVjsB8MglB5PdvTSHony41BhaCkZH4tvOdae321LRWYXEh+7eV0ufKwVRbeQDkWOomloaAvRzWG5WEtnjAwCLMFyMmJwPWrh6+M+dHyeldiKaULtYASSTuXHA4TY6UKeit4LJzDpq71DVpzbufkgJjMYFcrXferDdyEhNDchFRWAiGYKY= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(13018025)(13024025)(13015025)(13023025)(13017025)(3002001)(10201501046)(6055026); SRVR:SN2PR03MB2303; BCL:0; PCL:0; RULEID:(400006); SRVR:SN2PR03MB2303; X-Forefront-PRVS: 00179089FD X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2303; 23:t5xV+ggewYrlogUHokzmGGW69LAPGvPzKNsZTbdZd?= =?us-ascii?Q?IXCAexB2p0uzLZRD//eNjXeo6xohDGzfThSIzczELmQKYDpvVnHiSywt5qRl?= =?us-ascii?Q?m9oCo9k2UD+tQBUcr0+VUBFafFNL2TM/XdQL1bNmFwe4bOfCWa9X+JQRaMST?= =?us-ascii?Q?QvrWJkp8q030b/j6DC9SQu4KpIzeS6hoikogvhbzAFnfj8ZRU0KJ15OB8nO4?= =?us-ascii?Q?+oOMm2QYfcRav+AliLn73kVBk36GsEdOgUmwBPdaeRj6/qJItMiD+ZQU0wIp?= =?us-ascii?Q?MxfD6iKMVVGfZUuwC+AIE2s75LLSlZjelsrTnmXI4QZWhUZ02mx5NchGnX0B?= =?us-ascii?Q?DgQT4JLBmzi6qh5Mfe3HcvoCkG54bdzPmgunIs0DW2C11Qhwdtq33wY4xYkM?= =?us-ascii?Q?76u7eObsK/t3IxrXpyHkQirRXOkeVcGTdfMnZJZ7ozzf1dNe9n29yk7iNqPL?= =?us-ascii?Q?4gk/vqACEYCrzSuWH9dlw8YzZmGyy3rHSPLJkLM6RyYVtde0vVyciivKydlx?= =?us-ascii?Q?nXOBEzfr21l3C9D9X5BaFrn5udzwZuLk+DlZ3RDfdo+vh4C51PllPBkYw2iE?= =?us-ascii?Q?UZ/mdaOI3JrPnceOzB4ufK8iycBkTfMdcZSJnqfE3+pZ40WAEFpnirDAqjyP?= =?us-ascii?Q?of6MxSCqZOS9+um7Mc1mMp1EAUKry3E4NZEQmGTiyqaESIk5HQPpKRB6n5xG?= =?us-ascii?Q?AnDJv6t3IYiC2Bzf1dGiX/y+8AX4QwU8/4luwB5hxhff54b8uHxMjb0nP3H5?= =?us-ascii?Q?HgB4tZVYWySFrFM/5Wcw2VThL2/hWh4G2ZaFaonJf+FHDjEIaifiuM0VLfj5?= =?us-ascii?Q?Eo009AWPNo5/YFUQHsR5bZtClAFYpU+l3ce1g/dAIrsR7kHVPunpr1+kaeh4?= =?us-ascii?Q?YOBXra54bGx7COykGX+bS8e2VoHgAGy4KIGap4/vFk1cqwHxI0WepbGBcVsq?= =?us-ascii?Q?dIoZtvq0HZRRFw7QwXtcFnswMz8T+ioSMexfVW9wYgap9GY8/I1Pc41Fsj/4?= =?us-ascii?Q?sGrw4nX7P9TIicHVjSLrKubO2raylyCVgtJPJom6VLC8Q=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2303; 6:D9WNI/nFKM5ICPeaftQM6z4laq1xdaVxWjfYigRN5U7EFlmzmbmw4Ht5eu4Snz5Di97Gd9H8vcMQlmx6Uiy8US8dfQF4Mn7QXwwqNBXc1ahw1fx695hYiUBA+7IWF9L5rZnk/KQcChTk78VZhUvJUGbLLyRa/KbThHsTxVF/tQTDK1fXyBl6XoIQvipqIbV7aLhbbux+W0M0CkpLzF3f/tw/p1rRtIAER+8nKNIk4OuHIGlzWRpT7gZcA2Pu5XblGFZbmr7oOTlPd1bJI1TZMW6WHicmqPYGzUTiPuZpNd0=; 5:6oefG/ujiQzMJvwJNVaeDOqSV1CDBqgTcEwT1Mzu/j3XcaQg9/eASOgnZnhF+rk5WqF802whiqgrQSj7SHNZpXKtc3Fy6Q+bwlJ0/tcCVS3WIJum54IQtGYCbZtDbEgEa50I7qw1C4C4uP8QeOhWQ0rUk6Blrq9d164IiQG7PHM=; 24:qPTqxA05du+2aKNTJ4oJgu6bdCT346ADiBAHd174oxgxfAApmmJxPdh0483Y18NKNebmtYHxJwTmZ3xbq6y0u96PHHPOfH1qAj/WzS/tbFQ=; 7:yq4GRYrtOvJJj0C6hhvnRWQkpMGv4SjTBaw2sbsBPimbUEQN/cx+iP5xRVrpFrXPGF10GoB0Z7CJdeHWLeGsP4sKzaNGkDGmHqIuw7K4QZOaRipaL2P32kf3t6thMUeC4j8HislDr5jwAwQGYGrQZR8vaJy8nYRZZuQU1/8H5sRZCyBnhVkO/rXgRNiJ7gcmEBsktmBSoIw/BAYSDvH2dzXgtXEaFLxUDqXTte9849PnYYrw+wRIxC96QOpxDzcv SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jul 2016 03:20:37.8430 (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: SN2PR03MB2303 X-Topics: patch Subject: [lng-odp] [PATCH 1/3] example: l2fwd_simple: add termination path X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Xuelin Shi release resouces on exit. Signed-off-by: Xuelin Shi --- example/l2fwd_simple/odp_l2fwd_simple.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) -- 2.1.0.27.g96db324 diff --git a/example/l2fwd_simple/odp_l2fwd_simple.c b/example/l2fwd_simple/odp_l2fwd_simple.c index 8a14e7d..b351b03 100644 --- a/example/l2fwd_simple/odp_l2fwd_simple.c +++ b/example/l2fwd_simple/odp_l2fwd_simple.c @@ -195,5 +195,20 @@ int main(int argc, char **argv) odph_odpthreads_create(thd, &cpumask, &thr_params); odph_odpthreads_join(thd); + if (odp_pool_destroy(pool)) { + printf("Error: pool destroy\n"); + exit(EXIT_FAILURE); + } + + if (odp_term_local()) { + printf("Error: term local\n"); + exit(EXIT_FAILURE); + } + + if (odp_term_global(instance)) { + printf("Error: term global\n"); + exit(EXIT_FAILURE); + } + return 0; }