Skip to contentSkip to conversation

examples/flow_filtering: fix wrong comment

PATCH Superseded Joyce Kong 3 participants 8 messages Nov 3, 2021 – Nov 16, 2021

lore
Share & tools
lore

Joyce Kong

author
#0 lore raw

PATCH 1/1 examples/flow_filtering: fix wrong comment

Change the 'IPV4' level to 'ETH' level in the comment as it was previously misdescribed.

Fixes 9a212dc06c7a ("doc: use code snippets in sample app guides")
---
 examples/flow_filtering/flow_blocks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/flow_filtering/flow_blocks.c +1 -1
index 3251ed9f8f..b168dc6e71 100644
@@ -75,7 +75,7 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	 * ipv4 we set this level to allow all.
 	 */
 
-	/* IPv4 we set this level to allow all. 8< */
+	/* ETH we set this level to allow all. 8< */
 	pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
 	/* >8 End of setting the first level of the pattern. */
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 26 lines

From: Joyce Kong <[email protected]>
Sent: Wednesday 3 November 2021 02:41
To: Ori Kam <[email protected]>; Mcnamara, John <[email protected]>; Walsh, Conor <[email protected]>; Conor Fogarty <[email protected]>
Cc: [email protected]; [email protected]; [email protected]
Subject: [PATCH v1] examples/flow_filtering: fix wrong comment

Change the 'IPV4' level to 'ETH' level in the comment as it was previously misdescribed.

Fixes 9a212dc06c7a ("doc: use code snippets in sample app guides")
---
 examples/flow_filtering/flow_blocks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/flow_filtering/flow_blocks.c +0 -0
index 3251ed9f8f..b168dc6e71 100644

examples/flow_filtering/flow_blocks.c generate_ipv4_flow(uint16_t port_id, uint16_t rx_q, · line 80

Quoted 7 lines
examples/flow_filtering/flow_blocks.c +1 -1
@@ -75,7 +75,7 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	 * ipv4 we set this level to allow all.
 	 */
 
-	/* IPv4 we set this level to allow all. 8< */
+	/* ETH we set this level to allow all. 8< */
 	pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
 	/* >8 End of setting the first level of the pattern. */

Hi Joyce,

This can't be applied as is, it will break the docs build as follows:
doc/guides/sample_app_ug/flow_filtering.rst:225: WARNING: start-after pattern not found: IPv4 we set this level to allow all. 8<

The comment is a tag used by the docs to locate a snippet within the code so the corresponding tag must be changed in the docs. The following must be added to this patch:

doc/guides/sample_app_ug/flow_filtering.rst +1 -1
index 11da9148ca..e8605f36f2 100644
@@ -224,7 +224,7 @@ Setting the first level of the pattern ETH:
 
 .. literalinclude:: ../../../examples/flow_filtering/flow_blocks.c
     :language: c
-    :start-after: IPv4 we set this level to allow all. 8<
+    :start-after: ETH we set this level to allow all. 8<
     :end-before: >8 End of setting the first level of the pattern.
     :dedent: 1
 

Thanks,
Conor.

author
#2 lore raw

<snip>

Quoted 42 lines
Quoted 10 lines
---
 examples/flow_filtering/flow_blocks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/flow_filtering/flow_blocks.c +0 -0
index 3251ed9f8f..b168dc6e71 100644

examples/flow_filtering/flow_blocks.c generate_ipv4_flow(uint16_t port_id, uint16_t rx_q, · line 80

Quoted 7 lines
examples/flow_filtering/flow_blocks.c +1 -1
@@ -75,7 +75,7 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	 * ipv4 we set this level to allow all.
 	 */
 
-	/* IPv4 we set this level to allow all. 8< */
+	/* ETH we set this level to allow all. 8< */
 	pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
 	/* >8 End of setting the first level of the pattern. */

Hi Joyce,

This can't be applied as is, it will break the docs build as follows:
doc/guides/sample_app_ug/flow_filtering.rst:225: WARNING: start-after pattern not found: IPv4 we set this level to allow all. 8<

The comment is a tag used by the docs to locate a snippet within the code so the corresponding tag must be changed in the docs.
The following must be added to this patch:

doc/guides/sample_app_ug/flow_filtering.rst +1 -1
index 11da9148ca..e8605f36f2 100644
@@ -224,7 +224,7 @@ Setting the first level of the pattern ETH:
 
 .. literalinclude:: ../../../examples/flow_filtering/flow_blocks.c
     :language: c
-    :start-after: IPv4 we set this level to allow all. 8<
+    :start-after: ETH we set this level to allow all. 8<
     :end-before: >8 End of setting the first level of the pattern.
     :dedent: 1
 
Quoted 2 lines

Thanks,
Conor.

Hi Conor, please see V2.

Thanks, Joyce

#3 lore raw
Quoted 53 lines

From: Joyce Kong <[email protected]>
Sent: Thursday 4 November 2021 07:34
To: Walsh, Conor <[email protected]>; Ori Kam <[email protected]>; Mcnamara, John <[email protected]>; Conor Fogarty <[email protected]>
Cc: [email protected]; nd <[email protected]>; [email protected]
Subject: RE: [PATCH v1] examples/flow_filtering: fix wrong comment

<snip>

Quoted 20 lines
Quoted 10 lines
---
 examples/flow_filtering/flow_blocks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
examples/flow_filtering/flow_blocks.c +0 -0
index 3251ed9f8f..b168dc6e71 100644

examples/flow_filtering/flow_blocks.c generate_ipv4_flow(uint16_t port_id, uint16_t rx_q, · line 80

Quoted 7 lines
examples/flow_filtering/flow_blocks.c +1 -1
@@ -75,7 +75,7 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	 * ipv4 we set this level to allow all.
 	 */
 
-	/* IPv4 we set this level to allow all. 8< */
+	/* ETH we set this level to allow all. 8< */
 	pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
 	/* >8 End of setting the first level of the pattern. */

Hi Joyce,

Quoted 5 lines

This can't be applied as is, it will break the docs build as follows:
doc/guides/sample_app_ug/flow_filtering.rst:225: WARNING: start-after pattern not found: IPv4 we set this level to allow all. 8<

The comment is a tag used by the docs to locate a snippet within the code

so

Quoted 17 lines

the corresponding tag must be changed in the docs. The following must be added to this patch:

doc/guides/sample_app_ug/flow_filtering.rst +1 -1
index 11da9148ca..e8605f36f2 100644
@@ -224,7 +224,7 @@ Setting the first level of the pattern ETH:
 
 .. literalinclude:: ../../../examples/flow_filtering/flow_blocks.c
     :language: c
-    :start-after: IPv4 we set this level to allow all. 8<
+    :start-after: ETH we set this level to allow all. 8<
     :end-before: >8 End of setting the first level of the pattern.
     :dedent: 1
 
Quoted 6 lines
Quoted 2 lines

Thanks,
Conor.

Hi Conor, please see V2.

Thanks, Joyce

Hi Joyce,

v2 looks correct to me, I will apply my tag to v2 now.

Thanks,
Conor.

author
#4 lore raw

PATCH v2 1/1 examples/flow_filtering: fix wrong comment

In reply to Joyce Kong

Change the 'IPV4' level to 'ETH' level in the comment as it was previously misdescribed.

Fixes 9a212dc06c7a ("doc: use code snippets in sample app guides")
---
 doc/guides/sample_app_ug/flow_filtering.rst | 2 +-
 examples/flow_filtering/flow_blocks.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
doc/guides/sample_app_ug/flow_filtering.rst +1 -1
index 11da9148ca..e8605f36f2 100644
@@ -224,7 +224,7 @@ Setting the first level of the pattern ETH:
 
 .. literalinclude:: ../../../examples/flow_filtering/flow_blocks.c
     :language: c
-    :start-after: IPv4 we set this level to allow all. 8<
+    :start-after: ETH we set this level to allow all. 8<
     :end-before: >8 End of setting the first level of the pattern.
     :dedent: 1
 
examples/flow_filtering/flow_blocks.c +1 -1
index 3251ed9f8f..b168dc6e71 100644
@@ -75,7 +75,7 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	 * ipv4 we set this level to allow all.
 	 */
 
-	/* IPv4 we set this level to allow all. 8< */
+	/* ETH we set this level to allow all. 8< */
 	pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
 	/* >8 End of setting the first level of the pattern. */
 
Signature · 1 line
2.17.1
Reviewed-by on v2 1/1
#5 lore raw
Quoted 11 lines

From: Joyce Kong <[email protected]>
Sent: Thursday 4 November 2021 07:32
To: Ori Kam <[email protected]>; Mcnamara, John <[email protected]>; Conor Fogarty <[email protected]>; Walsh, Conor <[email protected]>
Cc: [email protected]; [email protected]; [email protected]
Subject: [PATCH v2] examples/flow_filtering: fix wrong comment

Change the 'IPV4' level to 'ETH' level in the comment as it was previously misdescribed.

Quoted 6 lines
Fixes 9a212dc06c7a ("doc: use code snippets in sample app guides")

---

author
#6 lore raw

PATCH v3 1/1 examples/flow_filtering: fix wrong comment

In reply to Joyce Kong

The 'IPv4' in the comment is to mark the code snippet, while it made some confusion. Then removing 'IPv4' description will be clearer.

Fixes 9a212dc06c7a ("doc: use code snippets in sample app guides")
---
 doc/guides/sample_app_ug/flow_filtering.rst | 2 +-
 examples/flow_filtering/flow_blocks.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
doc/guides/sample_app_ug/flow_filtering.rst +1 -1
index 11da9148ca..8cac2f8a8f 100644
@@ -224,7 +224,7 @@ Setting the first level of the pattern ETH:
 
 .. literalinclude:: ../../../examples/flow_filtering/flow_blocks.c
     :language: c
-    :start-after: IPv4 we set this level to allow all. 8<
+    :start-after: Set this level to allow all. 8<
     :end-before: >8 End of setting the first level of the pattern.
     :dedent: 1
 
examples/flow_filtering/flow_blocks.c +1 -1
index 3251ed9f8f..f368e6124d 100644
@@ -75,7 +75,7 @@ generate_ipv4_flow(uint16_t port_id, uint16_t rx_q,
 	 * ipv4 we set this level to allow all.
 	 */
 
-	/* IPv4 we set this level to allow all. 8< */
+	/* Set this level to allow all. 8< */
 	pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
 	/* >8 End of setting the first level of the pattern. */
 
Signature · 1 line
2.17.1
#7 lore raw
Quoted 7 lines · Joyce Kong

The 'IPv4' in the comment is to mark the code snippet, while it made some confusion. Then removing 'IPv4' description will be clearer.

Fixes 9a212dc06c7a ("doc: use code snippets in sample app guides")

I removed the backport request: it's not fixing a problem, just enhancing readability of a comment.

Quoted 4 lines

Applied, thanks.

Signature · 1 line
David Marchand