From patchwork Tue Feb 27 20:00:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 129861 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp225224lja; Tue, 27 Feb 2018 12:17:59 -0800 (PST) X-Google-Smtp-Source: AG47ELsdihAlJAlAhRsHlOuVfuKCxbwFlnmv64MQ6hSeQVUx1chf3stg+eE6vkep9sBNdiEzvNYQ X-Received: by 10.55.137.132 with SMTP id l126mr25382723qkd.15.1519762679412; Tue, 27 Feb 2018 12:17:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519762679; cv=none; d=google.com; s=arc-20160816; b=VC51zSccnZHfFQoTXIC3Mh896nckUeEEqMn0wBHHbEhCh6W5PMqhWlOqH8qkcipdhQ e1FD5mWfaeSjMR05UN3U4EGOzviC70fHo7yLB0EZfunIQkJF7EVMk5fSdTA+FJlU4nWa EjY4Mr8talFvsUk2Lz6TZ5vZbLeBZ1BYYjE9QcCRfO1XSACfixUhhwySUiF2m2Dld+59 VUCFKX5imNLV6sVViyxHxwIAO8qd5LwzdYNszhq7+2IVt+lcPOj7VOk8zMVzSwIkrzDI 1BzT9nuxOzYhIGh5obIs7gjqZx1I6NwEtTZj12EHNWLWJqvpMvRQjlenbcQa+gG9njtv noYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=W3obuUF1FXhz4DdXavnIaz01vqXa9c62BBkgUcKok6o=; b=UQy1NCl9xmoOmWZRmyLCPyln3uy3xvZJsnHYPf0deJgQWDAMasrmr81IF4W6Y2B8lS eooWqvztTY2OY2qlEiBX++19Z0Ffz5cn0Yf2cS0p11dNGgUYTBZi6ISjjff2LkH5N/34 Cux3KlpKZGyyTnEu/VP4MbriEbYtK3rp7/jjDjIxRA9UpyjDMbfpDD5vmKhjwc+ZL3c7 GWYPxy2DLPulzmRKhRHZC8pf1evfgA0AhfzFHKQLv3B637SPnlFvLbH/LNb3f2s3vfCI sHoXikAJBE7/HEu5AVa9kEwANpm0tMesZCdcxish1ihfpE+cqHe0kb3UC2w7EdOhQt3a IkkA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id k88si3953006qtd.334.2018.02.27.12.17.59; Tue, 27 Feb 2018 12:17:59 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 1509861760; Tue, 27 Feb 2018 20:17:59 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW 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 C37DC617D5; Tue, 27 Feb 2018 20:02:51 +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 4F799617D1; Tue, 27 Feb 2018 20:02:46 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id ED97061757 for ; Tue, 27 Feb 2018 20:00:43 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward100p.mail.yandex.net (Yandex) with ESMTP id 9534D510519A for ; Tue, 27 Feb 2018 23:00:42 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 3s12zOeqRv-0gUq7u4r; Tue, 27 Feb 2018 23:00:42 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id zvM1YyQEKf-0gaSs9bR; Tue, 27 Feb 2018 23:00:42 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 27 Feb 2018 23:00:35 +0300 Message-Id: <1519761641-21081-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519761641-21081-1-git-send-email-odpbot@yandex.ru> References: <1519761641-21081-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 467 Subject: [lng-odp] [PATCH v6 1/7] linux-gen: queue: encapsulate queue init/term_global functions 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: Dmitry Eremin-Solenikov Hide calling into queue_fn into queue_if module. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 467 (lumag:sched-env) ** https://github.com/Linaro/odp/pull/467 ** Patch: https://github.com/Linaro/odp/pull/467.patch ** Base sha: 3984ba4cd16a02e3fa98ccd432a06663de3fa993 ** Merge commit sha: 62438643661dee1350bce73f90120c824538df8b **/ platform/linux-generic/include/odp_internal.h | 3 +++ platform/linux-generic/odp_init.c | 4 ++-- platform/linux-generic/odp_queue_if.c | 11 +++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index 444e1163b..b8d791544 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -100,6 +100,9 @@ int odp_pool_init_local(void); int odp_pool_term_global(void); int odp_pool_term_local(void); +int _odp_queue_init_global(void); +int _odp_queue_term_global(void); + int odp_pktio_init_global(void); int odp_pktio_term_global(void); int odp_pktio_init_local(void); diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c index a2d9d52ff..aa0885dab 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -90,7 +90,7 @@ int odp_init_global(odp_instance_t *instance, } stage = POOL_INIT; - if (queue_fn->init_global()) { + if (_odp_queue_init_global()) { ODP_ERR("ODP queue init failed.\n"); goto init_failed; } @@ -238,7 +238,7 @@ int _odp_term_global(enum init_stage stage) /* Fall through */ case QUEUE_INIT: - if (queue_fn->term_global()) { + if (_odp_queue_term_global()) { ODP_ERR("ODP queue term failed.\n"); rc = -1; } diff --git a/platform/linux-generic/odp_queue_if.c b/platform/linux-generic/odp_queue_if.c index 969b0d3cb..e1cfc9445 100644 --- a/platform/linux-generic/odp_queue_if.c +++ b/platform/linux-generic/odp_queue_if.c @@ -7,6 +7,7 @@ #include "config.h" #include +#include extern const queue_api_t queue_scalable_api; extern const queue_fn_t queue_scalable_fn; @@ -111,3 +112,13 @@ int odp_queue_info(odp_queue_t queue, odp_queue_info_t *info) { return queue_api->queue_info(queue, info); } + +int _odp_queue_init_global(void) +{ + return queue_fn->init_global(); +} + +int _odp_queue_term_global(void) +{ + return queue_fn->term_global(); +}