From patchwork Mon Jul 18 15:50:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 72214 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp183154qga; Mon, 18 Jul 2016 08:50:18 -0700 (PDT) X-Received: by 10.13.227.199 with SMTP id m190mr1900692ywe.225.1468857017960; Mon, 18 Jul 2016 08:50:17 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id x123si16622783qkb.287.2016.07.18.08.50.17; Mon, 18 Jul 2016 08:50:17 -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 8CC6E687E8; Mon, 18 Jul 2016 15:50:17 +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=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 C07B468587; Mon, 18 Jul 2016 15:50:14 +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 3F3F36858D; Mon, 18 Jul 2016 15:50:13 +0000 (UTC) Received: from mail-lf0-f41.google.com (mail-lf0-f41.google.com [209.85.215.41]) by lists.linaro.org (Postfix) with ESMTPS id 622C168439 for ; Mon, 18 Jul 2016 15:50:12 +0000 (UTC) Received: by mail-lf0-f41.google.com with SMTP id l69so78065336lfg.1 for ; Mon, 18 Jul 2016 08:50:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UCjsNY0rZUJB9lcLw4w7TVpUvfzXwEN+6hTD1l7gXIQ=; b=OYvI1LFYUkt3JIK1aTohL54XtiY91Z5YyIpZxmuiXVzUykJ5yVngMVWrJWy8hxpomY KQJJguTnGkQBWkrHW1bufz0YGMEpbNW+zAIcfDFwz+sfVHikk0tWPeKPpbHFUD3bSESK xe55qZDQVKAyAVuDnFSl1d5dxHQ9w5uIOk2Z73ogzhIbPEJLJBKla70qy54zUO0btA3j TI773ZvEUKG+TK1O/VjIgybLKvIDLrsaT/MAjJKehdaNZtI9VHUgrCUb1Ybm0YtnKtpl 486VAUc3h1STS9I1ZkY8OmUGKiPUCVpuMYhnvZLU70MsMyCBSPmoYMXT/IQLteBf7AzW CQgg== X-Gm-Message-State: ALyK8tJqR8DDAWnGCOmSdC/ykzaVfGjadX3q0hmYU2ta/dgHggQgdk8rQCmZva7cE/g0d9HRLvM= X-Received: by 10.25.86.85 with SMTP id k82mr642130lfb.65.1468857011247; Mon, 18 Jul 2016 08:50:11 -0700 (PDT) Received: from localhost.localdomain ([83.220.239.97]) by smtp.gmail.com with ESMTPSA id l19sm2787340lfi.24.2016.07.18.08.50.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Jul 2016 08:50:10 -0700 (PDT) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Mon, 18 Jul 2016 18:50:04 +0300 Message-Id: <1468857004-13091-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 2.7.1.250.gff4ea60 X-Topics: patch Subject: [lng-odp] [PATCH] test: add termination path for l2fwd 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" Signed-off-by: Maxim Uvarov --- test/performance/odp_l2fwd.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) -- 2.7.1.250.gff4ea60 Reviewed-by: Mike Holmes diff --git a/test/performance/odp_l2fwd.c b/test/performance/odp_l2fwd.c index f4947ca..f05aa30 100644 --- a/test/performance/odp_l2fwd.c +++ b/test/performance/odp_l2fwd.c @@ -1481,7 +1481,22 @@ int main(int argc, char *argv[]) free(gbl_args->appl.if_names); free(gbl_args->appl.if_str); - printf("Exit\n\n"); + if (odp_pool_destroy(pool)) { + LOG_ERR("Error: pool destroy\n"); + exit(EXIT_FAILURE); + } + + if (odp_term_local()) { + LOG_ERR("Error: term local\n"); + exit(EXIT_FAILURE); + } + + if (odp_term_global(instance)) { + LOG_ERR("Error: term global\n"); + exit(EXIT_FAILURE); + } + + printf("Exit %d\n\n", ret); return ret; }