From patchwork Thu Sep 14 15:00:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112561 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp735549edb; Thu, 14 Sep 2017 08:01:41 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCJSiIU293PaFHQ86gK3dyy7W0j5RsawmSik0HNHu8JLLwkSo5Dz70IDSIlK6V/Kb4cXLe3 X-Received: by 10.37.128.6 with SMTP id m6mr12865605ybk.73.1505401301155; Thu, 14 Sep 2017 08:01:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401301; cv=none; d=google.com; s=arc-20160816; b=dKk3BtsACfCkDs1H/iUJq9EFRw7i74vNSiBPPWXsbaic2ez3016EOxdfjVvKxqAtzp woV12yZSnt3Y2lDdKToNlEGw47VeG6GhwHLed0nxRjgJXVMPZsC3HBHBnk6Sy+wgKT6e qrUekI5J6HfeAHF/0ybfgM1aagyPObZBXjEV+NCQCMC6aFasNKqWBx7opAWaUUJL92EB 3acwTiL6J0gWCfp/IRuaBfkRl+kY0k83T0tp62+3bLjueNN3y8dpOX6UJgMm4xhobzW2 v5a1tj7/Ca7VeSQsAbY4VpyRmm5rKJjHYdHX/judIlx9VgHoZ0Dr8IgYJ1bLxwDVUPTN XQFg== 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=R1G1i8hT6Rvjc6yKbGJMpcmI7mapJIxlpxhY3fyNYXE=; b=BNO58941phRkRaKT5MgYRiueqTYj2xwUwYuWN3gaQcZAVxAqsZrXUS0FzC5ER255sQ +QqHuSL1Wh3lr0iPQ1b+Na7V+eEIcGrAj/HlA6Yb/WMcO+K/mv9v9pzIySEAr9OIuVTn w6BL4e+Kadid6+ihXtBLVKRNXdOWuHBBW96V+lsvwu4fvdPSvePm1/bTZKoRlt9Lf56H UTpK/sbdT0TKink0wjb2+UjtvRNF9IryCD8pN3MRHZfiLEXzjkrFFql7W3MfJpsgiIl0 kqBBY7wNiWpO1EZJxdgg7ZOFChm45/ieU1HTotCnmMEYpetKPdb6uaWb7/ioBQJDM267 HLYQ== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id y8si9748374qty.19.2017.09.14.08.01.40; Thu, 14 Sep 2017 08:01:41 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 93FFA60C5E; Thu, 14 Sep 2017 15:01: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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 5FF6E6088A; Thu, 14 Sep 2017 15:00:35 +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 5797D608E0; Thu, 14 Sep 2017 15:00:23 +0000 (UTC) Received: from forward106o.mail.yandex.net (forward106o.mail.yandex.net [37.140.190.187]) by lists.linaro.org (Postfix) with ESMTPS id E6A7D60882 for ; Thu, 14 Sep 2017 15:00:21 +0000 (UTC) Received: from mxback9g.mail.yandex.net (mxback9g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:170]) by forward106o.mail.yandex.net (Yandex) with ESMTP id 104E2786016 for ; Thu, 14 Sep 2017 18:00:20 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback9g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id wSnjJSahKU-0Jcqt4AE; Thu, 14 Sep 2017 18:00:20 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0J7uUGJA; Thu, 14 Sep 2017 18:00:19 +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: Thu, 14 Sep 2017 18:00:02 +0300 Message-Id: <1505401213-7265-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 1/12] helper: move include files to helper/include 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 Repair build with --enable-helper-linux option. https://bugs.linaro.org/show_bug.cgi?id=3216 Signed-off-by: Dmitry Eremin-Solenikov Signed-off-by: Maxim Uvarov --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ helper/Makefile.am | 4 ++-- helper/{ => include}/odph_debug.h | 0 helper/{ => include}/odph_list_internal.h | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename helper/{ => include}/odph_debug.h (100%) rename helper/{ => include}/odph_list_internal.h (100%) diff --git a/helper/Makefile.am b/helper/Makefile.am index 2c5452dcc..c69fd678d 100644 --- a/helper/Makefile.am +++ b/helper/Makefile.am @@ -42,8 +42,8 @@ helperlinuxinclude_HEADERS = \ endif noinst_HEADERS = \ - $(srcdir)/odph_debug.h \ - $(srcdir)/odph_list_internal.h + $(srcdir)/include/odph_debug.h \ + $(srcdir)/include/odph_list_internal.h __LIB__libodphelper_la_SOURCES = \ eth.c \ diff --git a/helper/odph_debug.h b/helper/include/odph_debug.h similarity index 100% rename from helper/odph_debug.h rename to helper/include/odph_debug.h diff --git a/helper/odph_list_internal.h b/helper/include/odph_list_internal.h similarity index 100% rename from helper/odph_list_internal.h rename to helper/include/odph_list_internal.h From patchwork Thu Sep 14 15:00:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112565 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp845869qgf; Thu, 14 Sep 2017 08:05:18 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDfpBH52E/ImBxq2FhzzPcD8UKPElA51HAVBAH3E2JDXiknBrkcAX43qx0ScIW8LWNrAu4K X-Received: by 10.55.76.150 with SMTP id z144mr3076281qka.351.1505401352460; Thu, 14 Sep 2017 08:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401352; cv=none; d=google.com; s=arc-20160816; b=gTVUa901EBH8YuGttvLv7HCeRY7owvpsa64cZfpLlMFhyJIk2dopuG5iFT34KgCA65 axi5Kg90mlAjgNBNNWzdurt9//w6LdfgZYQqM8lT23orNrMCpjTpvLW6ld78szrcr5Z4 pe2CfjJnu3vFnjH/Uj4ADht/1Doy7oWjElmsC+UwQvbhJoBSkTInYMg9pgIbf0oSzTVp CcL/wzqWDUUWw/uzGZDCTOpLqkziOTaQkaoAdF1vSbXJ9Zfu91rDaScVKTSpl+SIVVmW vdD6P3vfseW65bnLbbHfCQfHIa5T/cvQvVjE9d0GIYMgeTp/4DryX/sxZJue9YHdfvaN bHjw== 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=+Vk4HxlLQyyU+mB6MR7tx+9I+xgcmZqvx5prP4QK80s=; b=dc1kB3p3WYKZ3XX615YAB98TDiFbxE2lw+rDY/AkRKaFHWx0YrXTqEZtadATDjUbHS Rcvm4hHhsLcKJRshQeQc52ag2tnHCmGreWvLYZekcJAzi7CKCEfW7ZMIqKfKa53iJcCf vRCW79VuY65ewR1638RZk0VzW9asGuOYTAEX/7t0OpW86D1U5/HHddgChEYMVWqgXvqF OfqbvnF9sTeGv8umx+ukynK3ypvQbsq4gb2niZYSAkgPL3FUW+diNTiVU8O1yls84iLQ v1Uga4g5VLWP+9qURAHzv63XkgqA4LuMQo5QZetYg+z+mBApDpy0wsVTfCHVOLUBcQ5p INkg== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i132si17563192qke.166.2017.09.14.08.02.31; Thu, 14 Sep 2017 08:02:32 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id C08AC62C60; Thu, 14 Sep 2017 15:02:31 +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,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 A9A006097D; Thu, 14 Sep 2017 15:00:37 +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 8B719608C0; Thu, 14 Sep 2017 15:00:23 +0000 (UTC) Received: from forward100p.mail.yandex.net (forward100p.mail.yandex.net [77.88.28.100]) by lists.linaro.org (Postfix) with ESMTPS id 46FFE60889 for ; Thu, 14 Sep 2017 15:00:22 +0000 (UTC) Received: from mxback10g.mail.yandex.net (mxback10g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:171]) by forward100p.mail.yandex.net (Yandex) with ESMTP id D25175102B21 for ; Thu, 14 Sep 2017 18:00:20 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback10g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id hHpPtcWYfC-0KauQujO; Thu, 14 Sep 2017 18:00:20 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0K7WCoPX; Thu, 14 Sep 2017 18:00:20 +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: Thu, 14 Sep 2017 18:00:03 +0300 Message-Id: <1505401213-7265-3-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 2/12] helper: chksum: odph_chksum returns value in network byte order 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 All examples and usecases assumed network byte order for odph_chksum() return value. Instead of changing this convention, rather document that odph_chksum returns value in network byte order. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ helper/include/odp/helper/chksum.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helper/include/odp/helper/chksum.h b/helper/include/odp/helper/chksum.h index 520e92753..1bf950c8b 100644 --- a/helper/include/odp/helper/chksum.h +++ b/helper/include/odp/helper/chksum.h @@ -40,7 +40,7 @@ typedef enum { * @param buffer calculate chksum for buffer * @param len buffer length * - * @return checksum value in host cpu order + * @return checksum value in network order */ static inline odp_u16sum_t odph_chksum(void *buffer, int len) { From patchwork Thu Sep 14 15:00:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112563 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp843770qgf; Thu, 14 Sep 2017 08:04:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QARmm2Desg3ARRXoUInNAPfYGs0bhnNciSgRPUncWkIevPYzN32Zr3zE3aiC8+OaDtCKQP+ X-Received: by 10.200.42.92 with SMTP id l28mr17989654qtl.137.1505401440206; Thu, 14 Sep 2017 08:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401440; cv=none; d=google.com; s=arc-20160816; b=iuMmQakJi+jU97GuFKty+74a9loW/TLIcKAHf6VQhZq8kCNkvuIdvJG3HaOgQowvl3 t9apmsRl+suBXcdHfwzUw2f/2nnn3jkaBX8VjpjmhxQJt3T+vrIHFx6ts47FQmsNbeY4 SlctSVoJlWCw3xao9CdT6Av22hKvDjDbIitcsURD3f2pTqxFrF1RCWp+NENm/NWIA5KL yOaBhmnSbY6E8K3ulMDBqlX4EVKQwUztaInAMpXvzlz36A+B1wY6kcLnyhcRlrgLUsnO lrvJdtCwkkPq6Gl93KmvB+eBalZ2dI4jHq5oMIKoPTW/mTZOoC2LTEF8/F4NlJEiP8vf z5cg== 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=2AaNB8FlSQ63ZjgUUi+MKUuojRgKk/9JD8ei/9KElYE=; b=wf9LCVAn5rJrzDQF/xLo2DfYRia2SoayKZ6eK6FDIrgq8QAg7rh54PkPEG5QcJCRPX xZ9q0uEvJlEIhlz7woVB+OS3wRKCvuJXiNo7WF26TWSDTAri/cCkiRA1MJvvbBcQalZ7 1sKYIKY2/TdER6SHIJj698RSAolH0lbj72EA1NvGLPxE3MA+J0P85ub2KkmYk0PRfYWo yULWHQYEQL+2UA8EmejXCB30AYdCEJtI7S2f5Y5qsdXE2tb6kuHTt8oGyM34RWhk1ZOi na96neEqKs4cUpaJXNJ787/Zx4h5WlkVQp3hvtupf08cq5f3vlecuOLuMiz5g3tixHbX vX6g== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l36si3410385qtd.335.2017.09.14.08.03.59; Thu, 14 Sep 2017 08:04:00 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A34DB60C61; Thu, 14 Sep 2017 15:03: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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 20EEB609D5; Thu, 14 Sep 2017 15:00:57 +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 7B1546097D; Thu, 14 Sep 2017 15:00:26 +0000 (UTC) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by lists.linaro.org (Postfix) with ESMTPS id E9B1D6088A for ; Thu, 14 Sep 2017 15:00:22 +0000 (UTC) Received: from mxback2o.mail.yandex.net (mxback2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1c]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 74D91444604F for ; Thu, 14 Sep 2017 18:00:21 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback2o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id DfaahRU470-0Lf87Cg3; Thu, 14 Sep 2017 18:00:21 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0K7KjKpa; Thu, 14 Sep 2017 18:00:20 +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: Thu, 14 Sep 2017 18:00:04 +0300 Message-Id: <1505401213-7265-4-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 3/12] helper: ip: correct ipv4 header checksum calculation 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 Current code for IPv4 header checksum calculation assumes that packet data is aligned on 2-byte boundary, that there are no optional headers, etc. Rewrite checksumming code to properly copy & process headers. Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ helper/include/odp/helper/ip.h | 75 +++++++++++++++------- .../api/classification/odp_classification_common.c | 3 +- .../classification/odp_classification_test_pmr.c | 2 +- .../api/classification/odp_classification_tests.c | 9 +-- 4 files changed, 58 insertions(+), 31 deletions(-) diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h index 91776fad6..e0d5c3bfb 100644 --- a/helper/include/odp/helper/ip.h +++ b/helper/include/odp/helper/ip.h @@ -74,6 +74,9 @@ extern "C" { /** @internal Returns true if IPv4 packet is a fragment */ #define ODPH_IPV4HDR_IS_FRAGMENT(frag_offset) ((frag_offset) & 0x3fff) +/** @internal Checksum offset in IPv4 header */ +#define ODPH_IPV4HDR_CSUM_OFFSET 10 + /** IPv4 header */ typedef struct ODP_PACKED { uint8_t ver_ihl; /**< Version / Header length */ @@ -92,6 +95,28 @@ typedef struct ODP_PACKED { ODP_STATIC_ASSERT(sizeof(odph_ipv4hdr_t) == ODPH_IPV4HDR_LEN, "ODPH_IPV4HDR_T__SIZE_ERROR"); +static inline int odph_ipv4_csum(odp_packet_t pkt, + uint32_t offset, + odph_ipv4hdr_t *ip, + odp_u16sum_t *chksum) +{ + int nleft = ODPH_IPV4HDR_IHL(ip->ver_ihl) * 4; + uint16_t buf[nleft / 2]; + int res; + + ip->chksum = 0; + memcpy(buf, ip, sizeof(*ip)); + res = odp_packet_copy_to_mem(pkt, offset + sizeof(*ip), + nleft - sizeof(*ip), + buf + sizeof(*ip) / 2); + if (odp_unlikely(res < 0)) + return res; + + *chksum = odph_chksum(buf, nleft); + + return 0; +} + /** * Check if IPv4 checksum is valid * @@ -102,11 +127,9 @@ ODP_STATIC_ASSERT(sizeof(odph_ipv4hdr_t) == ODPH_IPV4HDR_LEN, static inline int odph_ipv4_csum_valid(odp_packet_t pkt) { uint32_t offset; - odp_u16be_t res = 0; - uint16_t *w; - int nleft = sizeof(odph_ipv4hdr_t); + int res; odph_ipv4hdr_t ip; - odp_u16be_t chksum; + odp_u16sum_t chksum, cur_chksum; offset = odp_packet_l3_offset(pkt); if (offset == ODP_PACKET_OFFSET_INVALID) @@ -114,37 +137,45 @@ static inline int odph_ipv4_csum_valid(odp_packet_t pkt) odp_packet_copy_to_mem(pkt, offset, sizeof(odph_ipv4hdr_t), &ip); - w = (uint16_t *)(void *)&ip; chksum = ip.chksum; - ip.chksum = 0x0; - res = odph_chksum(w, nleft); - return (res == chksum) ? 1 : 0; + res = odph_ipv4_csum(pkt, offset, &ip, &cur_chksum); + if (odp_unlikely(res < 0)) + return 0; + + return (cur_chksum == chksum) ? 1 : 0; } /** * Calculate and fill in IPv4 checksum * - * @note when using this api to populate data destined for the wire - * odp_cpu_to_be_16() can be used to remove sparse warnings - * * @param pkt ODP packet * - * @return IPv4 checksum in host cpu order, or 0 on failure + * @retval 0 on success + * @retval <0 on failure */ -static inline odp_u16sum_t odph_ipv4_csum_update(odp_packet_t pkt) +static inline int odph_ipv4_csum_update(odp_packet_t pkt) { - uint16_t *w; - odph_ipv4hdr_t *ip; - int nleft = sizeof(odph_ipv4hdr_t); + uint32_t offset; + odph_ipv4hdr_t ip; + odp_u16sum_t chksum; + int res; - ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL); - if (ip == NULL) - return 0; + offset = odp_packet_l3_offset(pkt); + if (offset == ODP_PACKET_OFFSET_INVALID) + return -1; + + res = odp_packet_copy_to_mem(pkt, offset, sizeof(ip), &ip); + if (odp_unlikely(res < 0)) + return res; + + res = odph_ipv4_csum(pkt, offset, &ip, &chksum); + if (odp_unlikely(res < 0)) + return res; - w = (uint16_t *)(void *)ip; - ip->chksum = odph_chksum(w, nleft); - return ip->chksum; + return odp_packet_copy_from_mem(pkt, + offset + ODPH_IPV4HDR_CSUM_OFFSET, + 2, &chksum); } /** IPv6 version */ diff --git a/test/common_plat/validation/api/classification/odp_classification_common.c b/test/common_plat/validation/api/classification/odp_classification_common.c index e0c0808ec..60e20ea87 100644 --- a/test/common_plat/validation/api/classification/odp_classification_common.c +++ b/test/common_plat/validation/api/classification/odp_classification_common.c @@ -317,8 +317,7 @@ odp_packet_t create_packet(cls_packet_info_t pkt_info) ip->src_addr = odp_cpu_to_be_32(addr); ip->ver_ihl = ODPH_IPV4 << 4 | ODPH_IPV4HDR_IHL_MIN; ip->id = odp_cpu_to_be_16(seqno); - ip->chksum = 0; - ip->chksum = odph_ipv4_csum_update(pkt); + odph_ipv4_csum_update(pkt); ip->proto = next_hdr; ip->tot_len = odp_cpu_to_be_16(l3_len); ip->ttl = DEFAULT_TTL; diff --git a/test/common_plat/validation/api/classification/odp_classification_test_pmr.c b/test/common_plat/validation/api/classification/odp_classification_test_pmr.c index 15b76033b..87d04b6be 100644 --- a/test/common_plat/validation/api/classification/odp_classification_test_pmr.c +++ b/test/common_plat/validation/api/classification/odp_classification_test_pmr.c @@ -1678,7 +1678,7 @@ static void classification_test_pmr_term_daddr(void) odp_pktio_mac_addr(pktio, eth->dst.addr, ODPH_ETHADDR_LEN); ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL); ip->dst_addr = odp_cpu_to_be_32(addr); - ip->chksum = odph_ipv4_csum_update(pkt); + odph_ipv4_csum_update(pkt); seqno = cls_pkt_get_seq(pkt); CU_ASSERT(seqno != TEST_SEQ_INVALID); diff --git a/test/common_plat/validation/api/classification/odp_classification_tests.c b/test/common_plat/validation/api/classification/odp_classification_tests.c index 1b044509e..c7f5d0d47 100644 --- a/test/common_plat/validation/api/classification/odp_classification_tests.c +++ b/test/common_plat/validation/api/classification/odp_classification_tests.c @@ -239,8 +239,7 @@ void test_cls_pmr_chain(void) ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL); parse_ipv4_string(CLS_PMR_CHAIN_SADDR, &addr, &mask); ip->src_addr = odp_cpu_to_be_32(addr); - ip->chksum = 0; - ip->chksum = odph_ipv4_csum_update(pkt); + odph_ipv4_csum_update(pkt); set_first_supported_pmr_port(pkt, CLS_PMR_CHAIN_PORT); @@ -262,8 +261,7 @@ void test_cls_pmr_chain(void) ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL); parse_ipv4_string(CLS_PMR_CHAIN_SADDR, &addr, &mask); ip->src_addr = odp_cpu_to_be_32(addr); - ip->chksum = 0; - ip->chksum = odph_ipv4_csum_update(pkt); + odph_ipv4_csum_update(pkt); enqueue_pktio_interface(pkt, pktio_loop); pkt = receive_packet(&queue, ODP_TIME_SEC_IN_NS); @@ -670,8 +668,7 @@ void test_pktio_pmr_composite_cos(void) ip = (odph_ipv4hdr_t *)odp_packet_l3_ptr(pkt, NULL); parse_ipv4_string(CLS_PMR_SET_SADDR, &addr, &mask); ip->src_addr = odp_cpu_to_be_32(addr); - ip->chksum = 0; - ip->chksum = odph_ipv4_csum_update(pkt); + odph_ipv4_csum_update(pkt); set_first_supported_pmr_port(pkt, CLS_PMR_SET_PORT); enqueue_pktio_interface(pkt, pktio_loop); From patchwork Thu Sep 14 15:00:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112562 Delivered-To: patch@linaro.org Received: by 10.80.163.150 with SMTP id s22csp737573edb; Thu, 14 Sep 2017 08:03:20 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCimvSLE7KXxCpWnQ8o1+6TUT6y6FrkCWlUWFvMc6ZYlfOLCz4gE08bCuTZUqb/SrbS2wxo X-Received: by 10.55.163.201 with SMTP id m192mr3108103qke.27.1505401399878; Thu, 14 Sep 2017 08:03:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401399; cv=none; d=google.com; s=arc-20160816; b=0rG2pU5qoRYo/gfzBST8bJSIDicbGR/JhjIqovOOYgkWzmc//umBoQYnJIQVtHgBUJ uaTeY6oFFUSzhQn4IfYEAfTBghRBP4PnSZMK+vCQXwRL3c/Yaa2naYDxl85zWL8qIvem ElH3o2+oQEx/rc90h/usa+38XR8etZFpVG45azXO7Ykx008ECSpnMwwvX4yrMVMKIWyP gMDAeOlc1UYsVbyE7g6u0BTnCd3kwCFY8cyM7tuZyfEnxeN6UoOvV2Tv9T3CdS9YmHPs J8mRlAUeOyvFq2jTFX9SDzhHZEzcsZ5YHUWaHytBYYFUN9XgaZ55h6pfTNmOWdfTJhIb ABaA== 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=0BVREzy2vVUueHxt5NT0rSDi+21cp4fKiWSDCAZPup0=; b=tKaLdi2JlATu5TEdiIhsNmuR7goFVfmjPjYtm4vez5Rx0sTZntz6IQ30995Md7b7wG c03MZ/sWoaGnS5M2Lczog+70OcuAFrudijZpUpaNK8BCc35euWdGDhYQB+VYLAfnzpRN dcKO6Alb79EQCyqqkR3A89HGoWqw0ldAvZ2vziPnxLwf1iUM03wyFWjPw/Qen/oSjllr EDDKvaXNbUpsnmPlYddPIlKc5e/TwtA/EunVGnBaMbs5LuxM62ggGrr3u27iakuSYn+K rezkaKiavpXqOavb+Hj/LuXXjXh1bkhvgxVU+kBwWfvtTS5HIF9X4q+DtTSF5Q4TDFoE e3sw== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id h9si3342302qte.273.2017.09.14.08.03.19; Thu, 14 Sep 2017 08:03:19 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 8C0AB609B3; Thu, 14 Sep 2017 15:03:19 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 EAFC4609DA; Thu, 14 Sep 2017 15:00:48 +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 0484F6098C; Thu, 14 Sep 2017 15:00:25 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id B745660882 for ; Thu, 14 Sep 2017 15:00:23 +0000 (UTC) Received: from mxback14j.mail.yandex.net (mxback14j.mail.yandex.net [IPv6:2a02:6b8:0:1619::90]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 37DD2185ED8 for ; Thu, 14 Sep 2017 18:00:22 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback14j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id uyqjs4Xeq7-0MUePpH3; Thu, 14 Sep 2017 18:00:22 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0L7ieSSX; Thu, 14 Sep 2017 18:00:21 +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: Thu, 14 Sep 2017 18:00:05 +0300 Message-Id: <1505401213-7265-5-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 4/12] helper: chksum: verify odph_ipv4_chksum_*() 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 Signed-off-by: Dmitry Eremin-Solenikov --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ helper/test/chksum.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/helper/test/chksum.c b/helper/test/chksum.c index 914eab04a..9eb7ee06b 100644 --- a/helper/test/chksum.c +++ b/helper/test/chksum.c @@ -110,9 +110,17 @@ int main(int argc ODPH_UNUSED, char *argv[] ODPH_UNUSED) ODPH_IPV4HDR_LEN); ip->proto = ODPH_IPPROTO_UDP; ip->id = odp_cpu_to_be_16(1); - ip->chksum = 0; odp_packet_has_ipv4_set(test_packet, 1); - odph_ipv4_csum_update(test_packet); + if (odph_ipv4_csum_update(test_packet) < 0) + status = -1; + + if (!odph_ipv4_csum_valid(test_packet)) + status = -1; + + printf("IP chksum = 0x%x\n", odp_be_to_cpu_16(ip->chksum)); + + if (odp_be_to_cpu_16(ip->chksum) != 0x3965) + status = -1; /* udp */ odp_packet_l4_offset_set(test_packet, ODPH_ETHHDR_LEN From patchwork Thu Sep 14 15:00:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112564 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp845285qgf; Thu, 14 Sep 2017 08:04:59 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCT8F+nr6b7rzGWlt+5ijY9X9UZ4cVMI4C98J/DWBbuUR38oAmo8ZGjCb595DRtfKYLWQP8 X-Received: by 10.200.25.246 with SMTP id s51mr30288186qtk.70.1505401499075; Thu, 14 Sep 2017 08:04:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401499; cv=none; d=google.com; s=arc-20160816; b=tT/fOx+GJhJ19QlFFvkNMQCeObeAPUgWVCPhK59hH8AcPdXRgQ+Q1vIVqaa7LukM4J LkeLJQSktzyMnJ7VShlw2giGYUR21NwdoQukyhGmm+zQd1rw23uzv9ZQqZxsffx+Cgw3 SBn7UbyCMwQrhxIDOXlxHpsl2LZjg4foU8Yd8A3AX0G/j82Stt3Xc3nTCcC6vKE7V1qw 2GgGcPiWPJ6Wr1jKEn3INbj+5QH7yhwNslaILYqzlmEGQtzs+Gcs415Mgi6i6D+BXRM6 Atxf5mVsqsU1Z9cIpsE5K2ZNQoTjmw5vYWzzebrvN+8p54j+6Rc9rMRT0l7mAgX/+V3v Yj6A== 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=eFXgP85hLvdvFiJMO/nCt8g6OIjueyI+07jKCZS/m8w=; b=ZBi+NA6TKR9CWuTX/1WW8EDL2xao/qmFyjTQc91YoMTxE1hsEP84Q6tejdzHL3Hx4R vOmtJSyiwMqcev7y92n7KRWNAUc0VNm+3KyR7RPjFmfatDJRhVBYWJBdAmh4Af0hhJl+ +rwwd9X+ukNZ8Fj+epaq9Ooa/mponxWl2YLwtJ1vHD5l7VCik7fedCuEh5G6PPtSnKb3 rNT2Wr0GVEF830NKCCoAkWpK9fax8F7mmdl86YxkpUAZJe1FHwE/CGSWQmtNipzZd/W5 +qkP9PH8YRoSVP2sBaX2mHlxLVuVfhuXQLHzw4rxMYz2mK4sy58FGUe32ZWH6blzDQzx idcA== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 11si17075591qki.338.2017.09.14.08.04.58; Thu, 14 Sep 2017 08:04:59 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id A150F62CE2; Thu, 14 Sep 2017 15:04:58 +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,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 7326F609FF; Thu, 14 Sep 2017 15:01:02 +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 4A0D46097D; Thu, 14 Sep 2017 15:00:27 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id 76A8560889 for ; Thu, 14 Sep 2017 15:00:24 +0000 (UTC) Received: from mxback10g.mail.yandex.net (mxback10g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:171]) by forward101o.mail.yandex.net (Yandex) with ESMTP id B7ADB1342695 for ; Thu, 14 Sep 2017 18:00:22 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback10g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 0WUXJH81HU-0MaiG9DZ; Thu, 14 Sep 2017 18:00:22 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0M7uUP0A; Thu, 14 Sep 2017 18:00:22 +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: Thu, 14 Sep 2017 18:00:06 +0300 Message-Id: <1505401213-7265-6-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 5/12] api: queue: change order lock count data type 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: Balasubramanian Manoharan change order lock count data type from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ include/odp/api/spec/queue.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h index 9dd0a5618..23261de2b 100644 --- a/include/odp/api/spec/queue.h +++ b/include/odp/api/spec/queue.h @@ -106,7 +106,7 @@ typedef struct odp_queue_capability_t { uint32_t max_queues; /** Maximum number of ordered locks per queue */ - unsigned max_ordered_locks; + uint32_t max_ordered_locks; /** Maximum number of scheduling groups */ unsigned max_sched_groups; @@ -393,10 +393,11 @@ odp_schedule_group_t odp_queue_sched_group(odp_queue_t queue); * * @param queue Queue handle * - * @return Number of ordered locks associated with this ordered queue - * @retval <0 Specified queue is not ordered + * @return Number of ordered locks associated with this ordered queue + * @retval 0 Specified queue is not ordered or No ordered lock associated + * with the ordered queue. */ -int odp_queue_lock_count(odp_queue_t queue); +uint32_t odp_queue_lock_count(odp_queue_t queue); /** * Get printable value for an odp_queue_t From patchwork Thu Sep 14 15:00:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112569 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp850244qgf; Thu, 14 Sep 2017 08:08:33 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDKX30+1ZBq3MRKp/LwqssExXFv5RBP4KcFFrt7F8IlfU5Af6EZTS76/v/jdDvklGjj4qNv X-Received: by 10.200.47.114 with SMTP id k47mr33458210qta.109.1505401713651; Thu, 14 Sep 2017 08:08:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401713; cv=none; d=google.com; s=arc-20160816; b=dTuLJ0vH+ZccX7pFwflyhy4aYPCPmKSNNc5gfiIbbjv+BiGFINtJi2KREGLI+EiVb0 MudIX9nDpNaBY14WTyfXkv0VvJ+1wqljxJ61RYGZPvhvO0uv5tkgkxdToouQMy/5AgqL L1wTKVVQBdZH2dCpe88VsF6PRbjCox6VWWlhiFEPBgqNOdznJT0fF72YNFWxqSL5W5PK bDMQDxV1K7O8UQgU3pSCSligYdu+ye3rq5ogp/7Xr33skw0Wz0YzfF0gV4YSLL3t3WrA cMlNIOERSsjpreMUbTMutP+6Bz8ME2SgixlEqYsUddBm3PMerUx9dAxUZV7zs762RfgY YErw== 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=LaKLB9YSYD0rHDo7PqBlkBA2SBPDdo/gtk+BcvrRSyY=; b=SMdOeEC5uPPkdYedFS7XLsZzeVKmwN86TKSaaE/2vfbCv+zflZYNb2ZMlN1fhHfcuX 6oXx738q+hYzDxlDogXPNP4Z/1FgWtTwlvuHv18K5GxW08n7/8uM6n3SluhcxmpIxDTA wd9LT0MeJEOLmgmM62qUQQr6geKucKSSZpWP2ifA4KBVLoGDTPXgxlHbna4SGR8uSxew md79yKhLREMXq65w1DwFpUnkuN+KzIdebeMQAXf7gRHnjbB6RcmOvLbmsE4SgCBKRZOO eaOyKHB/C0FVKFnCk4fujKbCCfxUj0IY+7TF/DJv6IljabM+fWBD6oCpCLC2BbQkWG3O x+WA== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id i6si17073020qkc.424.2017.09.14.08.08.33; Thu, 14 Sep 2017 08:08:33 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 00B5460BE9; Thu, 14 Sep 2017 15:08:32 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 BA28F60639; Thu, 14 Sep 2017 15:01:18 +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 1CF9B6097C; Thu, 14 Sep 2017 15:00:33 +0000 (UTC) Received: from forward106j.mail.yandex.net (forward106j.mail.yandex.net [5.45.198.249]) by lists.linaro.org (Postfix) with ESMTPS id 15A34608E0 for ; Thu, 14 Sep 2017 15:00:25 +0000 (UTC) Received: from mxback7j.mail.yandex.net (mxback7j.mail.yandex.net [IPv6:2a02:6b8:0:1619::110]) by forward106j.mail.yandex.net (Yandex) with ESMTP id 63D641803E6C for ; Thu, 14 Sep 2017 18:00:23 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback7j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id I83ZuA0LMN-0NAKFiae; Thu, 14 Sep 2017 18:00:23 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0M7Kkrx6; Thu, 14 Sep 2017 18:00:22 +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: Thu, 14 Sep 2017 18:00:07 +0300 Message-Id: <1505401213-7265-7-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 6/12] api: schedule: remove support for nested ordered lock 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: Balasubramanian Manoharan removes support for nested ordered lock use-case changes function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ include/odp/api/spec/schedule.h | 7 +++++-- include/odp/api/spec/schedule_types.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index 8244746d7..e2abf990b 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -347,12 +347,15 @@ int odp_schedule_group_info(odp_schedule_group_t group, * be protected by its own ordered lock. This promotes maximum parallelism by * allowing order to maintained on a more granular basis. If an ordered lock * is used multiple times in the same ordered context results are undefined. + * Only one ordered lock can be active in an ordered context at any given time. + * Results are undefined when multiple ordered locks are acquired in nested + * fashion within the same ordered context. * * @param lock_index Index of the ordered lock in the current context to be * acquired. Must be in the range 0..odp_queue_lock_count() * - 1 */ -void odp_schedule_order_lock(unsigned lock_index); +void odp_schedule_order_lock(uint32_t lock_index); /** * Release ordered context lock @@ -365,7 +368,7 @@ void odp_schedule_order_lock(unsigned lock_index); * hold this lock. Must be in the range * 0..odp_queue_lock_count() - 1 */ -void odp_schedule_order_unlock(unsigned lock_index); +void odp_schedule_order_unlock(uint32_t lock_index); /** * @} diff --git a/include/odp/api/spec/schedule_types.h b/include/odp/api/spec/schedule_types.h index 8a4e42c64..397f98fcd 100644 --- a/include/odp/api/spec/schedule_types.h +++ b/include/odp/api/spec/schedule_types.h @@ -146,7 +146,7 @@ typedef struct odp_schedule_param_t { /** Ordered lock count for this queue * * Default value is 0. */ - unsigned lock_count; + uint32_t lock_count; } odp_schedule_param_t; /** From patchwork Thu Sep 14 15:00:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112568 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp849379qgf; Thu, 14 Sep 2017 08:07:55 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDyXqFrBSCA52R+0yZPrILm6k3OUeoWUqlriQt90n38X4l+flH2EydBczSMTdkvWqGevYLV X-Received: by 10.55.165.81 with SMTP id o78mr3171799qke.313.1505401675164; Thu, 14 Sep 2017 08:07:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401675; cv=none; d=google.com; s=arc-20160816; b=exaQ4YnCnZlrqF2xwrsIvss0+/1B1JoVMBHap03QbdtQgl4lfZadO7eCH59vbF/WAU KBgnxyUyr2G/oRki7LhOf2DYUC0vwkI5ZZ/hXuvhINnrnhGk81HAHxALrfEK9UmicFa9 d8Xdld6b+cp2nGW3A3NmHGahC4JUQVZQtHeqpPmNRWQWX9wWlBFKZgsTxf69FZ7RXDCF JhqlPf/3On3nLipVE457ab2HzQArRbsIsd168jdUOdGz4784bVLl7aaYOfiHAl0FU+5U GKn+C6PYNpRlAqgReqqU2OGgMW+o309W3XwL65Y6uVk2Yy4p0S1kWx3eH9rLTwgqewrE BsqA== 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=0wzwK8nMhCtDiwDWsX9aJg+Dbu9aIH93+jK0vHZRisE=; b=XyXzOLYzFN1NY4jDd571eE8zloyBJloOP8ONGuPaDHK0Ctr61hz4k61HRimG0cJCby aU9c5p+oShDdAjzI/KK40WXLY8hjyHHL2gXdIRVOSCsFu6Ag2U5abUDLQvqiaqd62/1l WVG3W5N18jN1IB9MKn/mjEZkADLixP+3w8+L7vatniIM17ev5PWqClw5xQoZxQ3NgZuW kvHaG/7eO8i+yEZPoEPGKhPLiQHYH7hhPeOPpKLtDKhe+i91g7CD6W/k1i0Xd9U7k5Jt NlkUwPqJUZ4mgpK/d0vkFfCd9phZVJ7ozaKmAFg2dGzZuRHtqcMx44X/g+bMNivACn5v e8MQ== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g62si17585600qkc.217.2017.09.14.08.07.53; Thu, 14 Sep 2017 08:07:55 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 91A8D60B59; Thu, 14 Sep 2017 15:07:53 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 6036160B4E; Thu, 14 Sep 2017 15:01:16 +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 1911C609A6; Thu, 14 Sep 2017 15:00:33 +0000 (UTC) Received: from forward103o.mail.yandex.net (forward103o.mail.yandex.net [37.140.190.177]) by lists.linaro.org (Postfix) with ESMTPS id A254A60900 for ; Thu, 14 Sep 2017 15:00:25 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward103o.mail.yandex.net (Yandex) with ESMTP id 071CF5882BB1 for ; Thu, 14 Sep 2017 18:00:24 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id qP4Bg0PeDZ-0NnqwCbB; Thu, 14 Sep 2017 18:00:23 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0N7K46lu; Thu, 14 Sep 2017 18:00:23 +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: Thu, 14 Sep 2017 18:00:08 +0300 Message-Id: <1505401213-7265-8-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 7/12] api: schedule: add schedule order unlock lock api 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: Balasubramanian Manoharan Adds odp_schedule_order_unlock_lock() api. This api combines schedule order unlock and lock into a single api for performance optimization in HW Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ include/odp/api/spec/schedule.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/include/odp/api/spec/schedule.h b/include/odp/api/spec/schedule.h index e2abf990b..fe2300db0 100644 --- a/include/odp/api/spec/schedule.h +++ b/include/odp/api/spec/schedule.h @@ -371,6 +371,27 @@ void odp_schedule_order_lock(uint32_t lock_index); void odp_schedule_order_unlock(uint32_t lock_index); /** + * Release existing ordered context lock and acquire a new lock + * + * This call is valid only when holding an ordered synchronization context. + * Release a previously locked ordered context lock and acquire a new ordered + * context lock. The operation is equivalent to application calling first + * odp_schedule_order_unlock(unlock_index) and then + * odp_schedule_order_lock(lock_index). The same constraints apply with this + * call as with those two. + * + * @param unlock_index Index of the acquired ordered lock in the current + * context to be released. + * @param lock_index Index of the ordered lock in the current context to be + * acquired. Must be in the range + * 0...odp_queue_lock_count() - 1. + * + * @see odp_schedule_order_lock(), odp_schedule_order_unlock() + * + */ +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index); + +/** * @} */ From patchwork Thu Sep 14 15:00:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112566 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp846751qgf; Thu, 14 Sep 2017 08:05:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCci3ucFpa+BpOQW0sW/CtgRpMz3mRwJe6l90Ixvu5kXVwIngrZwe9/0HLcW2/xuHvgFe+U X-Received: by 10.55.72.81 with SMTP id v78mr3023020qka.333.1505401556390; Thu, 14 Sep 2017 08:05:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401556; cv=none; d=google.com; s=arc-20160816; b=VXiJbTncb4oJmA0Trb52SRVVkIuizadK7AXdDAaa+DHpY04+/6UP7XWiJ8ZUGtSctW YmdESZPziqi4vnNOOzKYkBkx07Jp91v7d/SP2F1PCdmj9hB/VWnEUKXHVE+Ykv6QjB18 E0UD6OIqL2B6nOUgJNXDrRyqwlZKrd36kyzx5pQSxrCJONZLXOUn4dHwFeMEJHtG6XdS 9X4FXZI7RVBgCqwfIu/dAeadEmhVjUPABBya/M5uhqbhRydo9AlxWHnEXcYCx6fTcykz 8fIy47P2pyIG9WZOMGpXfNFX4g2TVFaYMeSU0QABBtLAooRkJBZkS6oQsb4tdDdy2iI+ ysZg== 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=+BLjBDt0whZ0Y3nrV7pqensTK0Zs4TSEP2SADuAVl9c=; b=IfdDNtSz2Xw9WitVdWivUXAaHeu3Okd//fU9ORL40h+ISJG1VkA/f9TyDdn0+Mym5p hur8aEmlmjAP5duZNaIRH+Ioykb/xaOoCezXlM4umVpG49RoHt8ReuwmimbqLAhA5qLS bAnzvPXvfAL6tIyUfqcP0pmIoTvTkr9ogcQiBBOFWYtdR7JRqt1SFFglrmLTM0YDHyoi sS4qyEH6mUSWFkhS5rAThBS0qD3AE1OfSp21dENVI7WK0NuJJYHbmUmcrtKk60pRGGFj aU//QyhHcWS544dMYZqfOCL8/r2XxsXZOe3zbW/P0WVT1VRa7nqy+v+QGuYkE7k/uS3s SOGQ== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j7si17887418qka.385.2017.09.14.08.05.55; Thu, 14 Sep 2017 08:05:56 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id AC0F762CFA; Thu, 14 Sep 2017 15:05:55 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 C136260B45; Thu, 14 Sep 2017 15:01:07 +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 0B3F8609AC; Thu, 14 Sep 2017 15:00:30 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id F30836097C for ; Thu, 14 Sep 2017 15:00:25 +0000 (UTC) Received: from mxback3j.mail.yandex.net (mxback3j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10c]) by forward103p.mail.yandex.net (Yandex) with ESMTP id AB5D82182E02 for ; Thu, 14 Sep 2017 18:00:24 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback3j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id SZJJypRbYM-0OreLK7h; Thu, 14 Sep 2017 18:00:24 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0O7Kj4ck; Thu, 14 Sep 2017 18:00:24 +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: Thu, 14 Sep 2017 18:00:09 +0300 Message-Id: <1505401213-7265-9-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 8/12] linux-generic: queue: change order lock count data type 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: Balasubramanian Manoharan change order lock count data type from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ platform/linux-generic/include/odp_queue_if.h | 2 +- platform/linux-generic/odp_queue.c | 4 ++-- platform/linux-generic/odp_queue_if.c | 2 +- platform/linux-generic/odp_queue_scalable.c | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/platform/linux-generic/include/odp_queue_if.h b/platform/linux-generic/include/odp_queue_if.h index 410c6b796..ed8d6ca99 100644 --- a/platform/linux-generic/include/odp_queue_if.h +++ b/platform/linux-generic/include/odp_queue_if.h @@ -38,7 +38,7 @@ typedef struct { odp_schedule_sync_t (*queue_sched_type)(odp_queue_t queue); odp_schedule_prio_t (*queue_sched_prio)(odp_queue_t queue); odp_schedule_group_t (*queue_sched_group)(odp_queue_t queue); - int (*queue_lock_count)(odp_queue_t queue); + uint32_t (*queue_lock_count)(odp_queue_t queue); uint64_t (*queue_to_u64)(odp_queue_t hdl); void (*queue_param_init)(odp_queue_param_t *param); int (*queue_info)(odp_queue_t queue, odp_queue_info_t *info); diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c index d941accc2..6901b3a6b 100644 --- a/platform/linux-generic/odp_queue.c +++ b/platform/linux-generic/odp_queue.c @@ -175,12 +175,12 @@ static odp_schedule_group_t queue_sched_group(odp_queue_t handle) return handle_to_qentry(handle)->s.param.sched.group; } -static int queue_lock_count(odp_queue_t handle) +static uint32_t queue_lock_count(odp_queue_t handle) { queue_entry_t *queue = handle_to_qentry(handle); return queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED ? - (int)queue->s.param.sched.lock_count : -1; + (int)queue->s.param.sched.lock_count : 0; } static odp_queue_t queue_create(const char *name, diff --git a/platform/linux-generic/odp_queue_if.c b/platform/linux-generic/odp_queue_if.c index 44fda0d68..969b0d3cb 100644 --- a/platform/linux-generic/odp_queue_if.c +++ b/platform/linux-generic/odp_queue_if.c @@ -92,7 +92,7 @@ odp_schedule_group_t odp_queue_sched_group(odp_queue_t queue) return queue_api->queue_sched_group(queue); } -int odp_queue_lock_count(odp_queue_t queue) +uint32_t odp_queue_lock_count(odp_queue_t queue) { return queue_api->queue_lock_count(queue); } diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c index bcda21953..3612bd647 100644 --- a/platform/linux-generic/odp_queue_scalable.c +++ b/platform/linux-generic/odp_queue_scalable.c @@ -333,12 +333,12 @@ static odp_schedule_group_t queue_sched_group(odp_queue_t handle) return qentry_from_int(queue_from_ext(handle))->s.param.sched.group; } -static int queue_lock_count(odp_queue_t handle) +static uint32_t queue_lock_count(odp_queue_t handle) { queue_entry_t *queue = qentry_from_int(queue_from_ext(handle)); return queue->s.param.sched.sync == ODP_SCHED_SYNC_ORDERED ? - (int)queue->s.param.sched.lock_count : -1; + (int)queue->s.param.sched.lock_count : 0; } static odp_queue_t queue_create(const char *name, From patchwork Thu Sep 14 15:00:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112567 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp848132qgf; Thu, 14 Sep 2017 08:06:56 -0700 (PDT) X-Google-Smtp-Source: AOwi7QD+hQ1bu0f2aTlhFe64izFzv6PNEGSleFYpUCVjH4ZEmO4lYRo68Tx7NdSzM59EGqCXHDYY X-Received: by 10.55.21.92 with SMTP id f89mr2901693qkh.177.1505401616731; Thu, 14 Sep 2017 08:06:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401616; cv=none; d=google.com; s=arc-20160816; b=ffpG7kMVXoTeEmIaV6QRUpLYm3XmFAmt74gC2+4W9d1f3a/3/Qb8K8kq6om59uRkBb f+jjSgchZnvEggQwwWfkfBzOiI4uRosNmsVViLXWaOJibLLC7dATyFj+ECyuLc5fLZqw QosCvZo6kPsxIusZfw4TBljqIMQCOdCVgTkcMBfFnSqvuMpbmrvaNrWsry2w4yD2z0DH 4Y3NUDmKAEopSADXT1wSm94hoH1HAgui9L7VZIbib4Fnps/ndY3gYrfECuc0wI5nd04z PViJMKJhnGzV8wX6uoZPlHWaZDHlPVxorPygJGvEehal9MkFa9UP22uWHGTB3lR/uu+o gT/w== 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=ZQAoF848OvNSdGd+5vlKQpq/FQsx841eA0aaxnPBdJQ=; b=x7+NmVi9Dr54CB+p9Qy0hwFzKBtMr+LcUbL/fu3MZ4seIQGBv3hpZ24zQ8wi54QMAd Uq8qgqLIeTeLxfWd+hNiUoDiZVsozORSrF4jYTOfIs4NM0M/vB58hYjoqCIm8QRajRDB s902lMIuPmcxgj2pYo1kSGQT2SgILdMmKSZqruiV39GAmzITmkWLvBCtrPzY3vbheBaB PdhadD39ZQlL1z0zpfkvvJj1oYHTDvnOHM+mskISNqa/sL+D1DtI+D6MGAeDewl15SPL ooR3T/mAXugDDm0IR+6sWriq2L9VlMd1ixpZ3ULnHfu9x/r0UtoKyf5DwsP5G0euWhv+ hMpw== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id 22si19213364qkp.389.2017.09.14.08.06.56; Thu, 14 Sep 2017 08:06:56 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 03E7E609ED; Thu, 14 Sep 2017 15:06:56 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 1D64960BE8; Thu, 14 Sep 2017 15:01: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 2E91F609A6; Thu, 14 Sep 2017 15:00:30 +0000 (UTC) Received: from forward104p.mail.yandex.net (forward104p.mail.yandex.net [77.88.28.107]) by lists.linaro.org (Postfix) with ESMTPS id 85F5F60882 for ; Thu, 14 Sep 2017 15:00:26 +0000 (UTC) Received: from mxback2o.mail.yandex.net (mxback2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1c]) by forward104p.mail.yandex.net (Yandex) with ESMTP id 85237185ECD for ; Thu, 14 Sep 2017 18:00:25 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback2o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id IOUyfKJlUq-0PfOMW7a; Thu, 14 Sep 2017 18:00:25 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0O786Dnq; Thu, 14 Sep 2017 18:00:24 +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: Thu, 14 Sep 2017 18:00:10 +0300 Message-Id: <1505401213-7265-10-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 9/12] linux-generic: schedule: change order lock function signature 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: Balasubramanian Manoharan change function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ platform/linux-generic/include/odp_schedule_if.h | 6 +++--- .../linux-generic/include/odp_schedule_scalable_ordered.h | 2 +- platform/linux-generic/odp_schedule.c | 10 +++++----- platform/linux-generic/odp_schedule_if.c | 4 ++-- platform/linux-generic/odp_schedule_iquery.c | 15 +++++++++++---- platform/linux-generic/odp_schedule_scalable.c | 6 +++--- platform/linux-generic/odp_schedule_scalable_ordered.c | 2 +- platform/linux-generic/odp_schedule_sp.c | 6 +++--- 8 files changed, 29 insertions(+), 22 deletions(-) diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 657993b13..3815a27e6 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -34,7 +34,7 @@ typedef int (*schedule_init_local_fn_t)(void); typedef int (*schedule_term_local_fn_t)(void); typedef void (*schedule_order_lock_fn_t)(void); typedef void (*schedule_order_unlock_fn_t)(void); -typedef unsigned (*schedule_max_ordered_locks_fn_t)(void); +typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void); typedef void (*schedule_save_context_fn_t)(uint32_t queue_index); typedef struct schedule_fn_t { @@ -93,8 +93,8 @@ typedef struct { int (*schedule_group_thrmask)(odp_schedule_group_t, odp_thrmask_t *); int (*schedule_group_info)(odp_schedule_group_t, odp_schedule_group_info_t *); - void (*schedule_order_lock)(unsigned); - void (*schedule_order_unlock)(unsigned); + void (*schedule_order_lock)(uint32_t); + void (*schedule_order_unlock)(uint32_t); } schedule_api_t; diff --git a/platform/linux-generic/include/odp_schedule_scalable_ordered.h b/platform/linux-generic/include/odp_schedule_scalable_ordered.h index 1c365a2b0..f88f973c6 100644 --- a/platform/linux-generic/include/odp_schedule_scalable_ordered.h +++ b/platform/linux-generic/include/odp_schedule_scalable_ordered.h @@ -79,7 +79,7 @@ typedef struct reorder_window { uint32_t tail; uint32_t turn; uint32_t olock[CONFIG_QUEUE_MAX_ORD_LOCKS]; - uint16_t lock_count; + uint32_t lock_count; /* Reorder contexts in this window */ reorder_context_t *ring[RWIN_SIZE]; } reorder_window_t; diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index 5b9407624..e6fbd5c65 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -250,7 +250,7 @@ typedef struct { int prio; int queue_per_prio; int sync; - unsigned order_lock_count; + uint32_t order_lock_count; } queue[ODP_CONFIG_QUEUES]; struct { @@ -465,7 +465,7 @@ static inline int grp_update_tbl(void) return num; } -static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } @@ -699,7 +699,7 @@ static inline void ordered_stash_release(void) static inline void release_ordered(void) { uint32_t qi; - unsigned i; + uint32_t i; qi = sched_local.ordered.src_queue; @@ -1100,7 +1100,7 @@ static void order_unlock(void) { } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1127,7 +1127,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index e56e3722b..ff664420f 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -120,12 +120,12 @@ int odp_schedule_group_info(odp_schedule_group_t group, return sched_api->schedule_group_info(group, info); } -void odp_schedule_order_lock(unsigned lock_index) +void odp_schedule_order_lock(uint32_t lock_index) { return sched_api->schedule_order_lock(lock_index); } -void odp_schedule_order_unlock(unsigned lock_index) +void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index b81e5dab1..850c5d8b7 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1150,7 +1150,7 @@ static inline void ordered_stash_release(void) static inline void release_ordered(void) { uint32_t qi; - unsigned i; + uint32_t i; qi = thread_local.ordered.src_queue; @@ -1252,7 +1252,7 @@ static void order_unlock(void) { } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1279,7 +1279,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { odp_atomic_u64_t *ord_lock; uint32_t queue_index; @@ -1296,7 +1296,14 @@ static void schedule_order_unlock(unsigned lock_index) odp_atomic_store_rel_u64(ord_lock, thread_local.ordered.ctx + 1); } -static unsigned schedule_max_ordered_locks(void) +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 765326e8e..86018b0a2 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -990,7 +990,7 @@ static int _schedule(odp_queue_t *from, odp_event_t ev[], int num_evts) /******************************************************************************/ -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { struct reorder_context *rctx = sched_ts->rctx; @@ -1010,7 +1010,7 @@ static void schedule_order_lock(unsigned lock_index) } } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { struct reorder_context *rctx; @@ -1936,7 +1936,7 @@ static void order_unlock(void) { } -static unsigned schedule_max_ordered_locks(void) +static uint32_t schedule_max_ordered_locks(void) { return CONFIG_QUEUE_MAX_ORD_LOCKS; } diff --git a/platform/linux-generic/odp_schedule_scalable_ordered.c b/platform/linux-generic/odp_schedule_scalable_ordered.c index 80ff2490b..9396cd031 100644 --- a/platform/linux-generic/odp_schedule_scalable_ordered.c +++ b/platform/linux-generic/odp_schedule_scalable_ordered.c @@ -220,7 +220,7 @@ static inline void olock_unlock(const reorder_context_t *rctx, static void olock_release(const reorder_context_t *rctx) { reorder_window_t *rwin; - int i; + uint32_t i; rwin = rctx->rwin; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 05241275d..62efe1bb8 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -243,7 +243,7 @@ static int term_local(void) return 0; } -static unsigned max_ordered_locks(void) +static uint32_t max_ordered_locks(void) { return NUM_ORDERED_LOCKS; } @@ -809,12 +809,12 @@ static int schedule_group_info(odp_schedule_group_t group, return 0; } -static void schedule_order_lock(unsigned lock_index) +static void schedule_order_lock(uint32_t lock_index) { (void)lock_index; } -static void schedule_order_unlock(unsigned lock_index) +static void schedule_order_unlock(uint32_t lock_index) { (void)lock_index; } From patchwork Thu Sep 14 15:00:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112570 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp851063qgf; Thu, 14 Sep 2017 08:09:14 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDRSvsWmOro84D9wC0yWq53DPHXNw5J6HDXs0jEEmuQJP0Lco4xgZO7M4avy7mRTq3xBHXG X-Received: by 10.55.15.65 with SMTP id z62mr3270686qkg.2.1505401753785; Thu, 14 Sep 2017 08:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401753; cv=none; d=google.com; s=arc-20160816; b=DrjaFhzJvcHiv3Lmu1i8PmMUdtZmly2GlEXZxQZWGGRO1dpSGY6SSTg20f44pGRD7+ 7mmz6aAjBzrw85x0ZW7xved0fpDHUZtkaZqf4gw6+H2LSY93nKInD1yhmE1CzgONNzFh 9hQH0l2InDu2PGVtLtez8ntZWBURmPh8cMVJwZepLWV7bq1Y4ffmqMndFK2RP4HULOQC z9nI3bYTIxxfHUBfHE9unHFMy6BGmjQeLEZWzknNAe6F3inBHyG2iMgXrDraw4IaXVYY H/4cyG298Pnfnsjifv75HkW65fn976rr9QxClF8G595WOnHQ5LqfiuzHv0mtg4etdLLu QWkw== 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=H9t3YkfesgOoGQ/OqzWauBJZJaLIHKh/aJGa5CPFGQU=; b=tjAjvH7K5/Z0zJ4Upe6Mep7S2quWBW/dzXHxP4vYOPDHuI4jYFSeLCgfCNmCraJ+T0 8rtWizVsX30/6EHSgZs++I9sxY4l22RXW/tjFIxBKYsfMUvzLu90Nt13uawkMMrWgyim ut5SBflUMYzSbn+MxMr0jwi9jpcNx7VpTiLDDqlbU9xM3z3G6d2k6D/7bXJdVPZVY9PG M7Wn7rFjEBT4dowg2xYlWd+Fxjp4hjbiNcDi2pqAyhZS4O8dxq7RlgHHyYBGpjihoVh3 LGOOVq9BSZqFkdDRDjy+bnx2SgDuJjOXc0CwT7C/gbyOGDDohi/9Gw41J0QaCwWCdhP5 Qx1g== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id n190si16656840qkb.508.2017.09.14.08.09.13; Thu, 14 Sep 2017 08:09:13 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 549ED60EC3; Thu, 14 Sep 2017 15:09:13 +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,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 1385760966; Thu, 14 Sep 2017 15:01:32 +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 B198A60900; Thu, 14 Sep 2017 15:00:33 +0000 (UTC) Received: from forward102o.mail.yandex.net (forward102o.mail.yandex.net [37.140.190.182]) by lists.linaro.org (Postfix) with ESMTPS id E49936088A for ; Thu, 14 Sep 2017 15:00:27 +0000 (UTC) Received: from mxback18j.mail.yandex.net (mxback18j.mail.yandex.net [IPv6:2a02:6b8:0:1619::94]) by forward102o.mail.yandex.net (Yandex) with ESMTP id 342F45A03B64 for ; Thu, 14 Sep 2017 18:00:26 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback18j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 6f53Iy9LZA-0Q68Zb7r; Thu, 14 Sep 2017 18:00:26 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0P7KBklR; Thu, 14 Sep 2017 18:00:25 +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: Thu, 14 Sep 2017 18:00:11 +0300 Message-Id: <1505401213-7265-11-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 10/12] linux-generic: schedule: implement schedule order unlock lock api 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: Balasubramanian Manoharan Implements odp_schedule_order_unlock_lock() api. This api combines schedule order unlock and lock into a single api for performance optimization in HW. Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ platform/linux-generic/include/odp_schedule_if.h | 3 +++ platform/linux-generic/odp_schedule.c | 10 +++++++++- platform/linux-generic/odp_schedule_if.c | 5 +++++ platform/linux-generic/odp_schedule_iquery.c | 3 ++- platform/linux-generic/odp_schedule_scalable.c | 8 ++++++++ platform/linux-generic/odp_schedule_sp.c | 10 +++++++++- 6 files changed, 36 insertions(+), 3 deletions(-) diff --git a/platform/linux-generic/include/odp_schedule_if.h b/platform/linux-generic/include/odp_schedule_if.h index 3815a27e6..2384f15b3 100644 --- a/platform/linux-generic/include/odp_schedule_if.h +++ b/platform/linux-generic/include/odp_schedule_if.h @@ -34,6 +34,7 @@ typedef int (*schedule_init_local_fn_t)(void); typedef int (*schedule_term_local_fn_t)(void); typedef void (*schedule_order_lock_fn_t)(void); typedef void (*schedule_order_unlock_fn_t)(void); +typedef void (*schedule_order_unlock_lock_fn_t)(void); typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void); typedef void (*schedule_save_context_fn_t)(uint32_t queue_index); @@ -53,6 +54,7 @@ typedef struct schedule_fn_t { schedule_term_local_fn_t term_local; schedule_order_lock_fn_t order_lock; schedule_order_unlock_fn_t order_unlock; + schedule_order_unlock_lock_fn_t order_unlock_lock; schedule_max_ordered_locks_fn_t max_ordered_locks; /* Called only when status_sync is set */ @@ -95,6 +97,7 @@ typedef struct { odp_schedule_group_info_t *); void (*schedule_order_lock)(uint32_t); void (*schedule_order_unlock)(uint32_t); + void (*schedule_order_unlock_lock)(uint32_t, uint32_t); } schedule_api_t; diff --git a/platform/linux-generic/odp_schedule.c b/platform/linux-generic/odp_schedule.c index e6fbd5c65..1071f83de 100644 --- a/platform/linux-generic/odp_schedule.c +++ b/platform/linux-generic/odp_schedule.c @@ -1144,6 +1144,13 @@ static void schedule_order_unlock(uint32_t lock_index) odp_atomic_store_rel_u64(ord_lock, sched_local.ordered.ctx + 1); } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static void schedule_pause(void) { sched_local.pause = 1; @@ -1429,5 +1436,6 @@ const schedule_api_t schedule_default_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index ff664420f..08ca813a9 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -129,3 +129,8 @@ void odp_schedule_order_unlock(uint32_t lock_index) { return sched_api->schedule_order_unlock(lock_index); } + +void odp_schedule_order_unlock_lock(uint32_t unlock_index, uint32_t lock_index) +{ + sched_api->schedule_order_unlock_lock(unlock_index, lock_index); +} diff --git a/platform/linux-generic/odp_schedule_iquery.c b/platform/linux-generic/odp_schedule_iquery.c index 850c5d8b7..e6be5d3c7 100644 --- a/platform/linux-generic/odp_schedule_iquery.c +++ b/platform/linux-generic/odp_schedule_iquery.c @@ -1375,7 +1375,8 @@ const schedule_api_t schedule_iquery_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; static void thread_set_interest(sched_thread_local_t *thread, diff --git a/platform/linux-generic/odp_schedule_scalable.c b/platform/linux-generic/odp_schedule_scalable.c index 86018b0a2..37be471c6 100644 --- a/platform/linux-generic/odp_schedule_scalable.c +++ b/platform/linux-generic/odp_schedule_scalable.c @@ -1028,6 +1028,13 @@ static void schedule_order_unlock(uint32_t lock_index) rctx->olock_flags |= 1U << lock_index; } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + schedule_order_unlock(unlock_index); + schedule_order_lock(lock_index); +} + static void schedule_release_atomic(void) { sched_scalable_thread_state_t *ts; @@ -1978,4 +1985,5 @@ const schedule_api_t schedule_scalable_api = { .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock, }; diff --git a/platform/linux-generic/odp_schedule_sp.c b/platform/linux-generic/odp_schedule_sp.c index 62efe1bb8..9db587e26 100644 --- a/platform/linux-generic/odp_schedule_sp.c +++ b/platform/linux-generic/odp_schedule_sp.c @@ -819,6 +819,13 @@ static void schedule_order_unlock(uint32_t lock_index) (void)lock_index; } +static void schedule_order_unlock_lock(uint32_t unlock_index, + uint32_t lock_index) +{ + (void)unlock_index; + (void)lock_index; +} + static void order_lock(void) { } @@ -868,5 +875,6 @@ const schedule_api_t schedule_sp_api = { .schedule_group_thrmask = schedule_group_thrmask, .schedule_group_info = schedule_group_info, .schedule_order_lock = schedule_order_lock, - .schedule_order_unlock = schedule_order_unlock + .schedule_order_unlock = schedule_order_unlock, + .schedule_order_unlock_lock = schedule_order_unlock_lock }; From patchwork Thu Sep 14 15:00:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112571 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp852131qgf; Thu, 14 Sep 2017 08:10:08 -0700 (PDT) X-Google-Smtp-Source: AOwi7QASl8cMKiOHohjAAPs4yFkuVC6sQpAnlSwgkOYZMk5RiajxNPQWSQnqjs0Fm5Z/WprLYlZJ X-Received: by 10.200.15.8 with SMTP id e8mr31627174qtk.315.1505401808660; Thu, 14 Sep 2017 08:10:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401808; cv=none; d=google.com; s=arc-20160816; b=dSeJvBiPUpSQZr8XSdL4mtotJt9Ueuvhi3tJ7TaemooheVQE2uVi7fJ/HrBj4w5hlv 6V9KfIGukYfrFUAOokwp3HYKEDOJVhRBIoE3MgkERdJH/8vFGq3SN5m4y6RTMxPsO04H XdT6jtKdssZkRCZ4awpydJnYBmSsbJsF6xZz8Rxps9/hDFNGi5+dPddydcsqxz2qORox HuDvYXhgea2VfvXiIkE7wKyJNZT4og+QNbBxlbn+71/V6IbUA60643Pa2J/qfgnmHAxV Mim4Fak9yNI70AMLBmTS4x+5OwJ6LevXFfSSIKHlHVTw36HCzZeUbE40ss7XKQiram86 HCLw== 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=IgHWJey4uYxIslNgi6uEqxr/ZP6FZeUu8XAt3/08WeI=; b=T3N+N1xWDuNupo46MQnD5aj9bhiOAgMOgykkmUXKV/Z1anivkRPk66L33s+7kLeEir IMzuDvrUiNpSkx8wp7ccwUWTozQ1hnM1tUZc+pQgqLOW/KBEv8OLy85so86QOGStVmbz 2crK7vMp05n/l/No12sD74StCNKNNPU6obPD+iGhYnzqgZwQELC+lfHpzdk+DGrumJfL FHyxbN9bcDng0Y5jjxQ00x4mL4ne7l5/YetDHOyh90jy4giJ2R/5BZdI5bP2jt+mbTK1 bmaVUvdKeGjuBPbRYiwPPTF7Nhi4EFvxUXG+nqNiU49+fphuCkHB5PW61anrj+BdP5bj lgFw== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id g68si17399698qkc.270.2017.09.14.08.10.07; Thu, 14 Sep 2017 08:10:08 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 9D8BE62874; Thu, 14 Sep 2017 15:10:07 +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=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 6BCD56095F; Thu, 14 Sep 2017 15:01:34 +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 2F030608E0; Thu, 14 Sep 2017 15:00:35 +0000 (UTC) Received: from forward103p.mail.yandex.net (forward103p.mail.yandex.net [77.88.28.106]) by lists.linaro.org (Postfix) with ESMTPS id 986E560889 for ; Thu, 14 Sep 2017 15:00:27 +0000 (UTC) Received: from mxback20j.mail.yandex.net (mxback20j.mail.yandex.net [IPv6:2a02:6b8:0:1619::114]) by forward103p.mail.yandex.net (Yandex) with ESMTP id A9D6C2182DBD for ; Thu, 14 Sep 2017 18:00:26 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback20j.mail.yandex.net (nwsmtp/Yandex) with ESMTP id UcSYqsIWum-0Q3uGgAs; Thu, 14 Sep 2017 18:00:26 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0Q7uD606; Thu, 14 Sep 2017 18:00:26 +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: Thu, 14 Sep 2017 18:00:12 +0300 Message-Id: <1505401213-7265-12-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 11/12] test: validation: queue: change order lock data type 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: Balasubramanian Manoharan change oder lock count data type from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ test/common_plat/validation/api/queue/queue.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/common_plat/validation/api/queue/queue.c b/test/common_plat/validation/api/queue/queue.c index 94d0a2fd8..1ec05b1fc 100644 --- a/test/common_plat/validation/api/queue/queue.c +++ b/test/common_plat/validation/api/queue/queue.c @@ -267,9 +267,9 @@ void queue_test_info(void) odp_queue_capability_t capability; char q_plain_ctx[] = "test_q_plain context data"; char q_order_ctx[] = "test_q_order context data"; - unsigned lock_count; + uint32_t lock_count; char *ctx; - int ret; + uint32_t ret; /* Create a plain queue and set context */ q_plain = odp_queue_create(nq_plain, NULL); @@ -314,8 +314,8 @@ void queue_test_info(void) CU_ASSERT(info.param.sched.sync == odp_queue_sched_type(q_order)); CU_ASSERT(info.param.sched.group == odp_queue_sched_group(q_order)); ret = odp_queue_lock_count(q_order); - CU_ASSERT(ret >= 0); - lock_count = (unsigned)ret; + CU_ASSERT(ret > 0); + lock_count = ret; CU_ASSERT(info.param.sched.lock_count == lock_count); CU_ASSERT(odp_queue_destroy(q_plain) == 0); From patchwork Thu Sep 14 15:00:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112572 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp853033qgf; Thu, 14 Sep 2017 08:10:55 -0700 (PDT) X-Google-Smtp-Source: AOwi7QDqdkJcejrL1hHznBe8vAzMTuNcGWzGpTJB8WYQv247yEFg1o9YBnpQOPrW01tej1oKYxnl X-Received: by 10.200.56.184 with SMTP id f53mr29685655qtc.139.1505401855080; Thu, 14 Sep 2017 08:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505401855; cv=none; d=google.com; s=arc-20160816; b=L1ovEBdSpuSwwZoqZ2x5J+QTP+XdV4ce+VglAzzWdMZX8vvgDWdS9l9iaKkw4sM/Zl GgyjRXaZkM1ZYKzn4GSLW58AtLQozkW29ws79ErPf4vNqJt0PTAW/Ahba6ulLK/Cj4jW wmGCIpnADzNyM2/fTZRr6xOKb2T6yIWqfD/ISW97vlWj0/PvmgFeR3v2k3fy1MIxNJLv +kyNh/01RuGBMWCs3CB8hUfv/arUrI5Hfgnml7FXgVbmRRloMMJMfe01Tod9Mwjm0izE ZQK0D3uYtfxKRvg4EBnc2RTWl2GoTfjdRaRHWIEARyoAVevqSfNptdROjRKe4f9NwGyI +jHg== 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=Ssc3f7/qH+jKvzb6y1aSHo6DrqVq+Tsgbo3cWjuqdAs=; b=NCpUKfsO/Us+XYdqj6HiS70TGzG5uXkftATVxs/jF60aFG+jq8a1LH/3ZNa5uvX5MT k4lLNaOaC1Qi4Vfhs6OnPQcmfPMXxjYHFTSTwoqKcFWPGN+rVMpnKn8PCwQomdkzNyvR 3moD6HRV1l/ECRMatgHHbvlQgOzrg2sgeLIu8hhW8Vw3jdOB1UfdX6WZhf9i+0m/+1ju 0UebEBB7uBEIPIYCl9XSJpL4B+QlWWyNbcPHzptqlqgF5iSIAG5IPrSqeEwKtnZPyB5w aj7UAPCe08basEF7EzsUdXDgc9zfoN757lgBSDkHE3bZ9VWYygVSmN5cudmsEb3jA4OF QvYg== ARC-Authentication-Results: i=1; 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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id a124si4372747qkc.87.2017.09.14.08.10.54; Thu, 14 Sep 2017 08:10:55 -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=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id B69E2622F0; Thu, 14 Sep 2017 15:10:54 +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,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 3DC7C60D3D; Thu, 14 Sep 2017 15:01:55 +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 EC77D609C9; Thu, 14 Sep 2017 15:00:37 +0000 (UTC) Received: from forward101p.mail.yandex.net (forward101p.mail.yandex.net [77.88.28.101]) by lists.linaro.org (Postfix) with ESMTPS id 90F35608C0 for ; Thu, 14 Sep 2017 15:00:28 +0000 (UTC) Received: from mxback5o.mail.yandex.net (mxback5o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1f]) by forward101p.mail.yandex.net (Yandex) with ESMTP id 414F76A86680 for ; Thu, 14 Sep 2017 18:00:27 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback5o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id sz09mMdiQF-0R9CinMH; Thu, 14 Sep 2017 18:00:27 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id gNZkqRzw9k-0Q7KJKVO; Thu, 14 Sep 2017 18:00:26 +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: Thu, 14 Sep 2017 18:00:13 +0300 Message-Id: <1505401213-7265-13-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> References: <1505401213-7265-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 160 Subject: [lng-odp] [PATCH API-NEXT v11 12/12] test: validation: schduler: change order lock function signature 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: Balasubramanian Manoharan change order lock function param signature from unsigned to uint32_t Signed-off-by: Balasubramanian Manoharan --- /** Email created from pull request 160 (bala-manoharan:api_sched_order_lock) ** https://github.com/Linaro/odp/pull/160 ** Patch: https://github.com/Linaro/odp/pull/160.patch ** Base sha: 6b6253c30f88c80bf632436ff06c1b000860a2f1 ** Merge commit sha: 438a3bab5df9c05dc06f0b4e4b22c0a7db0864fd **/ .../common_plat/validation/api/scheduler/scheduler.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/common_plat/validation/api/scheduler/scheduler.c b/test/common_plat/validation/api/scheduler/scheduler.c index 963275be5..2c0d44100 100644 --- a/test/common_plat/validation/api/scheduler/scheduler.c +++ b/test/common_plat/validation/api/scheduler/scheduler.c @@ -730,12 +730,12 @@ static int schedule_common_(void *arg) continue; if (sync == ODP_SCHED_SYNC_ORDERED) { - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max; int rc; ndx_max = odp_queue_lock_count(from); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0); qctx = odp_queue_context(from); @@ -781,12 +781,12 @@ static int schedule_common_(void *arg) buf = odp_buffer_from_event(ev); num = 1; if (sync == ODP_SCHED_SYNC_ORDERED) { - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max; int rc; ndx_max = odp_queue_lock_count(from); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0); qctx = odp_queue_context(from); bctx = odp_buffer_addr(buf); @@ -996,11 +996,11 @@ static void reset_queues(thread_args_t *args) for (k = 0; k < args->num_bufs; k++) { queue_context *qctx = odp_queue_context(queue); - int ndx; - int ndx_max; + uint32_t ndx; + uint32_t ndx_max; ndx_max = odp_queue_lock_count(queue); - CU_ASSERT_FATAL(ndx_max >= 0); + CU_ASSERT_FATAL(ndx_max > 0); qctx->sequence = 0; for (ndx = 0; ndx < ndx_max; ndx++) qctx->lock_sequence[ndx] = 0; @@ -1436,7 +1436,7 @@ static int create_queues(void) return -1; } if (odp_queue_lock_count(q) != - (int)capa.max_ordered_locks) { + capa.max_ordered_locks) { printf("Queue %" PRIu64 " created with " "%d locks instead of expected %d\n", odp_queue_to_u64(q),