From patchwork Thu Sep 14 17:00:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Github ODP bot X-Patchwork-Id: 112581 Delivered-To: patch@linaro.org Received: by 10.140.106.117 with SMTP id d108csp988620qgf; Thu, 14 Sep 2017 10:01:00 -0700 (PDT) X-Google-Smtp-Source: AOwi7QCDLF6fvb01bUlzY9N5fd9JC14uLGI9bGed2qSwuzV992fduuJCbcl0AKlZ9/DDnmOtsNqq X-Received: by 10.237.36.61 with SMTP id r58mr4115174qtc.10.1505408460824; Thu, 14 Sep 2017 10:01:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1505408460; cv=none; d=google.com; s=arc-20160816; b=yCAstJh9zDgbhnzfHnsOtVbi/8jyo1QYfGLH2Z7mlOaw6Ra7M7R7JmK9WZH985YNbw kaGFL7K7PRo1QkSZv8LodVqTAUbXyaxlrkDpRwSm0fu4YvIp5aiRAEOWsrFyuFDZJm/l lSbm5pd99kashWpXZtJI1f7diXe0gM1YBwQZRi5Z5CEpBVPxoHaMKbwh8lmHfkzdTqOT 7E0pDv28azuQ2ZiCFl0pAD1gR/5jt+1Ge5CH0kaRuadca9kTEWo0n77Jmx9D4CypaIqk PDfcjrsHUaAVIyGnUby2hcIDy6HzY50wIJSnY5XH/H111nlcEBRXKubVwVFoKroMIt1i OBfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:github-pr-num :references:in-reply-to:message-id:date:to:from:delivered-to :arc-authentication-results; bh=1rn6MjZWCjw2t+yeNZxt1Mn7uV69meBcdXMLBC365cs=; b=FdAMn5t8/V5+yrFdbwv61IDzIjDxjvnYBjN376FpU6fzc30v2Xy3LTQYJpNQ1E9h3q POrZDiYAC6o2s5Fs6R2d3LO/2UftYDKYpMZfDWDKWhd3rhFecui/aVBYieM/Q+4zLMD1 Ap7ioPgZyr2VR4FvZS9tiM7AQF3H43Sv61Nm0zVShWShkSiIYCDPXYOE2UbECXV62VzH amcQDZ8t5QpuYW8LDLV9l9o/LdE15qjRaITxhduFH6zmLt3M0topTveMUZdkMxViNnSD cXBjpwXpjKGcbrrULe/LyDEUt51Ab+cMRKqmsHkPSy7rn1WW49JBidAiSGDf59f6SZjN j9Zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id j10si1606911qtf.453.2017.09.14.10.00.55; Thu, 14 Sep 2017 10:01:00 -0700 (PDT) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=yandex.ru Received: by lists.linaro.org (Postfix, from userid 109) id 9EDAB608B7; Thu, 14 Sep 2017 17:00:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 8AC20608FF; Thu, 14 Sep 2017 17:00:28 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 4A27D608A9; Thu, 14 Sep 2017 17:00:18 +0000 (UTC) Received: from forward101o.mail.yandex.net (forward101o.mail.yandex.net [37.140.190.181]) by lists.linaro.org (Postfix) with ESMTPS id B807460889 for ; Thu, 14 Sep 2017 17:00:15 +0000 (UTC) Received: from mxback2g.mail.yandex.net (mxback2g.mail.yandex.net [IPv6:2a02:6b8:0:1472:2741:0:8b7:163]) by forward101o.mail.yandex.net (Yandex) with ESMTP id 2F96C1344632 for ; Thu, 14 Sep 2017 20:00:14 +0300 (MSK) Received: from smtp3o.mail.yandex.net (smtp3o.mail.yandex.net [2a02:6b8:0:1a2d::27]) by mxback2g.mail.yandex.net (nwsmtp/Yandex) with ESMTP id f6lxbd4e8W-0EViBkHr; Thu, 14 Sep 2017 20:00:14 +0300 Received: by smtp3o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id lQcft5r9rA-0D7K0Pea; Thu, 14 Sep 2017 20:00:13 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (Client certificate not present) From: Github ODP bot To: lng-odp@lists.linaro.org Date: Thu, 14 Sep 2017 20:00:07 +0300 Message-Id: <1505408407-10870-2-git-send-email-odpbot@yandex.ru> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505408407-10870-1-git-send-email-odpbot@yandex.ru> References: <1505408407-10870-1-git-send-email-odpbot@yandex.ru> Github-pr-num: 178 Subject: [lng-odp] [PATCH v1 1/1] doc: helper: add missing doxygen to avoid warnings X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" From: Bill Fischofer The latest version of Doxygen requires every struct and field to be documented, so add missing documentation to helper files to avoid superfluous warnings. This resolves Bug https://bugs.linaro.org/show_bug.cgi?id=3238 Signed-off-by: Bill Fischofer --- /** Email created from pull request 178 (Bill-Fischofer-Linaro:bug3238-fix) ** https://github.com/Linaro/odp/pull/178 ** Patch: https://github.com/Linaro/odp/pull/178.patch ** Base sha: 91ef9f7e224056af351cbaf99ccfa98ee815460d ** Merge commit sha: 5bf89ca7d8c59d95fe607e81889a5042c9a83193 **/ helper/include/odp/helper/ip.h | 11 +++++++++++ helper/include/odph_list_internal.h | 22 ++++++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h index fb7e5ddce..c6eb9d767 100644 --- a/helper/include/odp/helper/ip.h +++ b/helper/include/odp/helper/ip.h @@ -95,6 +95,17 @@ typedef struct ODP_PACKED { ODP_STATIC_ASSERT(sizeof(odph_ipv4hdr_t) == ODPH_IPV4HDR_LEN, "ODPH_IPV4HDR_T__SIZE_ERROR"); +/** + * Calculate IPv4 header checksum + * + * @param pkt The packet to be checksummed + * @param offset Offset into pkt of start of IP header + * @param ip Pointer to IPv4 header to be checksummed + * @param[out] chksum Field to receive checksum results + * + * @retval 0 On success + * @retval <0 On failure + */ static inline int odph_ipv4_csum(odp_packet_t pkt, uint32_t offset, odph_ipv4hdr_t *ip, diff --git a/helper/include/odph_list_internal.h b/helper/include/odph_list_internal.h index 9e532b088..f870ee30a 100644 --- a/helper/include/odph_list_internal.h +++ b/helper/include/odph_list_internal.h @@ -18,18 +18,30 @@ extern "C" { #endif +/** List object */ typedef struct odph_list_object { - struct odph_list_object *next, *prev; + /** Next element in list */ + struct odph_list_object *next; + + /** Previous element in list */ + struct odph_list_object *prev; } odph_list_object; +/** Head of list */ typedef odph_list_object odph_list_head; +/** + * @internal Intiailize list head element + * + * @param list List object to be initialized + */ static inline void ODPH_INIT_LIST_HEAD(odph_list_object *list) { list->next = list; list->prev = list; } +/** @internal Inline function @param new @param prev @param next */ static inline void __odph_list_add(odph_list_object *new, odph_list_object *prev, odph_list_object *next) @@ -40,17 +52,20 @@ static inline void __odph_list_add(odph_list_object *new, prev->next = new; } +/** @internal Inline function @param new @param head */ static inline void odph_list_add(odph_list_object *new, odph_list_object *head) { __odph_list_add(new, head, head->next); } +/** @internal Inline function @param new @param head */ static inline void odph_list_add_tail(struct odph_list_object *new, odph_list_object *head) { __odph_list_add(new, head->prev, head); } +/** @internal Inline function @param prev @param next */ static inline void __odph_list_del(struct odph_list_object *prev, odph_list_object *next) { @@ -58,20 +73,24 @@ static inline void __odph_list_del(struct odph_list_object *prev, prev->next = next; } +/** @internal Inline function @param entry */ static inline void odph_list_del(struct odph_list_object *entry) { __odph_list_del(entry->prev, entry->next); ODPH_INIT_LIST_HEAD(entry); } +/** @internal Inline function @param head @return */ static inline int odph_list_empty(const struct odph_list_object *head) { return head->next == head; } +/** @internal */ #define container_of(ptr, type, list_node) \ ((type *)(void *)((char *)ptr - offsetof(type, list_node))) +/** @internal */ #define ODPH_LIST_FOR_EACH(pos, list_head, type, list_node) \ for (pos = container_of((list_head)->next, type, list_node); \ &pos->list_node != (list_head); \ @@ -82,4 +101,3 @@ static inline int odph_list_empty(const struct odph_list_object *head) #endif #endif -