From patchwork Wed Feb 4 21:07:27 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44389 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9A0FA21173 for ; Wed, 4 Feb 2015 21:08:16 +0000 (UTC) Received: by mail-we0-f200.google.com with SMTP id m14sf2877824wev.3 for ; Wed, 04 Feb 2015 13:08:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state: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=nbV2uFN1yxW19q3hkTot2NjmIFQItrT2rMh0zA9dcrw=; b=PY87vOUlObyobS7Mb+3VI8qE6PTO1dQKITwPVtYcDSnKDL0gF2vRmyfh6MPCw1IUYi PO9BucVUKAd4TsUD9hc8HQ70bshVNktNmhomFjCVTkeRFo8pLATWZeeBHvfLJIbAszIH IcdvOxBhkrFQeNAN78IWg8UL48APwN3Hlw7VH5LGENGQsaO501VOJOMOOfrBfmUvGTQv 05zr3myRqdnRG+hZyQyPk4/sEUSs+d+O2z3stF2Gztk456ha6iGhMvZ/CRYPjwPuZhTx ZsznYBZ51aruMJLkArXrcUXTGfWvfAq0Kl2MyqvVGeIuHobkhdiKVcLdt1hIypp4j9O7 WbiQ== X-Gm-Message-State: ALoCoQmM/z/6fNtRMXDW+m3Ayc6lTr4nBmPKKULhCGxGSIQmEFBUCXhGQF4JzgJ05DYu1gbNdX/F X-Received: by 10.152.121.65 with SMTP id li1mr42488lab.0.1423084095856; Wed, 04 Feb 2015 13:08:15 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.116.67 with SMTP id ju3ls72860lab.105.gmail; Wed, 04 Feb 2015 13:08:15 -0800 (PST) X-Received: by 10.152.9.2 with SMTP id v2mr231652laa.67.1423084095696; Wed, 04 Feb 2015 13:08:15 -0800 (PST) Received: from mail-la0-f53.google.com (mail-la0-f53.google.com. [209.85.215.53]) by mx.google.com with ESMTPS id mt5si2429532lbb.59.2015.02.04.13.08.15 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Feb 2015 13:08:15 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.53 as permitted sender) client-ip=209.85.215.53; Received: by mail-la0-f53.google.com with SMTP id gq15so3887405lab.12 for ; Wed, 04 Feb 2015 13:08:15 -0800 (PST) X-Received: by 10.152.2.41 with SMTP id 9mr249554lar.59.1423084095555; Wed, 04 Feb 2015 13:08:15 -0800 (PST) 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.35.133 with SMTP id h5csp743882lbj; Wed, 4 Feb 2015 13:08:14 -0800 (PST) X-Received: by 10.229.227.132 with SMTP id ja4mr773664qcb.1.1423084093965; Wed, 04 Feb 2015 13:08:13 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id 45si3349789qgf.98.2015.02.04.13.08.12 (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 04 Feb 2015 13:08:13 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJ7BD-0006sx-6U; Wed, 04 Feb 2015 21:08:11 +0000 Received: from mail-lb0-f173.google.com ([209.85.217.173]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YJ7Ap-0006od-V2 for lng-odp@lists.linaro.org; Wed, 04 Feb 2015 21:07:48 +0000 Received: by mail-lb0-f173.google.com with SMTP id p9so3784221lbv.4 for ; Wed, 04 Feb 2015 13:07:42 -0800 (PST) X-Received: by 10.112.151.10 with SMTP id um10mr206072lbb.87.1423084062411; Wed, 04 Feb 2015 13:07:42 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id r7sm567954lbs.37.2015.02.04.13.07.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 04 Feb 2015 13:07:41 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Wed, 4 Feb 2015 22:07:27 +0100 Message-Id: <1423084051-12962-6-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1423084051-12962-1-git-send-email-ola.liljedahl@linaro.org> References: <1423084051-12962-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv6 5/9] api: odp_packet_io.h: updated return descriptions X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 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-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ola.liljedahl@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.53 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 Signed-off-by: Ola Liljedahl --- (This document/code contribution attached is provided under the terms of agreement LES-LTM-21309) include/odp/api/packet_io.h | 55 ++++++++++++++++++++++++++++----------------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 9d18489..36be5b1 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -57,7 +57,8 @@ extern "C" { * @param pool Pool from which to allocate buffers for storing packets * received over this packet IO * - * @return ODP packet IO handle or ODP_PKTIO_INVALID on error + * @return ODP packet IO handle + * @retval ODP_PKTIO_INVALID on failure * * @note dev name loop is specially pktio reserved name for * device used for testing. Usually it's loop back @@ -70,7 +71,8 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t pool); * * @param id ODP packet IO handle * - * @return 0 on success or -1 on error + * @retval 0 on success + * @retval <0 on failure */ int odp_pktio_close(odp_pktio_t id); @@ -79,7 +81,8 @@ int odp_pktio_close(odp_pktio_t id); * * @param dev Packet IO device name * - * @return ODP packet IO handle or ODP_PKTIO_INVALID + * @return ODP packet IO handle + * @retval ODP_PKTIO_INVALID on failure */ odp_pktio_t odp_pktio_lookup(const char *dev); @@ -90,7 +93,8 @@ odp_pktio_t odp_pktio_lookup(const char *dev); * @param pkt_table[] Storage for received packets (filled by function) * @param len Length of pkt_table[], i.e. max number of pkts to receive * - * @return Number of packets received or -1 on error + * @return Number of packets received + * @retval <0 on failure */ int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len); @@ -101,16 +105,18 @@ int odp_pktio_recv(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len); * @param pkt_table[] Array of packets to send * @param len length of pkt_table[] * - * @return Number of packets sent or -1 on error + * @return Number of packets sent + * @retval <0 on failure */ int odp_pktio_send(odp_pktio_t id, odp_packet_t pkt_table[], unsigned len); /** * Set the default input queue to be associated with a pktio handle * - * @param id ODP packet IO handle + * @param id ODP packet IO handle * @param queue default input queue set - * @return 0 on success or -1 on error + * @retval 0 on success + * @retval <0 on failure */ int odp_pktio_inq_setdef(odp_pktio_t id, odp_queue_t queue); @@ -119,7 +125,8 @@ int odp_pktio_inq_setdef(odp_pktio_t id, odp_queue_t queue); * * @param id ODP packet IO handle * - * @return Default input queue set or ODP_QUEUE_INVALID on error + * @return Default input queue set + * @retval ODP_QUEUE_INVALID on failure */ odp_queue_t odp_pktio_inq_getdef(odp_pktio_t id); @@ -128,7 +135,8 @@ odp_queue_t odp_pktio_inq_getdef(odp_pktio_t id); * * @param id ODP packet IO handle * - * @return 0 on success or -1 on error + * @retval 0 on success + * @retval <0 on failure */ int odp_pktio_inq_remdef(odp_pktio_t id); @@ -137,7 +145,8 @@ int odp_pktio_inq_remdef(odp_pktio_t id); * * @param id ODP packet IO handle * - * @return Default out queue or ODP_QUEUE_INVALID on error + * @return Default out queue + * @retval ODP_QUEUE_INVALID on failure */ odp_queue_t odp_pktio_outq_getdef(odp_pktio_t id); @@ -146,8 +155,8 @@ odp_queue_t odp_pktio_outq_getdef(odp_pktio_t id); * * @param[in] id ODP packet IO handle. * - * @retval MTU value >0 on success. - * @retval -1 on any error or not existance pktio id. + * @return MTU value on success + * @retval <0 on failure */ int odp_pktio_mtu(odp_pktio_t id); @@ -157,8 +166,8 @@ int odp_pktio_mtu(odp_pktio_t id); * @param[in] id ODP packet IO handle. * @param[in] enable 1 to enable, 0 to disable. * - * @retval 0 on success. - * @retval non-zero on any error. + * @retval 0 on success + * @retval <0 on failure */ int odp_pktio_promisc_mode_set(odp_pktio_t id, odp_bool_t enable); @@ -169,7 +178,7 @@ int odp_pktio_promisc_mode_set(odp_pktio_t id, odp_bool_t enable); * * @retval 1 if promiscuous mode is enabled. * @retval 0 if promiscuous mode is disabled. - * @retval -1 on any error. + * @retval <0 on failure */ int odp_pktio_promisc_mode(odp_pktio_t id); @@ -194,7 +203,8 @@ ssize_t odp_pktio_mac_addr(odp_pktio_t id, void *mac_addr, ssize_t size); * unless overridden by subsequent * header-based filters. * - * @return 0 on success, non-zero on error. + * @retval 0 on success + * @retval <0 on failure */ int odp_pktio_default_cos_set(odp_pktio_t pktio_in, odp_cos_t default_cos); @@ -206,7 +216,8 @@ int odp_pktio_default_cos_set(odp_pktio_t pktio_in, odp_cos_t default_cos); * at the pktio_in ingress port * that contain an error. * - * @return 0 on success, non-zero on error. + * @retval 0 on success + * @retval <0 on failure * * @note Optional. */ @@ -218,7 +229,8 @@ int odp_pktio_error_cos_set(odp_pktio_t pktio_in, odp_cos_t error_cos); * @param[in] pktio_in Ingress port identifier. * @param[in] offset Number of bytes the classifier must skip. * - * @return 0 on success, non-zero on error. + * @retval 0 on success + * @retval <0 on failure * @note Optional. * */ @@ -233,7 +245,8 @@ int odp_pktio_skip_set(odp_pktio_t pktio_in, uint32_t offset); * Must not exceed the implementation * defined ODP_PACKET_MAX_HEADROOM. * - * @return 0 on success, non-zero on error. + * @retval 0 on success + * @retval <0 on failure * * @note Optional. */ @@ -242,7 +255,7 @@ int odp_pktio_headroom_set(odp_pktio_t pktio_in, uint32_t headroom); /** * Get printable value for an odp_pktio_t * - * @param hdl odp_pktio_t handle to be printed + * @param id odp_pktio_t handle to be printed * @return uint64_t value that can be used to print/display this * handle * @@ -250,7 +263,7 @@ int odp_pktio_headroom_set(odp_pktio_t pktio_in, uint32_t headroom); * to enable applications to generate a printable value that represents * an odp_pktio_t handle. */ -uint64_t odp_pktio_to_u64(odp_pktio_t hdl); +uint64_t odp_pktio_to_u64(odp_pktio_t id); /** * @}