doc: add deprecation notice for inconsistent socket_id types

Message ID 20221014080944.10992-1-markus.theil@tu-ilmenau.de (mailing list archive)
State Changes Requested, archived
Delegated to: Thomas Monjalon
Headers
Series doc: add deprecation notice for inconsistent socket_id types |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing fail Testing issues
ci/iol-intel-Functional success Functional Testing PASS
ci/github-robot: build success github build: passed
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing fail Testing issues
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

Markus Theil Oct. 14, 2022, 8:09 a.m. UTC
  DPDK uses many different types for socket_id's in its whole code
base. This leads to many warnings and casts in DPDK-based applications
compiled with -Wconversion.

Announce a treewide consolidation to the return type of rte_socket_id
in DPDK 23.11.

Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>
---
 doc/guides/rel_notes/deprecation.rst | 7 +++++++
 1 file changed, 7 insertions(+)
  

Comments

Jerin Jacob Oct. 14, 2022, 10:43 a.m. UTC | #1
On Fri, Oct 14, 2022 at 1:39 PM Markus Theil <markus.theil@tu-ilmenau.de> wrote:
>
> DPDK uses many different types for socket_id's in its whole code
> base. This leads to many warnings and casts in DPDK-based applications
> compiled with -Wconversion.
>
> Announce a treewide consolidation to the return type of rte_socket_id
> in DPDK 23.11.
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>

Acked-by: Jerin Jacob <jerinj@marvell.com>


> ---
>  doc/guides/rel_notes/deprecation.rst | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
> index 05cacb3ea8..7f4c468542 100644
> --- a/doc/guides/rel_notes/deprecation.rst
> +++ b/doc/guides/rel_notes/deprecation.rst
> @@ -96,3 +96,10 @@ Deprecation Notices
>    to have another parameter ``qp_id`` to return the queue pair ID
>    which got error interrupt to the application,
>    so that application can reset that particular queue pair.
> +
> +* eal/treewide: currently socket_id's use many different data types
> +  throughout the codebase. This complicates compiling DPDK-based
> +  applications with enabled -Wconversion. Fix this, by changing
> +  all occurences to the return type of rte_socket_id().
> +  DPDK 23.11 should receive a batch cleanup to a single, consistent
> +  data type.
> --
> 2.38.0
>
  
Stephen Hemminger July 16, 2023, 5:34 p.m. UTC | #2
On Fri, 14 Oct 2022 10:09:44 +0200
Markus Theil <markus.theil@tu-ilmenau.de> wrote:

> DPDK uses many different types for socket_id's in its whole code
> base. This leads to many warnings and casts in DPDK-based applications
> compiled with -Wconversion.
> 
> Announce a treewide consolidation to the return type of rte_socket_id
> in DPDK 23.11.
> 
> Signed-off-by: Markus Theil <markus.theil@tu-ilmenau.de>

Yes, this is a problem. But it is a bug not something that needs a deprecation
notice.  The DPDK has avoided using typedefs for port, queue, lcore, and socket.
With socket_id there is the need to represent SOCKET_ID_ANY which is -1.



Please file a bugzilla entry instead.
Looking at code, there a few places doing using uint8_t which will work since
no cpu at present supports that many numa nodes. Should probably be a compile
assert for that though.
  

Patch

diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 05cacb3ea8..7f4c468542 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -96,3 +96,10 @@  Deprecation Notices
   to have another parameter ``qp_id`` to return the queue pair ID
   which got error interrupt to the application,
   so that application can reset that particular queue pair.
+
+* eal/treewide: currently socket_id's use many different data types
+  throughout the codebase. This complicates compiling DPDK-based
+  applications with enabled -Wconversion. Fix this, by changing
+  all occurences to the return type of rte_socket_id().
+  DPDK 23.11 should receive a batch cleanup to a single, consistent
+  data type.