From patchwork Sun Aug 9 01:55:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 52070 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by patches.linaro.org (Postfix) with ESMTPS id 64E8920539 for ; Sun, 9 Aug 2015 01:57:34 +0000 (UTC) Received: by lagz9 with SMTP id z9sf31331394lag.3 for ; Sat, 08 Aug 2015 18:57:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:delivered-to:from:to:date :message-id:in-reply-to:references:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :mime-version:content-type:content-transfer-encoding:errors-to :sender:x-original-sender:x-original-authentication-results :mailing-list; bh=yBBJtTyRbH10EdmauakcgoV5ZzQTaOizVeyZ4/vQ/vk=; b=edk5MzOXVJBaVP4fRp2T+m7BFxWHxqJ+/KrhAHh3LcIVGYZIhAAhSIdxA5wLjGUYIh gWhW6t5O0vyg4uEqGqaPrExOZmpihUE2X5AIVHKjBw/XVOBiSpkh2/dCp0Dy4ep7JOp/ Zoqr6o2eddwMguXZPA03xHZhZPCmH493j9dmnPvoxU4G3dAKlXNW8omb4MFa8I0mMEpG jdnR/ppoPQBWyJ7KdBvx91zPecpzMnslk1vb1lJ85hKG5vgCd3Io5rrWfDOgwzkOJ97B a8nJ7B/FrZ2kGM5SMwI4l1FrFGNftWhwaBeoBsbP00c8Ot1U4Y05Zbwyzbwm1dQ9aVTj jCHw== X-Gm-Message-State: ALoCoQm3dgis5sRQTfe+gGfuMwOF2Eo4Zc7jmmJfkSIDHx2nwbthfZjz1Fuw4XmMhDfxbZ9yUIqg X-Received: by 10.112.16.200 with SMTP id i8mr4314820lbd.20.1439085452927; Sat, 08 Aug 2015 18:57:32 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.98 with SMTP id c2ls612784laf.7.gmail; Sat, 08 Aug 2015 18:57:32 -0700 (PDT) X-Received: by 10.112.73.33 with SMTP id i1mr14945833lbv.31.1439085452641; Sat, 08 Aug 2015 18:57:32 -0700 (PDT) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id r11si11215579lby.31.2015.08.08.18.57.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 08 Aug 2015 18:57:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labd1 with SMTP id d1so25347380lab.1 for ; Sat, 08 Aug 2015 18:57:32 -0700 (PDT) X-Received: by 10.152.36.161 with SMTP id r1mr14717165laj.88.1439085452531; Sat, 08 Aug 2015 18:57:32 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.7.198 with SMTP id l6csp1187162lba; Sat, 8 Aug 2015 18:57:31 -0700 (PDT) X-Received: by 10.107.18.12 with SMTP id a12mr15002600ioj.176.1439085451328; Sat, 08 Aug 2015 18:57:31 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id l5si2928026igj.9.2015.08.08.18.57.30; Sat, 08 Aug 2015 18:57:31 -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; Received: by lists.linaro.org (Postfix, from userid 109) id 23315620A7; Sun, 9 Aug 2015 01:57:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from ip-10-142-244-252.ec2.internal (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 6582A61EF9; Sun, 9 Aug 2015 01:56:40 +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 829A461E06; Sun, 9 Aug 2015 01:55:25 +0000 (UTC) Received: from mail-ob0-f179.google.com (mail-ob0-f179.google.com [209.85.214.179]) by lists.linaro.org (Postfix) with ESMTPS id BABE961DE0 for ; Sun, 9 Aug 2015 01:55:23 +0000 (UTC) Received: by obbop1 with SMTP id op1so102961012obb.2 for ; Sat, 08 Aug 2015 18:55:23 -0700 (PDT) X-Received: by 10.60.35.98 with SMTP id g2mr13619614oej.6.1439085323284; Sat, 08 Aug 2015 18:55:23 -0700 (PDT) Received: from localhost.localdomain (cpe-24-28-70-239.austin.res.rr.com. [24.28.70.239]) by smtp.gmail.com with ESMTPSA id d184sm9449191oif.9.2015.08.08.18.55.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 08 Aug 2015 18:55:22 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Sat, 8 Aug 2015 20:55:04 -0500 Message-Id: <1439085315-6957-3-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1439085315-6957-1-git-send-email-bill.fischofer@linaro.org> References: <1439085315-6957-1-git-send-email-bill.fischofer@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCHv11 02/13] api: queue: document ordered chain enq support X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: bill.fischofer@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Expand documentation of odp_queue_enq_multi() to describe support for ordered chains. Signed-off-by: Bill Fischofer --- include/odp/api/queue.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/odp/api/queue.h b/include/odp/api/queue.h index ce04eb4..5a6dbc0 100644 --- a/include/odp/api/queue.h +++ b/include/odp/api/queue.h @@ -173,6 +173,29 @@ int odp_queue_enq(odp_queue_t queue, odp_event_t ev); * * @return Number of events actually enqueued (0 ... num) * @retval <0 on failure + * + * @note odp_queue_enq_multi() serves two purposes. First, it allows + * multiple events to be enqueued via a single call. In addition, it + * permits multiple events to partitipate in ordering. When an event + * originating from an ordered queue is followed by one or more events + * that did not originate from an ordered queue, then these subsequent + * events are "chained" to the ordered event such that they participate + * in its ordering. This provides a convenient means for an application + * to split a packet into multiple packets and have them retain the + * relative order of the original packet. + * + * @note If multiple events originating from ordered queues are passed + * to odp_queue_enq_multi() then they (and their associated chains, if + * any) are handled independently. To see this, consider the following + * array of events: uo1, uo2, o1, uo3, uo4, o2, o3, uo5. When this + * array is passed to odp_queue_enq_multi() then unordered events uo1 and + * uo2 will be added to queue, then ordered event o1 and the chained + * events uo3, and uo4, will be added, then ordered event o2, then ordered + * event o3 and the chained event uo5 will be added. In all cases, + * unordered events that are chained to ordered events inherit the relative + * order of their ordered lead event. Note also that there is no + * requirement that the ordered events passed to this routine all originate + * from the same ordered queue sine each is treated independently. */ int odp_queue_enq_multi(odp_queue_t queue, const odp_event_t events[], int num);