Skip to contentSkip to conversation

ethdev: fix comments of packet integrity flow item

PATCH Superseded Thomas Monjalon 4 participants 10 messages May 19, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethdev: fix comments of packet integrity flow item

The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**

Fixes b10a421a1f3b ("ethdev: add packet integrity check flow rules")
---
 lib/ethdev/rte_flow.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
lib/ethdev/rte_flow.h +9 -9
index 94c8c1ccc8..d7e0082dc7 100644
@@ -1708,7 +1708,7 @@ rte_flow_item_geneve_opt_mask = {
 #endif
 
 struct rte_flow_item_integrity {
-	/**< Tunnel encapsulation level the item should apply to.
+	/** Tunnel encapsulation level the item should apply to.
 	 * @see rte_flow_action_rss
 	 */
 	uint32_t level;
@@ -1716,21 +1716,21 @@ struct rte_flow_item_integrity {
 	union {
 		__extension__
 		struct {
-			/**< The packet is valid after passing all HW checks. */
+			/** The packet is valid after passing all HW checks. */
 			uint64_t packet_ok:1;
-			/**< L2 layer is valid after passing all HW checks. */
+			/** L2 layer is valid after passing all HW checks. */
 			uint64_t l2_ok:1;
-			/**< L3 layer is valid after passing all HW checks. */
+			/** L3 layer is valid after passing all HW checks. */
 			uint64_t l3_ok:1;
-			/**< L4 layer is valid after passing all HW checks. */
+			/** L4 layer is valid after passing all HW checks. */
 			uint64_t l4_ok:1;
-			/**< L2 layer CRC is valid. */
+			/** L2 layer CRC is valid. */
 			uint64_t l2_crc_ok:1;
-			/**< IPv4 layer checksum is valid. */
+			/** IPv4 layer checksum is valid. */
 			uint64_t ipv4_csum_ok:1;
-			/**< L4 layer checksum is valid. */
+			/** L4 layer checksum is valid. */
 			uint64_t l4_csum_ok:1;
-			/**< The l3 length is smaller than the frame length. */
+			/** L3 length is smaller than frame length. */
 			uint64_t l3_len_ok:1;
 			uint64_t reserved:56;
 		};
Signature · 1 line
2.31.1
#3 lore raw
In reply to Thomas Monjalon
Quoted 44 lines · Thomas Monjalon

The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**

Fixes b10a421a1f3b ("ethdev: add packet integrity check flow rules")
---
 lib/ethdev/rte_flow.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
lib/ethdev/rte_flow.h +6 -7
index 94c8c1ccc8..d7e0082dc7 100644
@@ -1708,7 +1708,7 @@ rte_flow_item_geneve_opt_mask = {
 #endif
 
 struct rte_flow_item_integrity {
-	/**< Tunnel encapsulation level the item should apply to.
+	/** Tunnel encapsulation level the item should apply to.
 	 * @see rte_flow_action_rss
 	 */
 	uint32_t level;
@@ -1716,21 +1716,21 @@ struct rte_flow_item_integrity {
 	union {
 		__extension__
 		struct {
-			/**< The packet is valid after passing all HW checks. */
+			/** The packet is valid after passing all HW checks. */
 			uint64_t packet_ok:1;
-			/**< L2 layer is valid after passing all HW checks. */
+			/** L2 layer is valid after passing all HW checks. */
 			uint64_t l2_ok:1;
-			/**< L3 layer is valid after passing all HW checks. */
+			/** L3 layer is valid after passing all HW checks. */
 			uint64_t l3_ok:1;
-			/**< L4 layer is valid after passing all HW checks. */
+			/** L4 layer is valid after passing all HW checks. */
 			uint64_t l4_ok:1;
-			/**< L2 layer CRC is valid. */
+			/** L2 layer CRC is valid. */
 			uint64_t l2_crc_ok:1;
-			/**< IPv4 layer checksum is valid. */

lib/ethdev/rte_flow.h struct rte_flow_item_integrity { · line 1736

Quoted 10 lines
lib/ethdev/rte_flow.h +3 -2
+			/** IPv4 layer checksum is valid. */
 			uint64_t ipv4_csum_ok:1;
-			/**< L4 layer checksum is valid. */
+			/** L4 layer checksum is valid. */
 			uint64_t l4_csum_ok:1;
-			/**< The l3 length is smaller than the frame length. */
+			/** L3 length is smaller than frame length. */
 			uint64_t l3_len_ok:1;
 			uint64_t reserved:56;
 		};

+1 to fix but the struct is not listed at all in the API documentation, because it is missing Doxygen comment for the struct itself.

Can it be possible to add a doxygen comment for the struct, even it is very basic, to enable it to be documented?

#4 lore raw

19/05/2021 18:53, Ferruh Yigit:

Quoted 59 lines · Thomas Monjalon
Quoted 44 lines

The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**

Fixes b10a421a1f3b ("ethdev: add packet integrity check flow rules")
---
 lib/ethdev/rte_flow.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
lib/ethdev/rte_flow.h +6 -7
index 94c8c1ccc8..d7e0082dc7 100644
@@ -1708,7 +1708,7 @@ rte_flow_item_geneve_opt_mask = {
 #endif
 
 struct rte_flow_item_integrity {
-	/**< Tunnel encapsulation level the item should apply to.
+	/** Tunnel encapsulation level the item should apply to.
 	 * @see rte_flow_action_rss
 	 */
 	uint32_t level;
@@ -1716,21 +1716,21 @@ struct rte_flow_item_integrity {
 	union {
 		__extension__
 		struct {
-			/**< The packet is valid after passing all HW checks. */
+			/** The packet is valid after passing all HW checks. */
 			uint64_t packet_ok:1;
-			/**< L2 layer is valid after passing all HW checks. */
+			/** L2 layer is valid after passing all HW checks. */
 			uint64_t l2_ok:1;
-			/**< L3 layer is valid after passing all HW checks. */
+			/** L3 layer is valid after passing all HW checks. */
 			uint64_t l3_ok:1;
-			/**< L4 layer is valid after passing all HW checks. */
+			/** L4 layer is valid after passing all HW checks. */
 			uint64_t l4_ok:1;
-			/**< L2 layer CRC is valid. */
+			/** L2 layer CRC is valid. */
 			uint64_t l2_crc_ok:1;
-			/**< IPv4 layer checksum is valid. */

lib/ethdev/rte_flow.h struct rte_flow_item_integrity { · line 1736

Quoted 10 lines
lib/ethdev/rte_flow.h +3 -2
+			/** IPv4 layer checksum is valid. */
 			uint64_t ipv4_csum_ok:1;
-			/**< L4 layer checksum is valid. */
+			/** L4 layer checksum is valid. */
 			uint64_t l4_csum_ok:1;
-			/**< The l3 length is smaller than the frame length. */
+			/** L3 length is smaller than frame length. */
 			uint64_t l3_len_ok:1;
 			uint64_t reserved:56;
 		};

+1 to fix but the struct is not listed at all in the API documentation, because it is missing Doxygen comment for the struct itself.

Quoted 2 lines

Can it be possible to add a doxygen comment for the struct, even it is very basic, to enable it to be documented?

Yes OK

#5 lore raw

PATCH v2 1/1 ethdev: fix comments of packet integrity flow item

In reply to Thomas Monjalon

The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**

The struct rte_flow_item_integrity did not appear in Doxygen output because there was no general comment for the struct.

Fixes b10a421a1f3b ("ethdev: add packet integrity check flow rules")

---
v2: add general comment for the struct (thanks Ferruh for the catch)

---
 lib/ethdev/rte_flow.h | 26 +++++++++++++++++---------
 1 file changed, 17 insertions(+), 9 deletions(-)
lib/ethdev/rte_flow.h +17 -9
index 94c8c1ccc8..961a5884fe 100644
@@ -1707,8 +1707,16 @@ rte_flow_item_geneve_opt_mask = {
 };
 #endif
 
+/**
+ * @warning
+ * @b EXPERIMENTAL: this structure may change without prior notice
+ *
+ * RTE_FLOW_ITEM_TYPE_INTEGRITY
+ *
+ * Match on packet integrity check result.
+ */
 struct rte_flow_item_integrity {
-	/**< Tunnel encapsulation level the item should apply to.
+	/** Tunnel encapsulation level the item should apply to.
 	 * @see rte_flow_action_rss
 	 */
 	uint32_t level;
@@ -1716,21 +1724,21 @@ struct rte_flow_item_integrity {
 	union {
 		__extension__
 		struct {
-			/**< The packet is valid after passing all HW checks. */
+			/** The packet is valid after passing all HW checks. */
 			uint64_t packet_ok:1;
-			/**< L2 layer is valid after passing all HW checks. */
+			/** L2 layer is valid after passing all HW checks. */
 			uint64_t l2_ok:1;
-			/**< L3 layer is valid after passing all HW checks. */
+			/** L3 layer is valid after passing all HW checks. */
 			uint64_t l3_ok:1;
-			/**< L4 layer is valid after passing all HW checks. */
+			/** L4 layer is valid after passing all HW checks. */
 			uint64_t l4_ok:1;
-			/**< L2 layer CRC is valid. */
+			/** L2 layer CRC is valid. */
 			uint64_t l2_crc_ok:1;
-			/**< IPv4 layer checksum is valid. */
+			/** IPv4 layer checksum is valid. */
 			uint64_t ipv4_csum_ok:1;
-			/**< L4 layer checksum is valid. */
+			/** L4 layer checksum is valid. */
 			uint64_t l4_csum_ok:1;
-			/**< The l3 length is smaller than the frame length. */
+			/** L3 length is smaller than frame length. */
 			uint64_t l3_len_ok:1;
 			uint64_t reserved:56;
 		};
Signature · 1 line
2.31.1
Reviewed-by on v2 1/1
#6 lore raw
Quoted 11 lines · Thomas Monjalon

The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**

The struct rte_flow_item_integrity did not appear in Doxygen output because there was no general comment for the struct.

Fixes b10a421a1f3b ("ethdev: add packet integrity check flow rules")

btw, there are some related issues for other structs, do you think should we fix them in this release?

Following are missing doxygen comment for its item:
* "struct rte_flow_item_conntrack"
* "struct rte_flow_item_ecpri"

* Following are missing doxygen comments for its items, and missing experimental tag.
* "struct rte_flow_item_geneve_opt"
* "struct rte_flow_item_ipv6_frag_ext"

And I suspect we can see similar issues with more structs as we check them all.

#7 lore raw

19/05/2021 19:47, Ferruh Yigit:

Quoted 23 lines · Thomas Monjalon
Quoted 11 lines

The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**

The struct rte_flow_item_integrity did not appear in Doxygen output because there was no general comment for the struct.

Fixes b10a421a1f3b ("ethdev: add packet integrity check flow rules")

btw, there are some related issues for other structs, do you think should we fix them in this release?

Following are missing doxygen comment for its item:
* "struct rte_flow_item_conntrack"
* "struct rte_flow_item_ecpri"

Quoted 6 lines

* Following are missing doxygen comments for its items, and missing experimental tag.
* "struct rte_flow_item_geneve_opt"
* "struct rte_flow_item_ipv6_frag_ext"

And I suspect we can see similar issues with more structs as we check them all.

Except GENEVE, they are singleton (one member in the struct),
so it is not a big deal.
Given they are missing comment (not wrong), I propose to wait the next release for making rte_flow doxygen more complete.
I plan to have a look at the rst doc as well.

#8 lore raw
Quoted 29 lines · Thomas Monjalon

19/05/2021 19:47, Ferruh Yigit:

Quoted 28 lines · Thomas Monjalon
Quoted 11 lines

The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**

The struct rte_flow_item_integrity did not appear in Doxygen output because there was no general comment for the struct.

Fixes b10a421a1f3b ("ethdev: add packet integrity check flow rules")

btw, there are some related issues for other structs, do you think should we fix them in this release?

Following are missing doxygen comment for its item:
* "struct rte_flow_item_conntrack"
* "struct rte_flow_item_ecpri"

* Following are missing doxygen comments for its items, and missing experimental tag.
* "struct rte_flow_item_geneve_opt"
* "struct rte_flow_item_ipv6_frag_ext"

Quoted 9 lines
Quoted 1 line

And I suspect we can see similar issues with more structs as we check them all.

Except GENEVE, they are singleton (one member in the struct),
so it is not a big deal.
Given they are missing comment (not wrong), I propose to wait the next release for making rte_flow doxygen more complete.
I plan to have a look at the rst doc as well.

OK

author Applied
#9 lore raw
In reply to Ferruh Yigit

19/05/2021 19:47, Ferruh Yigit:

Quoted 7 lines · Thomas Monjalon
Quoted 6 lines

The Doxygen comments are placed before the related lines, but the markers were /**< instead of /**

The struct rte_flow_item_integrity did not appear in Doxygen output because there was no general comment for the struct.

Quoted 7 lines
Quoted 5 lines
Fixes b10a421a1f3b ("ethdev: add packet integrity check flow rules")

Applied