[PATCH v2] dmadev: fix structure alignment

Wenwu Ma wenwux.ma at intel.com
Fri Mar 15 02:43:31 CET 2024


The structure rte_dma_dev needs only 8 byte alignment.
This patch replaces __rte_cache_aligned of rte_dma_dev
with __rte_aligned(8).

Fixes: b36970f2e13e ("dmadev: introduce DMA device library")
Cc: stable at dpdk.org

Signed-off-by: Wenwu Ma <wenwux.ma at intel.com>
---
v2:
 - Because of performance drop, adjust the code to
   no longer demand cache line alignment

---
 lib/dmadev/rte_dmadev_pmd.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dmadev/rte_dmadev_pmd.h b/lib/dmadev/rte_dmadev_pmd.h
index 58729088ff..b569bb3502 100644
--- a/lib/dmadev/rte_dmadev_pmd.h
+++ b/lib/dmadev/rte_dmadev_pmd.h
@@ -122,7 +122,7 @@ enum rte_dma_dev_state {
  * @internal
  * The generic data structure associated with each DMA device.
  */
-struct __rte_cache_aligned rte_dma_dev {
+struct __rte_aligned(8) rte_dma_dev {
 	/** Device info which supplied during device initialization. */
 	struct rte_device *device;
 	struct rte_dma_dev_data *data; /**< Pointer to shared device data. */
-- 
2.25.1



More information about the stable mailing list