[v0,1/1] common/cnxk: fix DPI mailbox structure

Message ID 20250115123654.1490937-1-vattunuru@marvell.com (mailing list archive)
State Accepted
Delegated to: Jerin Jacob
Headers
Series [v0,1/1] common/cnxk: fix DPI mailbox structure |

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

Commit Message

Vamsi Krishna Jan. 15, 2025, 12:36 p.m. UTC
From: Vamsi Attunuru <vattunuru@marvell.com>

In the existing DPI mailbox structure, one of the fields
spans a 64-bit boundary, making it appear unusual and
complicatng extraction using bit operations.

Patch enlarges csize fields to ensure that mailbox fields
are correctly positioned.

Fixes: b6e395692b6d ("common/cnxk: add DPI DMA support")

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
---
 drivers/common/cnxk/roc_dpi_priv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jerin Jacob Jan. 24, 2025, 7:20 a.m. UTC | #1
> -----Original Message-----
> From: Vamsi Krishna <vattunuru@marvell.com>
> Sent: Wednesday, January 15, 2025 6:07 PM
> To: dev@dpdk.org
> Cc: Jerin Jacob <jerinj@marvell.com>; Vamsi Krishna Attunuru
> <vattunuru@marvell.com>
> Subject: [PATCH v0 1/1] common/cnxk: fix DPI mailbox structure
> 
> From: Vamsi Attunuru <vattunuru@marvell.com>
> 
> In the existing DPI mailbox structure, one of the fields spans a 64-bit boundary,
> making it appear unusual and complicatng extraction using bit operations.
> 
> Patch enlarges csize fields to ensure that mailbox fields are correctly positioned.
> 
> Fixes: b6e395692b6d ("common/cnxk: add DPI DMA support")
> 
> Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>

Applied to dpdk-next-net-mrvl/for-main. Thanks

> ---
>  drivers/common/cnxk/roc_dpi_priv.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/common/cnxk/roc_dpi_priv.h
> b/drivers/common/cnxk/roc_dpi_priv.h
> index 1f975915f7..05b6751ca6 100644
> --- a/drivers/common/cnxk/roc_dpi_priv.h
> +++ b/drivers/common/cnxk/roc_dpi_priv.h
> @@ -27,7 +27,7 @@ typedef union dpi_mbox_msg_t {
>  		/* Command code */
>  		uint64_t cmd : 4;
>  		/* Command buffer size in 8-byte words */
> -		uint64_t csize : 14;
> +		uint64_t csize : 16;
>  		/* aura of the command buffer */
>  		uint64_t aura : 20;
>  		/* SSO PF function */
> --
> 2.34.1
  

Patch

diff --git a/drivers/common/cnxk/roc_dpi_priv.h b/drivers/common/cnxk/roc_dpi_priv.h
index 1f975915f7..05b6751ca6 100644
--- a/drivers/common/cnxk/roc_dpi_priv.h
+++ b/drivers/common/cnxk/roc_dpi_priv.h
@@ -27,7 +27,7 @@  typedef union dpi_mbox_msg_t {
 		/* Command code */
 		uint64_t cmd : 4;
 		/* Command buffer size in 8-byte words */
-		uint64_t csize : 14;
+		uint64_t csize : 16;
 		/* aura of the command buffer */
 		uint64_t aura : 20;
 		/* SSO PF function */