From patchwork Thu Jan 29 10:40:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 43911 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 1C36024119 for ; Thu, 29 Jan 2015 10:41:36 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id u10sf18118011lbd.3 for ; Thu, 29 Jan 2015 02:41:35 -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=9fB8az8I+BLtc+HwHSsJRiRLo+7QFRMOxPZ7VxQ/qb8=; b=ZL0Wg6vV1zsN9hF09N3LMmsJrfnCAs4qvfRwpz0hcZqQphS92JynMMIj3JogmLBF78 zwdSN/O8AJpSrKRAgL1+2/W514WnYzvAMJWJZb5UbXnzE1t7ldwke6umRpQdEx9oHb6y HIdlLxU8qGyI4KfnD5QZH3zK/R1N+I8CSDCAcriQqtAvhlrhW8H9Z1WgCoALo+2xvE8p 11Qx3tXSbPbyQ5LwdXaBwAKGCXH4R4Uswz6c0MeYTwnK0bH2LFNsx58uua7eXAvrTm5P /3+l8Cuu3pti//CBb4qbLmzddJmlKhbKDJkQ0zQ06lD/1CjbqTz/55mC+C7DExnb2Myx WK6w== X-Gm-Message-State: ALoCoQmgJTVG5lDYghe5Ao5H5+mAIPEYCc4urLPh+F+BWd2JWBkGkEKNwIn25ejmbt7QWVq/PmXZ X-Received: by 10.112.143.167 with SMTP id sf7mr1638550lbb.0.1422528095077; Thu, 29 Jan 2015 02:41:35 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.42 with SMTP id g10ls285302laa.51.gmail; Thu, 29 Jan 2015 02:41:34 -0800 (PST) X-Received: by 10.152.4.200 with SMTP id m8mr35319lam.2.1422528094940; Thu, 29 Jan 2015 02:41:34 -0800 (PST) Received: from mail-lb0-f177.google.com (mail-lb0-f177.google.com. [209.85.217.177]) by mx.google.com with ESMTPS id y4si6979948lag.90.2015.01.29.02.41.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 02:41:34 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.177 as permitted sender) client-ip=209.85.217.177; Received: by mail-lb0-f177.google.com with SMTP id p9so26562232lbv.8 for ; Thu, 29 Jan 2015 02:41:34 -0800 (PST) X-Received: by 10.112.131.1 with SMTP id oi1mr13294114lbb.2.1422528094796; Thu, 29 Jan 2015 02:41:34 -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 h5csp1719616lbj; Thu, 29 Jan 2015 02:41:33 -0800 (PST) X-Received: by 10.224.75.196 with SMTP id z4mr1541qaj.50.1422528093358; Thu, 29 Jan 2015 02:41:33 -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 c30si9677497qgf.105.2015.01.29.02.41.30 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 02:41:33 -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 1YGmXQ-0007Qt-93; Thu, 29 Jan 2015 10:41:28 +0000 Received: from mail-lb0-f182.google.com ([209.85.217.182]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YGmWQ-0007J9-OT for lng-odp@lists.linaro.org; Thu, 29 Jan 2015 10:40:26 +0000 Received: by mail-lb0-f182.google.com with SMTP id l4so26515473lbv.13 for ; Thu, 29 Jan 2015 02:40:20 -0800 (PST) X-Received: by 10.112.204.233 with SMTP id lb9mr13476232lbc.43.1422528020844; Thu, 29 Jan 2015 02:40:20 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id y11sm2037670lba.5.2015.01.29.02.40.19 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 02:40:19 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 29 Jan 2015 11:40:02 +0100 Message-Id: <1422528008-29845-11-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422528008-29845-1-git-send-email-ola.liljedahl@linaro.org> References: <1422528008-29845-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 10/16] 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.217.177 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) platform/linux-generic/include/api/odp_packet_io.h | 91 ++++++++++++---------- 1 file changed, 52 insertions(+), 39 deletions(-) diff --git a/platform/linux-generic/include/api/odp_packet_io.h b/platform/linux-generic/include/api/odp_packet_io.h index 019cffe..08d3a99 100644 --- a/platform/linux-generic/include/api/odp_packet_io.h +++ b/platform/linux-generic/include/api/odp_packet_io.h @@ -40,7 +40,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 @@ -51,113 +52,121 @@ 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 default MAC address of a packet IO interface. + * Get the native MAC address of packet IO interface. * * @param hdl ODP packet IO handle * @param[out] buf Output buffer @@ -178,7 +187,8 @@ int odp_pktio_mac_addr(odp_pktio_t hdl, void *buf, size_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); @@ -190,7 +200,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. */ @@ -202,7 +213,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. * */ @@ -217,7 +229,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. */