[v4,12/12] eventdev: fix doxygen processing of event vector struct
Checks
Commit Message
The event vector struct was missing comments on two members, and also
was inadvertently creating a local variable called "__rte_aligned" in
the doxygen output.
Correct the comment markers to fix the former issue, and fix the latter
by putting "#ifdef __DOXYGEN" around the alignment constraint.
Fixes: 1cc44d409271 ("eventdev: introduce event vector capability")
Fixes: 3c838062b91f ("eventdev: introduce event vector Rx capability")
Fixes: 699155f2d4e2 ("eventdev: fix clang C++ include")
Cc: stable@dpdk.org
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eventdev/rte_eventdev.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
Comments
> The event vector struct was missing comments on two members, and also
> was inadvertently creating a local variable called "__rte_aligned" in
> the doxygen output.
>
> Correct the comment markers to fix the former issue, and fix the latter
> by putting "#ifdef __DOXYGEN" around the alignment constraint.
>
> Fixes: 1cc44d409271 ("eventdev: introduce event vector capability")
> Fixes: 3c838062b91f ("eventdev: introduce event vector Rx capability")
> Fixes: 699155f2d4e2 ("eventdev: fix clang C++ include")
> Cc: stable@dpdk.org
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> ---
> lib/eventdev/rte_eventdev.h | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/lib/eventdev/rte_eventdev.h b/lib/eventdev/rte_eventdev.h
> index 03748eb437..cf7d103a6c 100644
> --- a/lib/eventdev/rte_eventdev.h
> +++ b/lib/eventdev/rte_eventdev.h
> @@ -1358,10 +1358,8 @@ struct rte_event_vector {
> * port and queue of the mbufs in the vector
> */
> struct {
> - uint16_t port;
> - /* Ethernet device port id. */
> - uint16_t queue;
> - /* Ethernet device queue id. */
> + uint16_t port; /**< Ethernet device port id. */
> + uint16_t queue; /**< Ethernet device queue id. */
> };
> };
> /**< Union to hold common attributes of the vector array. */
> @@ -1390,7 +1388,11 @@ struct rte_event_vector {
> * vector array can be an array of mbufs or pointers or opaque u64
> * values.
> */
> +#ifndef __DOXYGEN__
> } __rte_aligned(16);
> +#else
> +};
> +#endif
>
> /* Scheduler type definitions */
> #define RTE_SCHED_TYPE_ORDERED 0
> --
> 2.40.1
21/02/2024 11:32, Bruce Richardson:
> The event vector struct was missing comments on two members, and also
> was inadvertently creating a local variable called "__rte_aligned" in
> the doxygen output.
>
> Correct the comment markers to fix the former issue, and fix the latter
> by putting "#ifdef __DOXYGEN" around the alignment constraint.
[..]
> +#ifndef __DOXYGEN__
> } __rte_aligned(16);
> +#else
> +};
> +#endif
Would it be possible to make __rte_aligned empty in rte_common.h
instead of each call? Does it fix Doxygen bug?
On Mon, Mar 04, 2024 at 04:35:41PM +0100, Thomas Monjalon wrote:
> 21/02/2024 11:32, Bruce Richardson:
> > The event vector struct was missing comments on two members, and also
> > was inadvertently creating a local variable called "__rte_aligned" in
> > the doxygen output.
> >
> > Correct the comment markers to fix the former issue, and fix the latter
> > by putting "#ifdef __DOXYGEN" around the alignment constraint.
> [..]
> > +#ifndef __DOXYGEN__
> > } __rte_aligned(16);
> > +#else
> > +};
> > +#endif
>
> Would it be possible to make __rte_aligned empty in rte_common.h
> instead of each call? Does it fix Doxygen bug?
>
I think that should be fixed globally by Tyler's series for "alignas"[1]
With the new placement for the alignment macro, I don't think this doxygen
issue will occur again.
[1] https://patches.dpdk.org/project/dpdk/list/?series=31229
@@ -1358,10 +1358,8 @@ struct rte_event_vector {
* port and queue of the mbufs in the vector
*/
struct {
- uint16_t port;
- /* Ethernet device port id. */
- uint16_t queue;
- /* Ethernet device queue id. */
+ uint16_t port; /**< Ethernet device port id. */
+ uint16_t queue; /**< Ethernet device queue id. */
};
};
/**< Union to hold common attributes of the vector array. */
@@ -1390,7 +1388,11 @@ struct rte_event_vector {
* vector array can be an array of mbufs or pointers or opaque u64
* values.
*/
+#ifndef __DOXYGEN__
} __rte_aligned(16);
+#else
+};
+#endif
/* Scheduler type definitions */
#define RTE_SCHED_TYPE_ORDERED 0