From patchwork Tue Feb 20 13:00:08 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: 128898 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp4615280ljc; Tue, 20 Feb 2018 05:03:42 -0800 (PST) X-Google-Smtp-Source: AH8x226YR7yjz80b26XqXB3U6A32AN8bngZp9vD0acTo3ZUUykdG5JoSTlUO3RMvYWZsb1PnHn+7 X-Received: by 10.200.28.8 with SMTP id a8mr31479632qtk.280.1519131822777; Tue, 20 Feb 2018 05:03:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519131822; cv=none; d=google.com; s=arc-20160816; b=B9Vm+wdSBwAFyvgbdEPsV+xzO5xhrp4LhqYhnEsm9eovHwnF41JSuO5Qex7bqp/IuK M2K0LiYuzYEi+oFgF7KmLspmye/idAmu5ckPP5yLE884JK8QSXu79pXktxatRjbS+Cbp GOSXinmHNJUJxd7b+6ORVj8iPX7Yh1QLPDlaf8GOVahK5TrVXur7a0HZiw75neEfOfGM qCgORGNBtIG+rlUeJ29mmklHsAUicixkImUr5l85Y8I6LdYREtSy3JzZ5goxjznorip6 u8iqUOB6Fq0Sj1TuDU2EqUbTjWFO3lUPcvg1iJ5s+5aS/XYAefAZ6X4tCUN7kPygwzs2 1x/Q== 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=zT3T+QkiwUZtmSkGABx8nDpWkRptC9IBKYx45BbMYfE=; b=fcdQRDTDKiQomOHag5MZmQLwvXb/LOkHipu72hqfRq5u/HnnPn5p9D16K6KV7PDzg2 ltyuiMQDtyJiw9Q7L2D/ZpximarvsPT9yn+MQMmfjJhYPb+vpvlCBioUiLv4lk8LaX9S CwELqoD1XayQEqwfggLm6kj8pke3CKV+IVUDzvCGnEbvPQ3G2D3AczwZNhwJT4QO5mUr NJgZc3P0I6+ggNnThYIFN5dgZGNo85usu+ZTy1oD/7q+yYg2oWt0UFmloZyguZHnCjq0 s5dHGs5n4Rg+LnJpXDXrM0+LdhpUqpZAiEumGBkX+N7onkxWUZFMNHcRBW2MlbD0VRJO wZxg== 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 r123si220180qkf.32.2018.02.20.05.03.42; Tue, 20 Feb 2018 05:03:42 -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 6DBDB60B52; Tue, 20 Feb 2018 13:03:42 +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 8AD2D61770; Tue, 20 Feb 2018 13:01:38 +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 7B9B3607C4; Tue, 20 Feb 2018 13:01:30 +0000 (UTC) Received: from forward102p.mail.yandex.net (forward102p.mail.yandex.net [77.88.28.102]) by lists.linaro.org (Postfix) with ESMTPS id 87F4D609D5 for ; Tue, 20 Feb 2018 13:00:35 +0000 (UTC) Received: from mxback2o.mail.yandex.net (mxback2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1c]) by forward102p.mail.yandex.net (Yandex) with ESMTP id 125DA43043FF for ; Tue, 20 Feb 2018 16:00:34 +0300 (MSK) Received: from smtp2p.mail.yandex.net (smtp2p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:7]) by mxback2o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 4ULAWjFlTB-0XMS7vIm; Tue, 20 Feb 2018 16:00:34 +0300 Received: by smtp2p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id INTanao9Vw-0R6a1fBM; Tue, 20 Feb 2018 16:00:27 +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, 20 Feb 2018 16:00:08 +0300 Message-Id: <1519131613-30839-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519131613-30839-1-git-send-email-odpbot@yandex.ru> References: <1519131613-30839-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 467 Subject: [lng-odp] [PATCH v1 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: d5419e8857b2bc61d3be17fe53f171550fee426b ** Merge commit sha: e771b2cf674da116ae0cb9e7e5dca276e31fa112 **/ platform/linux-generic/include/odp_internal.h | 3 +++ platform/linux-generic/odp_init.c | 4 ++-- platform/linux-generic/odp_schedule_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 e36b084f1..ff58ec863 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 3900fb629..1f84ecd21 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 08ca813a9..e26634463 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; @@ -134,3 +135,13 @@ void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index) { sched_api->schedule_order_unlock_lock(unlock_index, lock_index); } + +int _odp_schedule_init_global(void) +{ + return sched_fn->init_global(); +} + +int _odp_schedule_term_global(void) +{ + return sched_fn->term_global(); +}