[v2] dmadev: standardize alignment

Message ID 20240210062758.1510-1-pbhagavatula@marvell.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers
Series [v2] dmadev: standardize alignment |

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/Intel-compilation success Compilation OK
ci/intel-Testing success 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/github-robot: build success github build: passed
ci/iol-abi-testing success Testing PASS
ci/iol-compile-amd64-testing success Testing PASS
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Pavan Nikhilesh Bhagavatula Feb. 10, 2024, 6:27 a.m. UTC
  From: Pavan Nikhilesh <pbhagavatula@marvell.com>

Align fp_objects based on cacheline size defined
by build configuration.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
---
v2 Changes:
- Drop malloc changes.

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

--
2.25.1
  

Comments

fengchengwen Feb. 10, 2024, 11:34 a.m. UTC | #1
Acked-by: Chengwen Feng <fengchengwen@huawei.com>

On 2024/2/10 14:27, pbhagavatula@marvell.com wrote:
> From: Pavan Nikhilesh<pbhagavatula@marvell.com>
>
> Align fp_objects based on cacheline size defined
> by build configuration.
>
> Signed-off-by: Pavan Nikhilesh<pbhagavatula@marvell.com>
> ---
> v2 Changes:
> - Drop malloc changes.
>
>   lib/dmadev/rte_dmadev_core.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/lib/dmadev/rte_dmadev_core.h b/lib/dmadev/rte_dmadev_core.h
> index 064785686f..e8239c2d22 100644
> --- a/lib/dmadev/rte_dmadev_core.h
> +++ b/lib/dmadev/rte_dmadev_core.h
> @@ -73,7 +73,7 @@ struct rte_dma_fp_object {
>   	rte_dma_completed_t        completed;
>   	rte_dma_completed_status_t completed_status;
>   	rte_dma_burst_capacity_t   burst_capacity;
> -} __rte_aligned(128);
> +} __rte_cache_aligned;
>
>   extern struct rte_dma_fp_object *rte_dma_fp_objs;
>
> --
> 2.25.1
>
  
Thomas Monjalon Feb. 19, 2024, 1:32 a.m. UTC | #2
> > Align fp_objects based on cacheline size defined
> > by build configuration.
> >
> > Signed-off-by: Pavan Nikhilesh<pbhagavatula@marvell.com>
> Acked-by: Chengwen Feng <fengchengwen@huawei.com>

Applied, thanks.
  

Patch

diff --git a/lib/dmadev/rte_dmadev_core.h b/lib/dmadev/rte_dmadev_core.h
index 064785686f..e8239c2d22 100644
--- a/lib/dmadev/rte_dmadev_core.h
+++ b/lib/dmadev/rte_dmadev_core.h
@@ -73,7 +73,7 @@  struct rte_dma_fp_object {
 	rte_dma_completed_t        completed;
 	rte_dma_completed_status_t completed_status;
 	rte_dma_burst_capacity_t   burst_capacity;
-} __rte_aligned(128);
+} __rte_cache_aligned;

 extern struct rte_dma_fp_object *rte_dma_fp_objs;