From patchwork Tue Feb 27 20:00:36 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: 129862 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp225776lja; Tue, 27 Feb 2018 12:18:41 -0800 (PST) X-Google-Smtp-Source: AG47ELuwFETZRLxyF+O1KsaQTfMYNcHmI21uB7I8MBd0RvmpM6JKyfDSkIclG+K4KaPUPCXudjOK X-Received: by 10.55.91.70 with SMTP id p67mr23035729qkb.243.1519762720821; Tue, 27 Feb 2018 12:18:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519762720; cv=none; d=google.com; s=arc-20160816; b=K9Ljmdv56llyLVARcc6LpR5bMMzSczP9RiQp7/ZE/usxsUcq/X/ytG56kMwFjPC0x7 SfzGrxWRhjgbdt4QYWWVNTkoYMGdm/+cJlc9DtpHNmdWthNpc50KMbx4HNIBvjUOu8Eq GT3jr0zMOv3QSOdOkbhxo+AFj/13kLmLyPcnjF/v4ZPDnfFn+usli0POxEe5xoP/z0Iu iX+RHW5HdH7ifJ7qLR22Z8XlR+YYz1fBlpRogfJuWC5XQHdgok8g8MT6UBMrjpT4/+1S Vg9BV7FpE+RQykx7u/xNkRSA632pgb0SVCZ56yIEFPwAN+IKpss+Ick3XsgeJ2VWjv4/ q34A== 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=HjEECIC6A6KMQkb7UMTdnPEOIfxIY63AEQ8tS/mOqZ0=; b=ePWUwgHxOqB3h+jI8F4rcaESGYiYn/DJ90qnfIewX8Za6RYmsocVe/V0V8EM/YYWeu gebDr+1vdJJfRQzMoKmb5G9PQr1cPu8Ikvtz14RDacsMcL5Os20vImZhVs4kMR5JcJem 9sFNmSCbTvWpWy84XO0ZODOgPuGjda1riMEa7XkZCzvC4DV4bJgwJLjL1Bg2DwSmitlL LwkyULBgJ9Pgolk+IPWDF+mjQC9AYcP86BwQDGt8ItuCt8k4HphiYBxP2wyq4I9lpmHT vw+UXT51grmLCD/WmKKeX9N2nDcHutjLB0Ht1C+6RUr/aQY05hlM0jC8SBGKA2A1eBah c9Kw== 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 u1si5129774qtk.412.2018.02.27.12.18.40; Tue, 27 Feb 2018 12:18:40 -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 8441961764; Tue, 27 Feb 2018 20:18:40 +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, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL 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 0322F617D7; Tue, 27 Feb 2018 20:02:54 +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 6A441617D5; Tue, 27 Feb 2018 20:02:50 +0000 (UTC) Received: from forward106p.mail.yandex.net (forward106p.mail.yandex.net [77.88.28.109]) by lists.linaro.org (Postfix) with ESMTPS id BC6D76151A for ; Tue, 27 Feb 2018 20:00:44 +0000 (UTC) Received: from mxback10o.mail.yandex.net (mxback10o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::24]) by forward106p.mail.yandex.net (Yandex) with ESMTP id 33F2D2D81891 for ; Tue, 27 Feb 2018 23:00:43 +0300 (MSK) Received: from smtp4o.mail.yandex.net (smtp4o.mail.yandex.net [2a02:6b8:0:1a2d::28]) by mxback10o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ruf1Q5Mk0z-0hZiMtQE; Tue, 27 Feb 2018 23:00:43 +0300 Received: by smtp4o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id zvM1YyQEKf-0gae3K4j; 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:36 +0300 Message-Id: <1519761641-21081-3-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 2/7] linux-gen: sched: encapsulate sched 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 sched_fn into sched_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_schedule_if.c | 10 ++++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h index b8d791544..c21228982 100644 --- a/platform/linux-generic/include/odp_internal.h +++ b/platform/linux-generic/include/odp_internal.h @@ -103,6 +103,9 @@ int odp_pool_term_local(void); int _odp_queue_init_global(void); int _odp_queue_term_global(void); +int _odp_schedule_init_global(void); +int _odp_schedule_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 aa0885dab..325c1fb92 100644 --- a/platform/linux-generic/odp_init.c +++ b/platform/linux-generic/odp_init.c @@ -96,7 +96,7 @@ int odp_init_global(odp_instance_t *instance, } stage = QUEUE_INIT; - if (sched_fn->init_global()) { + if (_odp_schedule_init_global()) { ODP_ERR("ODP schedule init failed.\n"); goto init_failed; } @@ -231,7 +231,7 @@ int _odp_term_global(enum init_stage stage) /* Fall through */ case SCHED_INIT: - if (sched_fn->term_global()) { + if (_odp_schedule_term_global()) { ODP_ERR("ODP schedule term failed.\n"); rc = -1; } diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index 6a3b4e4ba..71d4ee75c 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -7,6 +7,7 @@ #include "config.h" #include +#include extern const schedule_fn_t schedule_sp_fn; extern const schedule_api_t schedule_sp_api; @@ -145,3 +146,12 @@ void odp_schedule_order_lock_wait(uint32_t lock_index) sched_api->schedule_order_lock_wait(lock_index); } +int _odp_schedule_init_global(void) +{ + return sched_fn->init_global(); +} + +int _odp_schedule_term_global(void) +{ + return sched_fn->term_global(); +}