From patchwork Wed Apr 19 22:34:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Fischofer X-Patchwork-Id: 97695 Delivered-To: patch@linaro.org Received: by 10.140.109.52 with SMTP id k49csp530804qgf; Wed, 19 Apr 2017 15:35:13 -0700 (PDT) X-Received: by 10.55.170.209 with SMTP id t200mr5316447qke.176.1492641313515; Wed, 19 Apr 2017 15:35:13 -0700 (PDT) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id t1si3839213qkl.333.2017.04.19.15.35.13; Wed, 19 Apr 2017 15:35:13 -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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 55F1F60A02; Wed, 19 Apr 2017 22:35:06 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 439DA62E41; Wed, 19 Apr 2017 22:35:04 +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 7B52B62E62; Wed, 19 Apr 2017 22:34:55 +0000 (UTC) Received: from mail-yw0-f175.google.com (mail-yw0-f175.google.com [209.85.161.175]) by lists.linaro.org (Postfix) with ESMTPS id DE9A262E30 for ; Wed, 19 Apr 2017 22:34:52 +0000 (UTC) Received: by mail-yw0-f175.google.com with SMTP id k13so26992984ywk.1 for ; Wed, 19 Apr 2017 15:34:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rUIp/IzcJeuupg0/jIKtv0gvWmPU7Y1E7iVih8AIq3k=; b=VLJC4t8CsAoai2R4byCW4//tGMJ9euDhSa40DlCUoZOHWq2phoLI7nmtzNV91N+DZQ i/dQxGm30rwUlbu2HFCeRZIfq4yM/Z/bbXNER8xsqFfiVPKyxMmAm+XvUcPi1aoL5QIz Z64jy4wRt3rKce/eLtcWSfI6QN6y2MNT5sLEanHkLxuu2V/vMTQBy881wESG4NQgSs4b mjNE3y3WlaQOMNT2B06zXz7Gzg+m/HUk+MvNFBnK1ed9DXu7ShRARo0LZuD0tSVGK4YU Rj4wG62pxCDpPfNvABDsp3UaCyoL8v00bRViTGqGYDab+4NALS8/+B1z4Ljv4p/0+B5l 3xUg== X-Gm-Message-State: AN3rC/6Q4SyDPLt6Fken3Uf9Ft9BdBMxueTKn4bIzVIWEjnrdvgtriOs n7nl/uT8tKy5m4dYAfA= X-Received: by 10.157.39.41 with SMTP id r38mr2862222ota.11.1492641292193; Wed, 19 Apr 2017 15:34:52 -0700 (PDT) Received: from localhost.localdomain (cpe-70-121-83-241.austin.res.rr.com. [70.121.83.241]) by smtp.gmail.com with ESMTPSA id w201sm37138oiw.13.2017.04.19.15.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Apr 2017 15:34:51 -0700 (PDT) From: Bill Fischofer To: lng-odp@lists.linaro.org Date: Wed, 19 Apr 2017 17:34:45 -0500 Message-Id: <1492641285-7020-6-git-send-email-bill.fischofer@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492641285-7020-1-git-send-email-bill.fischofer@linaro.org> References: <1492641285-7020-1-git-send-email-bill.fischofer@linaro.org> Subject: [lng-odp] [API-NEXT PATCHv2 6/6] helper: add additional doxygen documentation 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" Resolve Bug https://bugs.linaro.org/show_bug.cgi?id=2952 by adding additional field documentation to avoid problems with doxygen 1.8.13 and higher. Signed-off-by: Bill Fischofer --- helper/include/odp/helper/icmp.h | 11 ++++++---- helper/include/odp/helper/ip.h | 2 +- helper/include/odp/helper/strong_types.h | 3 ++- helper/include/odp/helper/table.h | 2 +- helper/include/odp/helper/tcp.h | 35 ++++++++++++++++---------------- helper/include/odp/helper/threads.h | 7 +++++-- 6 files changed, 34 insertions(+), 26 deletions(-) -- 2.11.0 diff --git a/helper/include/odp/helper/icmp.h b/helper/include/odp/helper/icmp.h index e25646ad..bef96784 100644 --- a/helper/include/odp/helper/icmp.h +++ b/helper/include/odp/helper/icmp.h @@ -32,15 +32,18 @@ typedef struct ODP_PACKED { uint8_t type; /**< message type */ uint8_t code; /**< type sub-code */ odp_u16sum_t chksum; /**< checksum of icmp header */ + /** Variant mappings of ICMP fields */ union { + /** Fields used for ICMP echo msgs */ struct { - odp_u16be_t id; - odp_u16be_t sequence; + odp_u16be_t id; /**< id */ + odp_u16be_t sequence; /**< sequence */ } echo; /**< echo datagram */ odp_u32be_t gateway; /**< gateway address */ + /** Fields used for ICMP frag msgs */ struct { - odp_u16be_t __unused; - odp_u16be_t mtu; + odp_u16be_t __unused; /**< @internal */ + odp_u16be_t mtu; /**< mtu */ } frag; /**< path mtu discovery */ } un; /**< icmp sub header */ } odph_icmphdr_t; diff --git a/helper/include/odp/helper/ip.h b/helper/include/odp/helper/ip.h index b31a13a0..91776fad 100644 --- a/helper/include/odp/helper/ip.h +++ b/helper/include/odp/helper/ip.h @@ -29,7 +29,7 @@ extern "C" { #define ODPH_IPV4 4 /**< IP version 4 */ #define ODPH_IPV4HDR_LEN 20 /**< Min length of IP header (no options) */ #define ODPH_IPV4HDR_IHL_MIN 5 /**< Minimum IHL value*/ -cd #define ODPH_IPV4ADDR_LEN 4 /**< IPv4 address length in bytes */ +#define ODPH_IPV4ADDR_LEN 4 /**< IPv4 address length in bytes */ /** The one byte IPv4 tos or IPv6 tc field is composed of the following two * subfields - a six bit Differentiated Service Code Point (DSCP) and a two diff --git a/helper/include/odp/helper/strong_types.h b/helper/include/odp/helper/strong_types.h index 13e35a43..501d0f28 100644 --- a/helper/include/odp/helper/strong_types.h +++ b/helper/include/odp/helper/strong_types.h @@ -20,10 +20,11 @@ /** Use strong typing for ODP types */ #ifdef __cplusplus +/** @internal C++ helper macro for strong typing @param type @return */ #define ODPH_HANDLE_T(type) struct _##type { uint8_t unused_dummy_var; } *type #else #define odph_handle_t struct { uint8_t unused_dummy_var; } * -/** C/C++ helper macro for strong typing */ +/** @internal C helper macro for strong typing @param type @return */ #define ODPH_HANDLE_T(type) odph_handle_t type #endif diff --git a/helper/include/odp/helper/table.h b/helper/include/odp/helper/table.h index b3440ef5..96c9c5fe 100644 --- a/helper/include/odp/helper/table.h +++ b/helper/include/odp/helper/table.h @@ -94,7 +94,7 @@ extern "C" { #define ODPH_TABLE_NAME_LEN 32 #include -/** ODP table handle */ +/** @internal ODPH table handle @return */ typedef ODPH_HANDLE_T(odph_table_t); /** diff --git a/helper/include/odp/helper/tcp.h b/helper/include/odp/helper/tcp.h index fd234e58..e91b52e2 100644 --- a/helper/include/odp/helper/tcp.h +++ b/helper/include/odp/helper/tcp.h @@ -32,8 +32,9 @@ typedef struct ODP_PACKED { odp_u16be_t dst_port; /**< Destination port */ odp_u32be_t seq_no; /**< Sequence number */ odp_u32be_t ack_no; /**< Acknowledgment number */ + /** Variant maps for TCP header fields */ union { - odp_u16be_t doffset_flags; + odp_u16be_t doffset_flags; /**< TCP Flags aggregate */ #if ODP_BIG_ENDIAN_BITFIELD struct { odp_u16be_t rsvd1:8; @@ -42,14 +43,14 @@ typedef struct ODP_PACKED { struct { odp_u16be_t hl:4; /**< Hdr len, in words */ odp_u16be_t rsvd3:4; /**< Reserved */ - odp_u16be_t cwr:1; - odp_u16be_t ece:1; - odp_u16be_t urg:1; - odp_u16be_t ack:1; - odp_u16be_t psh:1; - odp_u16be_t rst:1; - odp_u16be_t syn:1; - odp_u16be_t fin:1; + odp_u16be_t cwr:1; /**< cwr bit */ + odp_u16be_t ece:1; /**< ece bit */ + odp_u16be_t urg:1; /**< urg bit */ + odp_u16be_t ack:1; /**< ack bit */ + odp_u16be_t psh:1; /**< psh bit */ + odp_u16be_t rst:1; /**< rst bit */ + odp_u16be_t syn:1; /**< syn bit */ + odp_u16be_t fin:1; /**< fin bit */ }; #elif ODP_LITTLE_ENDIAN_BITFIELD struct { @@ -59,14 +60,14 @@ typedef struct ODP_PACKED { struct { odp_u16be_t rsvd3:4; /**< Reserved */ odp_u16be_t hl:4; /**< Hdr len, in words */ - odp_u16be_t fin:1; - odp_u16be_t syn:1; - odp_u16be_t rst:1; - odp_u16be_t psh:1; - odp_u16be_t ack:1; - odp_u16be_t urg:1; - odp_u16be_t ece:1; - odp_u16be_t cwr:1; + odp_u16be_t fin:1; /**< fin bit */ + odp_u16be_t syn:1; /**< syn bit */ + odp_u16be_t rst:1; /**< rst bit */ + odp_u16be_t psh:1; /**< psh bit */ + odp_u16be_t ack:1; /**< ack bit */ + odp_u16be_t urg:1; /**< urg bit */ + odp_u16be_t ece:1; /**< ece bit */ + odp_u16be_t cwr:1; /**< cwr bit */ }; #else diff --git a/helper/include/odp/helper/threads.h b/helper/include/odp/helper/threads.h index 5682bab9..526f0d48 100644 --- a/helper/include/odp/helper/threads.h +++ b/helper/include/odp/helper/threads.h @@ -80,12 +80,15 @@ typedef struct { odph_odpthread_start_args_t start_args; /**< start arguments */ int cpu; /**< CPU ID */ int last; /**< true if last table entry */ + /** Variant field mappings for thread/process modes */ union { - struct { /* for thread implementation */ + /** For thread implementation */ + struct { pthread_t thread_id; /**< Pthread ID */ pthread_attr_t attr; /**< Pthread attributes */ } thread; - struct { /* for process implementation */ + /** For process implementation */ + struct { pid_t pid; /**< Process ID */ int status; /**< Process state chge status*/ } proc;