DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] common/cnxk: add flag for enabling opaque mode
@ 2025-03-04  5:25 Nawal Kishor
  2025-04-01  9:50 ` Jerin Jacob
  0 siblings, 1 reply; 2+ messages in thread
From: Nawal Kishor @ 2025-03-04  5:25 UTC (permalink / raw)
  To: dev, Nithin Kumar Dabilpuram, Kiran Kumar K, Sunil Kumar Kori,
	Satha Rao, Harman Kalra
  Cc: jerinj, asekhar, Nawal Kishor

Added flag that overrides the default natural alignment mode and uses
opaque mode.

Signed-off-by: Nawal Kishor <nkishor@marvell.com>
---
 drivers/common/cnxk/roc_npa.c | 3 +++
 drivers/common/cnxk/roc_npa.h | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index a33f9a8499..d5ebfbfc11 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -669,6 +669,9 @@ roc_npa_pool_create(uint64_t *aura_handle, uint32_t block_size,
 		pool = &defpool;
 	}
 
+	if (flags & ROC_NPA_FORCE_OPAQUE_MODE_F)
+		pool->nat_align = 0;
+
 	rc = npa_aura_pool_pair_alloc(lf, block_size, block_count, aura, pool,
 				      aura_handle, flags);
 	if (rc) {
diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h
index 8525038810..853c0fed43 100644
--- a/drivers/common/cnxk/roc_npa.h
+++ b/drivers/common/cnxk/roc_npa.h
@@ -767,7 +767,8 @@ int __roc_api roc_npa_dev_init(struct roc_npa *roc_npa);
 int __roc_api roc_npa_dev_fini(struct roc_npa *roc_npa);
 
 /* Flags to pool create */
-#define ROC_NPA_ZERO_AURA_F BIT(0)
+#define ROC_NPA_ZERO_AURA_F	    BIT(0)
+#define ROC_NPA_FORCE_OPAQUE_MODE_F BIT(1)
 
 /* Enumerations */
 enum roc_npa_buf_type {
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] common/cnxk: add flag for enabling opaque mode
  2025-03-04  5:25 [PATCH] common/cnxk: add flag for enabling opaque mode Nawal Kishor
@ 2025-04-01  9:50 ` Jerin Jacob
  0 siblings, 0 replies; 2+ messages in thread
From: Jerin Jacob @ 2025-04-01  9:50 UTC (permalink / raw)
  To: Nawal Kishor, dev, Nithin Kumar Dabilpuram,
	Kiran Kumar Kokkilagadda, Sunil Kumar Kori,
	Satha Koteswara Rao Kottidi, Harman Kalra
  Cc: Ashwin Sekhar T K, Nawal Kishor



> -----Original Message-----
> From: Nawal Kishor <nkishor@marvell.com>
> Sent: Tuesday, March 4, 2025 10:55 AM
> To: dev@dpdk.org; Nithin Kumar Dabilpuram <ndabilpuram@marvell.com>;
> Kiran Kumar Kokkilagadda <kirankumark@marvell.com>; Sunil Kumar Kori
> <skori@marvell.com>; Satha Koteswara Rao Kottidi
> <skoteshwar@marvell.com>; Harman Kalra <hkalra@marvell.com>
> Cc: Jerin Jacob <jerinj@marvell.com>; Ashwin Sekhar T K
> <asekhar@marvell.com>; Nawal Kishor <nkishor@marvell.com>
> Subject: [PATCH] common/cnxk: add flag for enabling opaque mode
> 
> Added flag that overrides the default natural alignment mode and uses opaque
> mode.
> 
> Signed-off-by: Nawal Kishor <nkishor@marvell.com>

Updated the git commit as follows and applied to dpdk-next-net-mrvl/for-main. Thanks

    common/cnxk: support enabling opaque mode

    Added flag that overrides the default natural alignment mode and uses
    opaque mode.

    Signed-off-by: Nawal Kishor <nkishor@marvell.com>


> ---
>  drivers/common/cnxk/roc_npa.c | 3 +++
>  drivers/common/cnxk/roc_npa.h | 3 ++-
>  2 files changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
> index a33f9a8499..d5ebfbfc11 100644
> --- a/drivers/common/cnxk/roc_npa.c
> +++ b/drivers/common/cnxk/roc_npa.c
> @@ -669,6 +669,9 @@ roc_npa_pool_create(uint64_t *aura_handle, uint32_t
> block_size,
>  		pool = &defpool;
>  	}
> 
> +	if (flags & ROC_NPA_FORCE_OPAQUE_MODE_F)
> +		pool->nat_align = 0;
> +
>  	rc = npa_aura_pool_pair_alloc(lf, block_size, block_count, aura, pool,
>  				      aura_handle, flags);
>  	if (rc) {
> diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h
> index 8525038810..853c0fed43 100644
> --- a/drivers/common/cnxk/roc_npa.h
> +++ b/drivers/common/cnxk/roc_npa.h
> @@ -767,7 +767,8 @@ int __roc_api roc_npa_dev_init(struct roc_npa
> *roc_npa);  int __roc_api roc_npa_dev_fini(struct roc_npa *roc_npa);
> 
>  /* Flags to pool create */
> -#define ROC_NPA_ZERO_AURA_F BIT(0)
> +#define ROC_NPA_ZERO_AURA_F	    BIT(0)
> +#define ROC_NPA_FORCE_OPAQUE_MODE_F BIT(1)
> 
>  /* Enumerations */
>  enum roc_npa_buf_type {
> --
> 2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-04-01  9:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-04  5:25 [PATCH] common/cnxk: add flag for enabling opaque mode Nawal Kishor
2025-04-01  9:50 ` Jerin Jacob

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).