From patchwork Fri Jan 30 09:28:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ola Liljedahl X-Patchwork-Id: 44026 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7F6A52410D for ; Fri, 30 Jan 2015 09:30:07 +0000 (UTC) Received: by mail-lb0-f197.google.com with SMTP id b6sf28846430lbj.0 for ; Fri, 30 Jan 2015 01:30:02 -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=K2/6npeLVpd6VOdcujgAQZ7q4iL/cToJDm7hvjHSQPFnvQIwpoxaFZitHl7N2DmsOy 6QWT0YEvVkq+Rg4y2qS4d8vqsrGMumZhw12Hc318BH33l3RJ4iFpicxGEMv+W5FfvbzG l7EKZf7fgvJyfKmVuKbjhxlA9LEQu5GLXkvvMnNGhU9OqE8T1UbTsRquqilX3W16BydV vsOwQdlrjOj4jbJcEvYCXgHTUW700Xgnz6mVKyDgrLoNijnukG1iRaZJhx5OddCfRyqR d0uVBCm38+D+ml6Msfomgwa7v+rL/wfu5OzdUx2pO8e1/JvmT2SyYt18G2upRgtubdkg xUaQ== X-Gm-Message-State: ALoCoQn5nmXd3VPPEtFeqHhwi5bCChRZTdDoVU/7YFvRuaAb+6+zrLsAEuLfCbkLNKyJrnT3O9w4 X-Received: by 10.112.162.35 with SMTP id xx3mr685096lbb.16.1422610201983; Fri, 30 Jan 2015 01:30:01 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.5.199 with SMTP id u7ls398074lau.63.gmail; Fri, 30 Jan 2015 01:30:01 -0800 (PST) X-Received: by 10.152.27.69 with SMTP id r5mr5465996lag.18.1422610201772; Fri, 30 Jan 2015 01:30:01 -0800 (PST) Received: from mail-lb0-f180.google.com (mail-lb0-f180.google.com. [209.85.217.180]) by mx.google.com with ESMTPS id uo8si9677824lbb.96.2015.01.30.01.30.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 30 Jan 2015 01:30:01 -0800 (PST) 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 mail-lb0-f180.google.com with SMTP id b6so35364189lbj.11 for ; Fri, 30 Jan 2015 01:30:01 -0800 (PST) X-Received: by 10.112.164.101 with SMTP id yp5mr5449622lbb.82.1422610201653; Fri, 30 Jan 2015 01:30:01 -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 h5csp220723lbj; Fri, 30 Jan 2015 01:30:00 -0800 (PST) X-Received: by 10.224.80.202 with SMTP id u10mr9837031qak.57.1422610200109; Fri, 30 Jan 2015 01:30:00 -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 w103si13549580qgd.53.2015.01.30.01.29.59 (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 30 Jan 2015 01:30:00 -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 1YH7tl-0004Ia-FC; Fri, 30 Jan 2015 09:29:57 +0000 Received: from mail-la0-f53.google.com ([209.85.215.53]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YH7t1-0004At-I8 for lng-odp@lists.linaro.org; Fri, 30 Jan 2015 09:29:11 +0000 Received: by mail-la0-f53.google.com with SMTP id gq15so22654984lab.12 for ; Fri, 30 Jan 2015 01:29:06 -0800 (PST) X-Received: by 10.112.150.98 with SMTP id uh2mr5533780lbb.92.1422610146018; Fri, 30 Jan 2015 01:29:06 -0800 (PST) Received: from macmini.lan (78-82-118-111.tn.glocalnet.net. [78.82.118.111]) by mx.google.com with ESMTPSA id p5sm2614383laj.0.2015.01.30.01.29.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Jan 2015 01:29:05 -0800 (PST) From: Ola Liljedahl To: lng-odp@lists.linaro.org Date: Fri, 30 Jan 2015 10:28:52 +0100 Message-Id: <1422610133-20756-9-git-send-email-ola.liljedahl@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422610133-20756-1-git-send-email-ola.liljedahl@linaro.org> References: <1422610133-20756-1-git-send-email-ola.liljedahl@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 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.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 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);