From patchwork Tue Feb 3 14:53:14 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44239 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 406962034D for ; Tue, 3 Feb 2015 14:54:57 +0000 (UTC) Received: by mail-wi0-f199.google.com with SMTP id r20sf26031450wiv.2 for ; Tue, 03 Feb 2015 06:54:56 -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=LGLjdSqfF/QSIBCg/VbyUVCdvqTRC5pwK1e3xQJM+QU=; b=LovHtrBvtftlXVPOwVRE+yUAMIsLbz5xJlRAahwM/cV5xvO2oQ9wGrw0RhdmMmzc+3 +xwvovVHahnKqaTd+nBQWDw83FBfOjVG0q19xIXwK5BOi0hRflF8Fyf8dlqG8r1eMafU Jp9sENbLGFZZ+PPqaYZDgnm2JQT/jPwCJA4/0oXYSV50BFnzKHfMgigXbfO32eI+ou/R wivbWs3IusF17nOp9XyFByMm0EQROAk55vjWEt8ddKSm0PKPA57VPH873NAJ7XEXQ781 lpMhiUviKvP6mYLeykiGlQr2bWqEbTuY1NoC2Fj0zn18z3kR/ExlFNDfXascNvjmO7hb Msqw== X-Gm-Message-State: ALoCoQke1vw+Qj6nv1yfP3b/ROsKoL5+PFo3erSXEiQ+e88HFSAP6u95cWiojlq1H9W4a9OIa1O8 X-Received: by 10.152.37.130 with SMTP id y2mr3164545laj.8.1422975296536; Tue, 03 Feb 2015 06:54:56 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.230 with SMTP id jr6ls772617lab.69.gmail; Tue, 03 Feb 2015 06:54:56 -0800 (PST) X-Received: by 10.112.167.68 with SMTP id zm4mr24901068lbb.93.1422975296300; Tue, 03 Feb 2015 06:54:56 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id ur5si14280085lac.57.2015.02.03.06.54.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 03 Feb 2015 06:54:55 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id gf13so52334716lab.8 for ; Tue, 03 Feb 2015 06:54:55 -0800 (PST) X-Received: by 10.152.245.44 with SMTP id xl12mr24733181lac.81.1422975295729; Tue, 03 Feb 2015 06:54:55 -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 h5csp1988245lbj; Tue, 3 Feb 2015 06:54:54 -0800 (PST) X-Received: by 10.140.97.38 with SMTP id l35mr13335286qge.47.1422975293997; Tue, 03 Feb 2015 06:54:53 -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 r2si28305946qcq.9.2015.02.03.06.54.52 (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 03 Feb 2015 06:54:53 -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 1YIesM-0001jP-Hw; Tue, 03 Feb 2015 14:54:50 +0000 Received: from mail-la0-f47.google.com ([209.85.215.47]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YIerI-0001YQ-3R for lng-odp@lists.linaro.org; Tue, 03 Feb 2015 14:53:44 +0000 Received: by mail-la0-f47.google.com with SMTP id hz20so52411852lab.6 for ; Tue, 03 Feb 2015 06:53:38 -0800 (PST) X-Received: by 10.112.235.194 with SMTP id uo2mr24488593lbc.57.1422975218613; Tue, 03 Feb 2015 06:53:38 -0800 (PST) Received: from localhost.localdomain (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id jf3sm5082572lbc.44.2015.02.03.06.53.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 03 Feb 2015 06:53:37 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Tue, 3 Feb 2015 15:53:14 +0100 Message-Id: <1422975201-3364-12-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422975201-3364-1-git-send-email-ola.liljedahl@linaro.org> References: <1422975201-3364-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv4 11/18] 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.49 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 Updated doxygen descriptions, particularly the @return/@retval descriptions. No change of implementation necessary. 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 | 89 ++++++++++++++++++++++++++------------------- 1 file changed, 51 insertions(+), 38 deletions(-) diff --git a/include/odp/api/packet_io.h b/include/odp/api/packet_io.h index 096198c..3bde888 100644 --- a/include/odp/api/packet_io.h +++ b/include/odp/api/packet_io.h @@ -56,7 +56,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 @@ -67,110 +68,118 @@ odp_pktio_t odp_pktio_open(const char *dev, odp_pool_t pool); /** * Close an ODP packet IO instance * - * @param id ODP packet IO handle + * @param hdl 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); +int odp_pktio_close(odp_pktio_t hdl); /** * Return a packet IO handle for an already open device * * @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); /** * Receive packets * - * @param id ODP packet IO handle + * @param hdl ODP packet IO handle * @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); +int odp_pktio_recv(odp_pktio_t hdl, odp_packet_t pkt_table[], unsigned len); /** * Send packets * - * @param id ODP packet IO handle + * @param hdl ODP packet IO handle * @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); +int odp_pktio_send(odp_pktio_t hdl, 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 hdl 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); +int odp_pktio_inq_setdef(odp_pktio_t hdl, odp_queue_t queue); /** * Get default input queue associated with a pktio handle * - * @param id ODP packet IO handle + * @param hdl 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); +odp_queue_t odp_pktio_inq_getdef(odp_pktio_t hdl); /** * Remove default input queue (if set) * - * @param id ODP packet IO handle + * @param hdl 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); +int odp_pktio_inq_remdef(odp_pktio_t hdl); /** * Query default output queue * - * @param id ODP packet IO handle + * @param hdl 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); +odp_queue_t odp_pktio_outq_getdef(odp_pktio_t hdl); /** * Return the currently configured MTU value of a packet IO interface. * - * @param[in] id ODP packet IO handle. + * @param[in] hdl 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); +int odp_pktio_mtu(odp_pktio_t hdl); /** * Enable/Disable promiscuous mode on a packet IO interface. * - * @param[in] id ODP packet IO handle. + * @param[in] hdl 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); +int odp_pktio_promisc_mode_set(odp_pktio_t hdl, odp_bool_t enable); /** * Determine if promiscuous mode is enabled for a packet IO interface. * - * @param[in] id ODP packet IO handle. + * @param[in] hdl ODP packet IO handle. * * @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); +int odp_pktio_promisc_mode(odp_pktio_t hdl); /** * Get the native MAC address of a packet IO interface. @@ -193,7 +202,8 @@ ssize_t odp_pktio_mac_addr(odp_pktio_t hdl, void *buf, ssize_t bufsz); * 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); @@ -205,7 +215,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. */ @@ -217,7 +228,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. * */ @@ -232,7 +244,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. */