[v2,1/2] doc: updated incorrect value for IP frag max fragments

Message ID 20231221113242.3351356-1-euan.bourke@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v2,1/2] doc: updated incorrect value for IP frag max fragments |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Euan Bourke Dec. 21, 2023, 11:32 a.m. UTC
  Docs for IP Fragment said RTE_LIBRTE_IP_FRAG_MAX_FRAGS was 4 by default,
however this was changed to 8.

Documentation has been updated to account for this, including a
snippet of the code where RTE_LIBRTE_IP_FRAG_MAX_FRAGS is defined to
ensure the documentation stays up to date.

Signed-off-by: Euan Bourke <euan.bourke@intel.com>
---
 .mailmap                                             | 1 +
 config/rte_config.h                                  | 4 +++-
 doc/guides/prog_guide/ip_fragment_reassembly_lib.rst | 7 ++++++-
 3 files changed, 10 insertions(+), 2 deletions(-)
  

Comments

David Marchand Dec. 21, 2023, 11:39 a.m. UTC | #1
Hello,

On Thu, Dec 21, 2023 at 12:33 PM Euan Bourke <euan.bourke@intel.com> wrote:
>
> Docs for IP Fragment said RTE_LIBRTE_IP_FRAG_MAX_FRAGS was 4 by default,
> however this was changed to 8.
>
> Documentation has been updated to account for this, including a
> snippet of the code where RTE_LIBRTE_IP_FRAG_MAX_FRAGS is defined to
> ensure the documentation stays up to date.
>
> Signed-off-by: Euan Bourke <euan.bourke@intel.com>

Fixes: tag?
  
Thomas Monjalon Dec. 21, 2023, 11:41 a.m. UTC | #2
21/12/2023 12:32, Euan Bourke:
> -/* ip_fragmentation defines */
> +/* ip_fragmentation defines 8< */
>  #define RTE_LIBRTE_IP_FRAG_MAX_FRAG 8
> +/* >8 End of ip_fragmentation defines */
[...]
> +.. literalinclude:: ../../../config/rte_config.h
> +    :start-after: ip_fragmentation defines 8<
> +    :end-before: >8 End of ip_fragmentation defines

In v1 I asked to use "start-at". You didn't reply.
It is more convenient for a one-line include.
Don't you agree?
  
Euan Bourke Dec. 21, 2023, 1:46 p.m. UTC | #3
On 21/12/2023 11:41, Thomas Monjalon wrote:
> 21/12/2023 12:32, Euan Bourke:
>> -/* ip_fragmentation defines */
>> +/* ip_fragmentation defines 8< */
>>   #define RTE_LIBRTE_IP_FRAG_MAX_FRAG 8
>> +/* >8 End of ip_fragmentation defines */
> [...]
>> +.. literalinclude:: ../../../config/rte_config.h
>> +    :start-after: ip_fragmentation defines 8<
>> +    :end-before: >8 End of ip_fragmentation defines
> 
> In v1 I asked to use "start-at". You didn't reply.
> It is more convenient for a one-line include.
> Don't you agree?
> 
> 

Apologies, as I was updating the name of the declare in the next patch,
I thought this way would be better, will use "start-at" in next version.
  

Patch

diff --git a/.mailmap b/.mailmap
index ab0742a382..528bc68a30 100644
--- a/.mailmap
+++ b/.mailmap
@@ -379,6 +379,7 @@  Eric Zhang <eric.zhang@windriver.com>
 Erik Gabriel Carrillo <erik.g.carrillo@intel.com>
 Erik Ziegenbalg <eziegenb@brocade.com>
 Erlu Chen <erlu.chen@intel.com>
+Euan Bourke <euan.bourke@intel.com>
 Eugenio Pérez <eperezma@redhat.com>
 Eugeny Parshutin <eugeny.parshutin@linux.intel.com>
 Evan Swanson <evan.swanson@intel.com>
diff --git a/config/rte_config.h b/config/rte_config.h
index da265d7dd2..a3f92354f8 100644
--- a/config/rte_config.h
+++ b/config/rte_config.h
@@ -84,8 +84,10 @@ 
 /* rawdev defines */
 #define RTE_RAWDEV_MAX_DEVS 64
 
-/* ip_fragmentation defines */
+/* ip_fragmentation defines 8< */
 #define RTE_LIBRTE_IP_FRAG_MAX_FRAG 8
+/* >8 End of ip_fragmentation defines */
+
 // RTE_LIBRTE_IP_FRAG_TBL_STAT is not set
 
 /* rte_power defines */
diff --git a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
index 314d4adbb8..5010472246 100644
--- a/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
+++ b/doc/guides/prog_guide/ip_fragment_reassembly_lib.rst
@@ -43,7 +43,12 @@  Note that all update/lookup operations on Fragment Table are not thread safe.
 So if different execution contexts (threads/processes) will access the same table simultaneously,
 then some external syncing mechanism have to be provided.
 
-Each table entry can hold information about packets consisting of up to RTE_LIBRTE_IP_FRAG_MAX (by default: 4) fragments.
+Each table entry can hold information about packets of up to ``RTE_LIBRTE_IP_FRAG_MAX_FRAGS`` fragments,
+where ``RTE_LIBRTE_IP_FRAG_MAX_FRAGS`` defaults to:
+
+.. literalinclude:: ../../../config/rte_config.h
+    :start-after: ip_fragmentation defines 8<
+    :end-before: >8 End of ip_fragmentation defines
 
 Code example, that demonstrates creation of a new Fragment table: