From patchwork Tue Feb 2 11:00:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Uvarov X-Patchwork-Id: 61010 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp655400lbb; Tue, 2 Feb 2016 03:05:49 -0800 (PST) X-Received: by 10.140.148.81 with SMTP id 78mr35917060qhu.17.1454411148939; Tue, 02 Feb 2016 03:05:48 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y63si607928qhy.0.2016.02.02.03.05.48; Tue, 02 Feb 2016 03:05:48 -0800 (PST) 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; dkim=neutral (body hash did not verify) header.i=@linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 393866170E; Tue, 2 Feb 2016 11:05:48 +0000 (UTC) Authentication-Results: lists.linaro.org; dkim=fail reason="verification failed; unprotected key" header.d=linaro.org header.i=@linaro.org header.b=ax4NWavC; dkim-adsp=none (unprotected policy); dkim-atps=neutral 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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2,T_DKIM_INVALID,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 ECC1461764; Tue, 2 Feb 2016 11:02:47 +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 710CD61768; Tue, 2 Feb 2016 11:02:38 +0000 (UTC) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com [209.85.217.175]) by lists.linaro.org (Postfix) with ESMTPS id 4465161797 for ; Tue, 2 Feb 2016 11:00:18 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id dx2so91820490lbd.3 for ; Tue, 02 Feb 2016 03:00:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=oaI/CUlereK+wfdX6rB03UbC9+OqPbFuiQofqFpBqr4=; b=ax4NWavCzzRd07AdGw2Ol1AbJ8dyvR9GLv4ESE/EqwqvDrDeG9MkuvSfFa9qgVvohJ 0KoWjKkzDkIl0Ltqhm4ppp0fi8M5VAr7Gj1kEFDaUbOe6EMGayqrPf9tRt2C4hay8tGW 736+VYXtJYBQUttHaFZWWoRd2R/UbZ9ygfIwE= 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=oaI/CUlereK+wfdX6rB03UbC9+OqPbFuiQofqFpBqr4=; b=IuSznpPe1GARUARjFmZRzTos4FSFWj5vLXsAH6Lr9wU+LmiteTepQHKVxiJsMDxDpp QNH9N42/hAnXrAmHdZdiPtC0L/Ib6H7IBpMUDB/xts4AhFVdbiqn4RX2K5v/RAHxfnFb S1oCXdk3Dwt941AI8g6k/x5jCZ7CXfzgCwvrAleCwnhStXjct3CVzPwhLh/85CC3eLnT 0tsk+wdygDAprt0CMA6crGFoFWNQNAdzVLGLn/WjjDGLBqSTtTxovRutGE3pm+mJhneb MyafgoDECMO1gPpkyJ9KUCe7ijdmTqTn4Fsk5fEMcKylZmxeSadbuJ9U995tWWU6LDB7 +GUw== X-Gm-Message-State: AG10YOS/KKlhWbi4vn1uNSO412LBMiL1P83AIPAPxTj76+AqqrJnLofMxjQqgP+zhTgBAWPWjgo= X-Received: by 10.112.132.66 with SMTP id os2mr10976367lbb.111.1454410816911; Tue, 02 Feb 2016 03:00:16 -0800 (PST) Received: from localhost.localdomain (ppp91-76-173-134.pppoe.mtu-net.ru. [91.76.173.134]) by smtp.gmail.com with ESMTPSA id ac10sm117296lbc.44.2016.02.02.03.00.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 02 Feb 2016 03:00:16 -0800 (PST) From: Maxim Uvarov To: lng-odp@lists.linaro.org Date: Tue, 2 Feb 2016 14:00:11 +0300 Message-Id: <1454410811-13911-1-git-send-email-maxim.uvarov@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] mergefix: odp_packet_io.c: move odp_pktio_term_global down in file 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: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" No code change. Because we merged branches partially (with cherry-pick) odp_term_global function placed in different offsets in file for master and api-next branch. This patch aligns file in master branch with api-next. Signed-off-by: Maxim Uvarov --- Somehow I get out of sync for that 2 files. Allign them without any code change. Patch is for next branch (for 1.7) Maxim. platform/linux-generic/odp_packet_io.c | 94 +++++++++++++++++----------------- 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c index 206871b..a196f4e 100644 --- a/platform/linux-generic/odp_packet_io.c +++ b/platform/linux-generic/odp_packet_io.c @@ -876,53 +876,6 @@ void odp_pktio_output_queue_param_init(odp_pktio_output_queue_param_t *param) memset(param, 0, sizeof(odp_pktio_output_queue_param_t)); } -int odp_pktio_term_global(void) -{ - int ret; - int id; - int pktio_if; - - for (id = 0; id < ODP_CONFIG_PKTIO_ENTRIES; ++id) { - pktio_entry_t *pktio_entry; - - pktio_entry = &pktio_tbl->entries[id]; - - ret = odp_queue_destroy(pktio_entry->s.outq_default); - if (ret) - ODP_ABORT("unable to destroy outq %s\n", - pktio_entry->s.name); - - if (is_free(pktio_entry)) - continue; - - lock_entry(pktio_entry); - if (pktio_entry->s.state != STATE_STOP) { - ret = _pktio_stop(pktio_entry); - if (ret) - ODP_ABORT("unable to stop pktio %s\n", - pktio_entry->s.name); - } - ret = _pktio_close(pktio_entry); - if (ret) - ODP_ABORT("unable to close pktio %s\n", - pktio_entry->s.name); - unlock_entry(pktio_entry); - } - - for (pktio_if = 0; pktio_if_ops[pktio_if]; ++pktio_if) { - if (pktio_if_ops[pktio_if]->term) - if (pktio_if_ops[pktio_if]->term()) - ODP_ABORT("failed to terminate pktio type %d", - pktio_if); - } - - ret = odp_shm_free(odp_shm_lookup("odp_pktio_entries")); - if (ret != 0) - ODP_ERR("shm free failed for odp_pktio_entries"); - - return ret; -} - void odp_pktio_print(odp_pktio_t id) { pktio_entry_t *entry; @@ -965,6 +918,53 @@ void odp_pktio_print(odp_pktio_t id) ODP_PRINT("\n%s\n", str); } +int odp_pktio_term_global(void) +{ + int ret; + int id; + int pktio_if; + + for (id = 0; id < ODP_CONFIG_PKTIO_ENTRIES; ++id) { + pktio_entry_t *pktio_entry; + + pktio_entry = &pktio_tbl->entries[id]; + + ret = odp_queue_destroy(pktio_entry->s.outq_default); + if (ret) + ODP_ABORT("unable to destroy outq %s\n", + pktio_entry->s.name); + + if (is_free(pktio_entry)) + continue; + + lock_entry(pktio_entry); + if (pktio_entry->s.state != STATE_STOP) { + ret = _pktio_stop(pktio_entry); + if (ret) + ODP_ABORT("unable to stop pktio %s\n", + pktio_entry->s.name); + } + ret = _pktio_close(pktio_entry); + if (ret) + ODP_ABORT("unable to close pktio %s\n", + pktio_entry->s.name); + unlock_entry(pktio_entry); + } + + for (pktio_if = 0; pktio_if_ops[pktio_if]; ++pktio_if) { + if (pktio_if_ops[pktio_if]->term) + if (pktio_if_ops[pktio_if]->term()) + ODP_ABORT("failed to terminate pktio type %d", + pktio_if); + } + + ret = odp_shm_free(odp_shm_lookup("odp_pktio_entries")); + if (ret != 0) + ODP_ERR("shm free failed for odp_pktio_entries"); + + return ret; +} + int odp_pktio_capability(odp_pktio_t pktio, odp_pktio_capability_t *capa) { pktio_entry_t *entry;