[v7,4/4] cryptodev: remove rte marker fields

Message ID 1710972098-2209-5-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series remove use of RTE_MARKER fields in libraries |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build fail github build: failed
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Functional success Functional PASS
ci/iol-abi-testing warning Testing issues
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS

Commit Message

Tyler Retzlaff March 20, 2024, 10:01 p.m. UTC
  RTE_MARKER typedefs are a GCC extension unsupported by MSVC. Remove
RTE_MARKER fields from rte_mbuf struct.

Maintain alignment of fields after removed cacheline1 marker by placing
C11 alignas(RTE_CACHE_LINE_MIN_SIZE).

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 doc/guides/rel_notes/release_24_03.rst | 3 +++
 lib/cryptodev/cryptodev_pmd.h          | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)
  

Comments

Morten Brørup March 26, 2024, 10:31 a.m. UTC | #1
> From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com]
> Sent: Wednesday, 20 March 2024 23.02
> 
> RTE_MARKER typedefs are a GCC extension unsupported by MSVC. Remove
> RTE_MARKER fields from rte_mbuf struct.
> 
> Maintain alignment of fields after removed cacheline1 marker by placing
> C11 alignas(RTE_CACHE_LINE_MIN_SIZE).
> 
> Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
> ---
>  doc/guides/rel_notes/release_24_03.rst | 3 +++
>  lib/cryptodev/cryptodev_pmd.h          | 5 +++--
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/doc/guides/rel_notes/release_24_03.rst
> b/doc/guides/rel_notes/release_24_03.rst
> index 75d40d4..d3e5abe 100644
> --- a/doc/guides/rel_notes/release_24_03.rst
> +++ b/doc/guides/rel_notes/release_24_03.rst
> @@ -222,6 +222,9 @@ Removed Items
>  * security: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1``
>    have been removed from ``struct rte_security_session``.
> 
> +* cryptodev: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1``
> +  have been removed from ``struct cryptodev_driver``.
> +
>  API Changes
>  -----------
> 
> diff --git a/lib/cryptodev/cryptodev_pmd.h
> b/lib/cryptodev/cryptodev_pmd.h
> index d195b81..9daf129 100644
> --- a/lib/cryptodev/cryptodev_pmd.h
> +++ b/lib/cryptodev/cryptodev_pmd.h
> @@ -5,6 +5,8 @@
>  #ifndef _CRYPTODEV_PMD_H_
>  #define _CRYPTODEV_PMD_H_
> 
> +#include <stdalign.h>
> +
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> @@ -139,7 +141,6 @@ struct cryptodev_driver {
>   * has a fixed algo, key, op-type, digest_len etc.
>   */
>  struct rte_cryptodev_sym_session {
> -	RTE_MARKER cacheline0;
>  	uint64_t opaque_data;
>  	/**< Can be used for external metadata */
>  	uint32_t sess_data_sz;
> @@ -151,7 +152,7 @@ struct rte_cryptodev_sym_session {
>  	rte_iova_t driver_priv_data_iova;
>  	/**< Session driver data IOVA address */
> 
> -	alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1;
> +	alignas(RTE_CACHE_LINE_MIN_SIZE)
>  	/**< Second cache line - start of the driver session data */
>  	uint8_t driver_priv_data[];
>  	/**< Driver specific session data, variable size */
> --
> 1.8.3.1

Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
  

Patch

diff --git a/doc/guides/rel_notes/release_24_03.rst b/doc/guides/rel_notes/release_24_03.rst
index 75d40d4..d3e5abe 100644
--- a/doc/guides/rel_notes/release_24_03.rst
+++ b/doc/guides/rel_notes/release_24_03.rst
@@ -222,6 +222,9 @@  Removed Items
 * security: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1``
   have been removed from ``struct rte_security_session``.
 
+* cryptodev: ``RTE_MARKER`` fields ``cacheline0`` and ``cacheline1``
+  have been removed from ``struct cryptodev_driver``.
+
 API Changes
 -----------
 
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index d195b81..9daf129 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -5,6 +5,8 @@ 
 #ifndef _CRYPTODEV_PMD_H_
 #define _CRYPTODEV_PMD_H_
 
+#include <stdalign.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -139,7 +141,6 @@  struct cryptodev_driver {
  * has a fixed algo, key, op-type, digest_len etc.
  */
 struct rte_cryptodev_sym_session {
-	RTE_MARKER cacheline0;
 	uint64_t opaque_data;
 	/**< Can be used for external metadata */
 	uint32_t sess_data_sz;
@@ -151,7 +152,7 @@  struct rte_cryptodev_sym_session {
 	rte_iova_t driver_priv_data_iova;
 	/**< Session driver data IOVA address */
 
-	alignas(RTE_CACHE_LINE_MIN_SIZE) RTE_MARKER cacheline1;
+	alignas(RTE_CACHE_LINE_MIN_SIZE)
 	/**< Second cache line - start of the driver session data */
 	uint8_t driver_priv_data[];
 	/**< Driver specific session data, variable size */