From patchwork Tue Aug 21 13:00:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 144715 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp5243037ljj; Tue, 21 Aug 2018 06:00:36 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZn7hD12l/H0ObB+Q4XWtiMisXleAII9zKgkAOUcTFtCQimFK3LRYSWy5Krp0ldObDG/SRO X-Received: by 2002:ac8:302b:: with SMTP id f40-v6mr5287201qte.217.1534856436289; Tue, 21 Aug 2018 06:00:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534856436; cv=none; d=google.com; s=arc-20160816; b=Ye3PWmIrVdiLOroh6pNK6axQSAhLndfq9t1jovAgYRSVMiLB9Rf+MzAprTMeaeFiQK udTZ6xRo4IstR4iLYjDjUC7iZqZ88QfQnUnefqmGi14OOabdzb5ntPPDE56stb9hzfZs tbbJTjDLn9Ib//lpyvsZvt84b1jNftwi7s04/ebiTE8y4FjnVDECMlazlLpwHfrJ43+0 eCaARRe7ftWTcGXX1csdRiRNKDsNYshmT5KLVEvck7Al6bied/mmbF571Xy90mI7duDy /KeqSkYIXIXnvrpfNIRiLov08/L/HcfZejmC735epHKXngCdRmC8poOS3dlkD2mPG9Yl 6rfw== 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=ZYKtGg0uSftiOGYPPv69eVOxEQU7Y7xJm2PshwPdVyQ=; b=l92CNtXJotUKUCpmqxUNrMyqK4nItHeuB6RF/j7txDNxAalpREw9tAOyNiNfx3wECZ EfbxKXJJ9nckej6pt+N+ZT5wSxXDeueMRrL5Jw3/8j5iTEqjLRQ8oyuijaisY4IeUWU6 vsEkqL65sYAS3hcgvr0khw7jtqEDUKaji3gFcM/nV8EYKMJGtaX3Lw762ILS5cLJ7A95 NbBER9XP+Lf8o4gWZhh2AN8HiuYnk7BgJGjJDrdbmdOpULJioJvLTRHad25d7OYOLkml 5nCI9YPYM4h9UdveuucZzquWyaDkZkKxvyD6WAwuosc+qrNegaulzZ89yoJB0fE693ku 22NQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (ec2-54-197-127-237.compute-1.amazonaws.com. [54.197.127.237]) by mx.google.com with ESMTP id j3-v6si8906266qtc.98.2018.08.21.06.00.35; Tue, 21 Aug 2018 06:00:36 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) client-ip=54.197.127.237; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.197.127.237 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 776FA607F1; Tue, 21 Aug 2018 13:00:35 +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=-3.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_LOW autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id D22B760676; Tue, 21 Aug 2018 13:00:31 +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 04BEF60676; Tue, 21 Aug 2018 13:00:20 +0000 (UTC) Received: from forward103j.mail.yandex.net (forward103j.mail.yandex.net [5.45.198.246]) by lists.linaro.org (Postfix) with ESMTPS id B7D6C60676 for ; Tue, 21 Aug 2018 13:00:17 +0000 (UTC) Received: from mxback4g.mail.yandex.net (mxback4g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:165]) by forward103j.mail.yandex.net (Yandex) with ESMTP id 1DFCA34C3E39 for ; Tue, 21 Aug 2018 16:00:16 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback4g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id aTS8tCBthT-0Ah4eK5F; Tue, 21 Aug 2018 16:00:10 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id Nq7oZkTddg-09k00jxv; Tue, 21 Aug 2018 16:00:09 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Tue, 21 Aug 2018 13:00:06 +0000 Message-Id: <1534856407-17971-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1534856407-17971-1-git-send-email-odpbot@yandex.ru> References: <1534856407-17971-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 676 Subject: [lng-odp] [PATCH v1 1/2] linux-gen: queue: fix ordered queue issue 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: Petri Savolainen Also plain queue enqueue needs to call scheduler ordered enqueue function, so that scheduler can check re-ordering needs. Signed-off-by: Petri Savolainen --- /** Email created from pull request 676 (psavol:master-queue-fix-ordered) ** https://github.com/Linaro/odp/pull/676 ** Patch: https://github.com/Linaro/odp/pull/676.patch ** Base sha: 912e026c108d7a496ac7467e953dea77dadaaa57 ** Merge commit sha: a997e012a8edc13ce577c8aa49683fc9d722c2ec **/ platform/linux-generic/odp_queue_basic.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/platform/linux-generic/odp_queue_basic.c b/platform/linux-generic/odp_queue_basic.c index 22a76b935..e5d915643 100644 --- a/platform/linux-generic/odp_queue_basic.c +++ b/platform/linux-generic/odp_queue_basic.c @@ -489,13 +489,16 @@ static inline int _plain_queue_enq_multi(odp_queue_t handle, odp_buffer_hdr_t *buf_hdr[], int num) { queue_entry_t *queue; - int num_enq; + int ret, num_enq; ring_st_t *ring_st; uint32_t buf_idx[num]; queue = qentry_from_handle(handle); ring_st = &queue->s.ring_st; + if (sched_fn->ord_enq_multi(handle, (void **)buf_hdr, num, &ret)) + return ret; + buffer_index_from_buf(buf_idx, buf_hdr, num); LOCK(queue);