From patchwork Fri Jun 5 11:53:43 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zoltan Kiss X-Patchwork-Id: 49561 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 173C92154F for ; Fri, 5 Jun 2015 11:54:47 +0000 (UTC) Received: by lbcak1 with SMTP id ak1sf17320898lbc.2 for ; Fri, 05 Jun 2015 04:54:46 -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=Vv9ZQQo0tEyW1ineHknNaoy4vFJtckw4PlIGN+xcKs4=; b=VS41E8yhqrv/p1RHUqBPHDh+5lOQ/ZUx9hxBZIdycdZSCVzMc9+7ZefFp9OxJDLeY8 BGXSFirx3B8LXrqQeIP9jHXaV093YMdT1bfILtQ2Dg83MovLPpmIcxwBT/BowvC1sJLG 1wbXLhC3n8uxYHgc/CHmSkcp+OXHF/XdPH421SE5P4I3Kkss82ig437V+x5EM3oFsATB P6/Wz2cj6CJJX/OmDGHKsqwBrHpFlWVqmHfyX3W8AFDB/hSecVKH16zJaZVzYwQV3f5B yDlS5Zvnmrhf/53iuad185dHvOX9iH0Q8H28ut1y8CcYCeXjpQy7lS49MYYKYm/s0cOz P/5A== X-Gm-Message-State: ALoCoQkvey6e10ZWlkYYqFRCYmhp/ibk6r66X2RQISC5XQl3iJ+ryAj3ss+orfuY8vbjq9dzUbZS X-Received: by 10.180.106.10 with SMTP id gq10mr30865366wib.0.1433505286075; Fri, 05 Jun 2015 04:54:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.207.2 with SMTP id ls2ls344738lac.51.gmail; Fri, 05 Jun 2015 04:54:45 -0700 (PDT) X-Received: by 10.112.190.10 with SMTP id gm10mr2939072lbc.2.1433505285740; Fri, 05 Jun 2015 04:54:45 -0700 (PDT) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id s2si4608704lal.142.2015.06.05.04.54.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Jun 2015 04:54:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.180 as permitted sender) client-ip=209.85.217.180; Received: by lbcmx3 with SMTP id mx3so44469392lbc.1 for ; Fri, 05 Jun 2015 04:54:45 -0700 (PDT) X-Received: by 10.112.97.194 with SMTP id ec2mr3011331lbb.88.1433505285564; Fri, 05 Jun 2015 04:54:45 -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.108.230 with SMTP id hn6csp1367860lbb; Fri, 5 Jun 2015 04:54:44 -0700 (PDT) X-Received: by 10.55.19.82 with SMTP id d79mr5712159qkh.21.1433505283801; Fri, 05 Jun 2015 04:54:43 -0700 (PDT) Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id f132si7225941qhc.118.2015.06.05.04.54.42; Fri, 05 Jun 2015 04:54:43 -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 C699D6202C; Fri, 5 Jun 2015 11:54:42 +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 044E862032; Fri, 5 Jun 2015 11:54:19 +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 4541D61F9D; Fri, 5 Jun 2015 11:54:15 +0000 (UTC) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by lists.linaro.org (Postfix) with ESMTPS id 42C0961F79 for ; Fri, 5 Jun 2015 11:54:14 +0000 (UTC) Received: by wifx6 with SMTP id x6so18018324wif.0 for ; Fri, 05 Jun 2015 04:54:13 -0700 (PDT) X-Received: by 10.181.11.137 with SMTP id ei9mr16995503wid.48.1433505253473; Fri, 05 Jun 2015 04:54:13 -0700 (PDT) Received: from localhost.localdomain ([90.152.119.35]) by mx.google.com with ESMTPSA id b20sm10268741wjb.46.2015.06.05.04.54.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Jun 2015 04:54:12 -0700 (PDT) From: Zoltan Kiss To: lng-odp@lists.linaro.org Date: Fri, 5 Jun 2015 12:53:43 +0100 Message-Id: <1433505231-28843-2-git-send-email-zoltan.kiss@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1433505231-28843-1-git-send-email-zoltan.kiss@linaro.org> References: <1433505231-28843-1-git-send-email-zoltan.kiss@linaro.org> X-Topics: patch Subject: [lng-odp] [API-NEXT PATCH v2 1/9] packet_io: clarify what happens when not all packets are sent 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: zoltan.kiss@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.217.180 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 Currently our examples are not handling this situation as well. Signed-off-by: Zoltan Kiss --- include/odp/api/packet_io.h | 4 +++- include/odp/api/queue.h | 7 +++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 89356a6..5a71e52 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -111,7 +111,9 @@ int odp_pktio_recv(odp_pktio_t pktio, odp_packet_t pkt_table[], int len); * @param pkt_table[] Array of packets to send * @param len length of pkt_table[] * - * @return Number of packets sent + * @return Number of packets sent. If it is less than 'len', the remaining + * packets at the end of pkt_table[] are not consumed, and caller has to take + * care of them. * @retval <0 on failure */ int odp_pktio_send(odp_pktio_t pktio, odp_packet_t pkt_table[], int len); diff --git a/include/odp/api/queue.h b/include/odp/api/queue.h index 6a8b15f..ac4147d 100644 --- a/include/odp/api/queue.h +++ b/include/odp/api/queue.h @@ -242,7 +242,8 @@ void *odp_queue_get_context(odp_queue_t queue); * @param ev Event handle * * @retval 0 on success - * @retval <0 on failure (e.g. queue full) + * @retval <0 on failure (e.g. queue full), the event is not consumed, caller + * has to take care of it. */ int odp_queue_enq(odp_queue_t queue, odp_event_t ev); @@ -253,7 +254,9 @@ int odp_queue_enq(odp_queue_t queue, odp_event_t ev); * @param[in] events Array of event handles * @param num Number of event handles to enqueue * - * @return Number of events actually enqueued (0 ... num) + * @return Number of events actually enqueued (0 ... num). If it is less than + * 'num', the remaining events at the end of events[] are not consumed, and + * caller has to take care of them. * @retval <0 on failure */ int odp_queue_enq_multi(odp_queue_t queue, const odp_event_t events[], int num);