common/cnxk: align npa stack to roc cache line size
PATCH 1/1 common/cnxk: align npa stack to roc cache line size
NPA stack should be aligned to ROC cache line size.
--- drivers/common/cnxk/roc_npa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/cnxk/roc_npa.c +1 -1
@@ -194,7 +194,7 @@ npa_stack_dma_alloc(struct npa_lf *lf, char *name, int pool_id, size_t size) {const char *mz_name =npa_stack_memzone_name (lf, pool_id, name); -return plt_memzone_reserve_cache_align (mz_name, size); +return plt_memzone_reserve_aligned (mz_name, size,0 ,ROC_ALIGN ); } static inline int
Signature · 1 line
2.32.0
Quoted 6 lines · Ashwin Sekhar T K
NPA stack should be aligned to ROC cache line size.
Fixes f765f5611240 ("common/cnxk: add NPA pool HW operations")Signed-off-by Ashwin Sekhar T K <[email protected]>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks
Quoted 20 lines
--- drivers/common/cnxk/roc_npa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/common/cnxk/roc_npa.c +1
-2@@ -194,7 +194,7 @@ npa_stack_dma_alloc(struct npa_lf *lf, char *name, int pool_id, size_t size) {const char *mz_name =npa_stack_memzone_name (lf, pool_id, name); -return plt_memzone_reserve_cache_align (mz_name, size); +return plt_memzone_reserve_aligned (mz_name, size,0 ,ROC_ALIGN ); } static inline int --2.32.0
Quoted 2 lines · Ashwin Sekhar T K
NPA stack should be aligned to ROC cache line size.
Can you please document the long versions of 'NPA' & 'ROC' abbreviations?
Also for the patch title, since abbreviations needs to be uppercase, to automate the check for these abbreviations, can you please add them to './devtools/words-case.txt' in separate patch.
And can you add some more context on the reasoning of the change, why it should be aligned to cache line?
What is the impact user/application sees if it is not aligned, and after aligned?
Thanks,
ferruh
Quoted 21 lines
Fixes f765f5611240 ("common/cnxk: add NPA pool HW operations")Signed-off-by Ashwin Sekhar T K <[email protected]>--- drivers/common/cnxk/roc_npa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/common/cnxk/roc_npa.c +1
-1@@ -194,7 +194,7 @@ npa_stack_dma_alloc(struct npa_lf *lf, char *name, int pool_id, size_t size) {const char *mz_name =npa_stack_memzone_name (lf, pool_id, name); -return plt_memzone_reserve_cache_align (mz_name, size); +return plt_memzone_reserve_aligned (mz_name, size,0 ,ROC_ALIGN ); } static inline int
Quoted 10 lines · Ferruh Yigit
Quoted 2 lines · Ashwin Sekhar T K
NPA stack should be aligned to ROC cache line size.
Can you please document the long versions of 'NPA' & 'ROC' abbreviations?
Also for the patch title, since abbreviations needs to be uppercase, to automate the check for these abbreviations, can you please add them to '
./devtools/words-case.txt' in separate patch.
Please do add NIX, NPC, CPT, SSO, LBK, MCAM too.
Quoted 29 lines
And can you add some more context on the reasoning of the change, why it should be aligned to cache line?
What is the impact user/application sees if it is not aligned, and after aligned?Thanks,
ferruhQuoted 21 lines
Fixes f765f5611240 ("common/cnxk: add NPA pool HW operations")Signed-off-by Ashwin Sekhar T K <[email protected]>--- drivers/common/cnxk/roc_npa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/common/cnxk/roc_npa.c +1
-1@@ -194,7 +194,7 @@ npa_stack_dma_alloc(struct npa_lf *lf, char *name, int pool_id, size_t size) {const char *mz_name =npa_stack_memzone_name (lf, pool_id, name); -return plt_memzone_reserve_cache_align (mz_name, size); +return plt_memzone_reserve_aligned (mz_name, size,0 ,ROC_ALIGN ); } static inline int
PATCH v2 1/1 common/cnxk: align NPA stack to ROC cache line size
In reply to Ashwin Sekhar T KNetwork Pool accelerator (NPA) is part of ROC (Rest Of Chip). So NPA structures should be aligned to ROC Cache line size and not CPU cache line size.
Non alignment of NPA stack to ROC cache line will result in undefined runtime NPA behaviour.
--- drivers/common/cnxk/roc_npa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/common/cnxk/roc_npa.c +1 -1
@@ -194,7 +194,7 @@ npa_stack_dma_alloc(struct npa_lf *lf, char *name, int pool_id, size_t size) {const char *mz_name =npa_stack_memzone_name (lf, pool_id, name); -return plt_memzone_reserve_cache_align (mz_name, size); +return plt_memzone_reserve_aligned (mz_name, size,0 ,ROC_ALIGN ); } static inline int
Signature · 1 line
2.32.0
Jerin Jacob
AppliedRe: [dpdk-dev] [PATCH v2] common/cnxk: align NPA stack to ROC cache line size
Quoted 5 lines · Ashwin Sekhar T K
Network Pool accelerator (NPA) is part of ROC (Rest Of Chip). So NPA structures should be aligned to ROC Cache line size and not CPU cache line size.
Quoted 7 lines
Non alignment of NPA stack to ROC cache line will result in undefined runtime NPA behaviour.
Fixes f765f5611240 ("common/cnxk: add NPA pool HW operations")Signed-off-by Ashwin Sekhar T K <[email protected]>Acked-by Jerin Jacob <[email protected]>
Applied to dpdk-next-net-mrvl/for-next-net. Thanks
Quoted 20 lines
--- drivers/common/cnxk/roc_npa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/common/cnxk/roc_npa.c +1
-2@@ -194,7 +194,7 @@ npa_stack_dma_alloc(struct npa_lf *lf, char *name, int pool_id, size_t size) {const char *mz_name =npa_stack_memzone_name (lf, pool_id, name); -return plt_memzone_reserve_cache_align (mz_name, size); +return plt_memzone_reserve_aligned (mz_name, size,0 ,ROC_ALIGN ); } static inline int --2.32.0