diff mbox series

[API-NEXT,PATCHv2,6/6] helper: add additional doxygen documentation

Message ID 1492641285-7020-6-git-send-email-bill.fischofer@linaro.org
State Superseded
Headers show
Series [API-NEXT,PATCHv2,1/6] api: classification: add additional doxygen documentation | expand

Commit Message

Bill Fischofer April 19, 2017, 10:34 p.m. UTC
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 <bill.fischofer@linaro.org>

---
 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

Comments

Savolainen, Petri (Nokia - FI/Espoo) April 21, 2017, 1:20 p.m. UTC | #1
These doxygen fixes look OK, but where is patch 5/6. First version had 5 patches, this should have 6, but has only 5... Did something go wrong.

-Petri


> -----Original Message-----

> From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of Bill

> Fischofer

> Sent: Thursday, April 20, 2017 1:35 AM

> To: lng-odp@lists.linaro.org

> Subject: [lng-odp] [API-NEXT PATCHv2 6/6] helper: add additional doxygen

> documentation

> 

> 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 <bill.fischofer@linaro.org>

> ---

>  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 ++++++++++++++++-----------
Bill Fischofer April 21, 2017, 1:25 p.m. UTC | #2
On Fri, Apr 21, 2017 at 8:20 AM, Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolainen@nokia-bell-labs.com> wrote:

> These doxygen fixes look OK, but where is patch 5/6. First version had 5

> patches, this should have 6, but has only 5... Did something go wrong.

>


The first patch was written against master, but then I realized since it
was making API changes (albeit just doxygen) that it should be against
api-next. V2 is against api-next and since that includes another API file
(ipsec.h) that also needed updating v2 is in 6 parts. v2 is the one that
should be merged and then it can be pulled forward to master.


>

> -Petri

>

>

> > -----Original Message-----

> > From: lng-odp [mailto:lng-odp-bounces@lists.linaro.org] On Behalf Of

> Bill

> > Fischofer

> > Sent: Thursday, April 20, 2017 1:35 AM

> > To: lng-odp@lists.linaro.org

> > Subject: [lng-odp] [API-NEXT PATCHv2 6/6] helper: add additional doxygen

> > documentation

> >

> > 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 <bill.fischofer@linaro.org>

> > ---

> >  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

> ++++++++++++++++-----------

>

>
Savolainen, Petri (Nokia - FI/Espoo) April 21, 2017, 1:52 p.m. UTC | #3
From: Bill Fischofer [mailto:bill.fischofer@linaro.org] 

Sent: Friday, April 21, 2017 4:26 PM
To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia-bell-labs.com>
Cc: lng-odp@lists.linaro.org
Subject: Re: [lng-odp] [API-NEXT PATCHv2 6/6] helper: add additional doxygen documentation



On Fri, Apr 21, 2017 at 8:20 AM, Savolainen, Petri (Nokia - FI/Espoo) <mailto:petri.savolainen@nokia-bell-labs.com> wrote:
These doxygen fixes look OK, but where is patch 5/6. First version had 5 patches, this should have 6, but has only 5... Did something go wrong.

The first patch was written against master, but then I realized since it was making API changes (albeit just doxygen) that it should be against api-next. V2 is against api-next and since that includes another API file (ipsec.h) that also needed updating v2 is in 6 parts. v2 is the one that should be merged and then it can be pulled forward to master.




OK, for some reason I cannot find 5/6 from my client, but it's on the list.

Regardless of that, there's something mixed between 5/6 and 6/6. Both edit the same line of helper/ip.h


5/5:--- 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*/
-#define ODPH_IPV4ADDR_LEN     4  /**< IPv4 address length in bytes */
+cd #define ODPH_IPV4ADDR_LEN     4  /**< IPv4 address length in bytes */


6/6:
--- 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 */ 

-Petri



Bill Fischofer April 21, 2017, 2:19 p.m. UTC | #4
On Fri, Apr 21, 2017 at 8:52 AM, Savolainen, Petri (Nokia - FI/Espoo) <
petri.savolainen@nokia-bell-labs.com> wrote:

>

>

> From: Bill Fischofer [mailto:bill.fischofer@linaro.org]

> Sent: Friday, April 21, 2017 4:26 PM

> To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia-bell-

> labs.com>

> Cc: lng-odp@lists.linaro.org

> Subject: Re: [lng-odp] [API-NEXT PATCHv2 6/6] helper: add additional

> doxygen documentation

>

>

>

> On Fri, Apr 21, 2017 at 8:20 AM, Savolainen, Petri (Nokia - FI/Espoo)

> <mailto:petri.savolainen@nokia-bell-labs.com> wrote:

> These doxygen fixes look OK, but where is patch 5/6. First version had 5

> patches, this should have 6, but has only 5... Did something go wrong.

>

> The first patch was written against master, but then I realized since it

> was making API changes (albeit just doxygen) that it should be against

> api-next. V2 is against api-next and since that includes another API file

> (ipsec.h) that also needed updating v2 is in 6 parts. v2 is the one that

> should be merged and then it can be pulled forward to master.

>

>

>

>

> OK, for some reason I cannot find 5/6 from my client, but it's on the list.

>

> Regardless of that, there's something mixed between 5/6 and 6/6. Both edit

> the same line of helper/ip.h

>

>

> 5/5:

> --- 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*/

> -#define ODPH_IPV4ADDR_LEN     4  /**< IPv4 address length in bytes */

> +cd #define ODPH_IPV4ADDR_LEN     4  /**< IPv4 address length in bytes */

>

>

> 6/6:

> --- 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 */

>


OK, that was a glitch. I'll correct in a v3 repost. Thanks.


>

> -Petri

>

>
diff mbox series

Patch

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/helper/strong_types.h>
-/** 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;