From patchwork Thu Jan 29 10:40:00 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 43918 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9919F24119 for ; Thu, 29 Jan 2015 10:42:04 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf18102041lbv.1 for ; Thu, 29 Jan 2015 02:42:03 -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=Dmx6J1yj0qQL+tCJIzBMC+HbFZU1oeRyWwX+lMMnsF4=; b=Bou6ULHK6zff3P74/7IjlGieDLEI6n8be5WJJDSAxaOwgTlKoKFQwjmnkS8DZIqWln BZIN0OimWgstkOo+9XfOokGwz0uw3EYORCDc2uflV3NGK1RDN8Gf1w7TodBhnv3ZaEQO bm+LCySGRZk1QNj3YNRWtmJLloT9lAQSa9Jd8ngazfwzeKlgp2k8Qt5BYvd4p/PeG+5b OnsxeuImrsZw4fG2aw5CHYCU2/AQdjSIbhkKTEzoxM3ix4Lh/t/yUSE6c7zMjJvlYJPZ rZD9UmYoP3wZwZVJRLkdsqUITIPCQE1fG2zqCPGfRen+YOeSKG0kwIGHt1+w7+DupCTq 7Nww== X-Gm-Message-State: ALoCoQmG6P7xXPw1SIBCT56kfS0VvVQSxiXCsJTfjIpiIaVecAz2kuctmalM4QHA81aDKrADcTaf X-Received: by 10.112.140.65 with SMTP id re1mr1711302lbb.4.1422528123398; Thu, 29 Jan 2015 02:42:03 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.3.170 with SMTP id d10ls253020lad.37.gmail; Thu, 29 Jan 2015 02:42:03 -0800 (PST) X-Received: by 10.152.29.193 with SMTP id m1mr13417378lah.84.1422528123163; Thu, 29 Jan 2015 02:42:03 -0800 (PST) Received: from mail-lb0-f169.google.com (mail-lb0-f169.google.com. [209.85.217.169]) by mx.google.com with ESMTPS id ye3si6965093lab.107.2015.01.29.02.42.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Jan 2015 02:42:03 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.169 as permitted sender) client-ip=209.85.217.169; Received: by mail-lb0-f169.google.com with SMTP id f15so26599789lbj.0 for ; Thu, 29 Jan 2015 02:42:03 -0800 (PST) X-Received: by 10.152.203.230 with SMTP id kt6mr13170385lac.38.1422528123073; Thu, 29 Jan 2015 02:42:03 -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 h5csp1719733lbj; Thu, 29 Jan 2015 02:42:02 -0800 (PST) X-Received: by 10.140.92.138 with SMTP id b10mr36671qge.59.1422528121644; Thu, 29 Jan 2015 02:42:01 -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 t64si9677262qgt.111.2015.01.29.02.42.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 29 Jan 2015 02:42:01 -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 1YGmXu-0007VN-L8; Thu, 29 Jan 2015 10:41:58 +0000 Received: from mail-lb0-f178.google.com ([209.85.217.178]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YGmWO-0007Iz-Mq for lng-odp@lists.linaro.org; Thu, 29 Jan 2015 10:40:24 +0000 Received: by mail-lb0-f178.google.com with SMTP id u10so26550260lbd.9 for ; Thu, 29 Jan 2015 02:40:18 -0800 (PST) X-Received: by 10.152.37.234 with SMTP id b10mr13422419lak.94.1422528018485; Thu, 29 Jan 2015 02:40:18 -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.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 29 Jan 2015 02:40:17 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Thu, 29 Jan 2015 11:40:00 +0100 Message-Id: <1422528008-29845-9-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 08/16] api: odp_packet.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.169 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.h | 68 ++++++++++++++----------- 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/platform/linux-generic/include/api/odp_packet.h b/platform/linux-generic/include/api/odp_packet.h index eca5b73..30566d1 100644 --- a/platform/linux-generic/include/api/odp_packet.h +++ b/platform/linux-generic/include/api/odp_packet.h @@ -88,8 +88,8 @@ void odp_packet_free(odp_packet_t pkt); * @param pkt Packet handle * @param len Packet data length * - * @retval 0 Success - * @retval Non-zero Failure + * @retval 0 on success + * @retval <0 on failure * * @see odp_packet_buf_len() */ @@ -282,7 +282,7 @@ void *odp_packet_push_head(odp_packet_t pkt, uint32_t len); * @param pkt Packet handle * @param len Number of bytes to pull the head (0 ... seg_len - 1) * - * @return The new data pointer, or NULL in case of an error. + * @return The new data pointer * @retval NULL Requested offset exceeds packet segment length * * @see odp_packet_seg_len(), odp_packet_push_head() @@ -394,7 +394,7 @@ odp_pool_t odp_packet_pool(odp_packet_t pkt); * @param pkt Packet handle * * @return Packet interface handle - * @retval ODP_PKTIO_INVALID Packet was not received + * @retval ODP_PKTIO_INVALID Packet was not received on any interface */ odp_pktio_t odp_packet_input(odp_packet_t pkt); @@ -454,8 +454,8 @@ void odp_packet_user_u64_set(odp_packet_t pkt, uint64_t ctx); * @param[out] len Number of data bytes remaining in the segment (output). * Ignored when NULL. * - * @return Layer 2 start pointer, or NULL when packet does not contain a valid - * L2 header. + * @return Layer 2 start pointer + * @retval NULL packet does not contain a valid L2 header * * @see odp_packet_l2_offset(), odp_packet_l2_offset_set(), odp_packet_has_l2() */ @@ -472,8 +472,8 @@ void *odp_packet_l2_ptr(odp_packet_t pkt, uint32_t *len); * * @param pkt Packet handle * - * @return Layer 2 start offset, or ODP_PACKET_OFFSET_INVALID when packet does - * not contain a valid L2 header. + * @return Layer 2 start offset + * @retval ODP_PACKET_OFFSET_INVALID packet does not contain a valid L2 header * * @see odp_packet_l2_offset_set(), odp_packet_has_l2() */ @@ -489,8 +489,8 @@ uint32_t odp_packet_l2_offset(odp_packet_t pkt); * @param pkt Packet handle * @param offset Layer 2 start offset (0 ... odp_packet_len()-1) * - * @retval 0 Success - * @retval Non-zero Failure + * @retval 0 on success + * @retval <0 on failure */ int odp_packet_l2_offset_set(odp_packet_t pkt, uint32_t offset); @@ -504,8 +504,8 @@ int odp_packet_l2_offset_set(odp_packet_t pkt, uint32_t offset); * @param[out] len Number of data bytes remaining in the segment (output). * Ignored when NULL. * - * @return Layer 3 start pointer, or NULL when packet does not contain a valid - * L3 header. + * @return Layer 3 start pointer + * @retval NULL packet does not contain a valid L3 header * * @see odp_packet_l3_offset(), odp_packet_l3_offset_set(), odp_packet_has_l3() */ @@ -539,8 +539,8 @@ uint32_t odp_packet_l3_offset(odp_packet_t pkt); * @param pkt Packet handle * @param offset Layer 3 start offset (0 ... odp_packet_len()-1) * - * @retval 0 Success - * @retval Non-zero Failure + * @retval 0 on success + * @retval <0 on failure */ int odp_packet_l3_offset_set(odp_packet_t pkt, uint32_t offset); @@ -554,8 +554,8 @@ int odp_packet_l3_offset_set(odp_packet_t pkt, uint32_t offset); * @param[out] len Number of data bytes remaining in the segment (output). * Ignored when NULL. * - * @return Layer 4 start pointer, or NULL when packet does not contain a valid - * L4 header. + * @return Layer 4 start pointer + * @retval NULL packet does not contain a valid L4 header * * @see odp_packet_l4_offset(), odp_packet_l4_offset_set(), odp_packet_has_l4() */ @@ -572,8 +572,8 @@ void *odp_packet_l4_ptr(odp_packet_t pkt, uint32_t *len); * * @param pkt Packet handle * - * @return Layer 4 start offset, or ODP_PACKET_OFFSET_INVALID when packet does - * not contain a valid L4 header. + * @return Layer 4 start offset + * @retval ODP_PACKET_OFFSET_INVALID packet does not contain a valid L4 header * * @see odp_packet_l4_offset_set(), odp_packet_has_l4() */ @@ -589,8 +589,8 @@ uint32_t odp_packet_l4_offset(odp_packet_t pkt); * @param pkt Packet handle * @param offset Layer 4 start offset (0 ... odp_packet_len()-1) * - * @retval 0 Success - * @retval Non-zero Failure + * @retval 0 on success + * @retval <0 on failure */ int odp_packet_l4_offset_set(odp_packet_t pkt, uint32_t offset); @@ -648,7 +648,8 @@ odp_packet_seg_t odp_packet_last_seg(odp_packet_t pkt); * @param pkt Packet handle * @param seg Current segment handle * - * @return Handle to the next segment, or ODP_PACKET_SEG_INVALID + * @return Handle to the next segment + * @retval ODP_PACKET_SEG_INVALID if there are no more segments */ odp_packet_seg_t odp_packet_next_seg(odp_packet_t pkt, odp_packet_seg_t seg); @@ -668,7 +669,8 @@ odp_packet_seg_t odp_packet_next_seg(odp_packet_t pkt, odp_packet_seg_t seg); * @param pkt Packet handle * @param seg Segment handle * - * @return Start address of the segment, or NULL on an error + * @return Start address of the segment + * @retval NULL on failure * * @see odp_packet_seg_buf_len() */ @@ -696,7 +698,8 @@ uint32_t odp_packet_seg_buf_len(odp_packet_t pkt, odp_packet_seg_t seg); * @param pkt Packet handle * @param seg Segment handle * - * @return Pointer to the segment data, or NULL on an error + * @return Pointer to the segment data + * @retval NULL on failure * * @see odp_packet_seg_data_len() */ @@ -738,7 +741,8 @@ uint32_t odp_packet_seg_data_len(odp_packet_t pkt, odp_packet_seg_t seg); * @param offset Byte offset into the packet * @param len Number of bytes to add into the offset * - * @return New packet handle, or ODP_PACKET_INVALID in case of an error. + * @return New packet handle + * @retval ODP_PACKET_INVALID on failure */ odp_packet_t odp_packet_add_data(odp_packet_t pkt, uint32_t offset, uint32_t len); @@ -756,7 +760,8 @@ odp_packet_t odp_packet_add_data(odp_packet_t pkt, uint32_t offset, * @param offset Byte offset into the packet * @param len Number of bytes to remove from the offset * - * @return New packet handle, or ODP_PACKET_INVALID in case of an error. + * @return New packet handle + * @retval ODP_PACKET_INVALID on failure */ odp_packet_t odp_packet_rem_data(odp_packet_t pkt, uint32_t offset, uint32_t len); @@ -779,14 +784,15 @@ odp_packet_t odp_packet_rem_data(odp_packet_t pkt, uint32_t offset, * @param pkt Packet handle * @param pool Buffer pool for allocation of the new packet. * - * @return Handle to the copy of the packet, or ODP_PACKET_INVALID + * @return Handle to the copy of the packet + * @retval ODP_PACKET_INVALID on failure */ odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_pool_t pool); /** * Copy data from packet * - * Copy 'len' bytes of data from the packet level offset to the destination + * Copy 'len' bytes of data from the packet level offset to the destination * address. * * @param pkt Packet handle @@ -794,8 +800,8 @@ odp_packet_t odp_packet_copy(odp_packet_t pkt, odp_pool_t pool); * @param len Number of bytes to copy * @param dst Destination address * - * @retval 0 Success - * @retval Non-zero Failure + * @retval 0 on success + * @retval <0 on failure */ int odp_packet_copydata_out(odp_packet_t pkt, uint32_t offset, uint32_t len, void *dst); @@ -812,8 +818,8 @@ int odp_packet_copydata_out(odp_packet_t pkt, uint32_t offset, * @param len Number of bytes to copy * @param src Source address * - * @retval 0 Success - * @retval Non-zero Failure + * @retval 0 on success + * @retval <0 on failure */ int odp_packet_copydata_in(odp_packet_t pkt, uint32_t offset, uint32_t len, const void *src);