DPDK patches and discussions
 help / color / mirror / Atom feed
From: Akhil Goyal <gakhil@marvell.com>
To: Nagadheeraj Rottela <rnagadheeraj@marvell.com>,
	Nagadheeraj Rottela <rnagadheeraj@marvell.com>,
	Fan Zhang <fanzhang.oss@gmail.com>,
	Ashish Gupta <ashishg@marvell.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [EXT] [PATCH 7/7] compress/nitrox: add stateful request support
Date: Thu, 8 Feb 2024 08:18:15 +0000	[thread overview]
Message-ID: <CO6PR18MB4484B7A19976E213E1A646C9D8442@CO6PR18MB4484.namprd18.prod.outlook.com> (raw)
In-Reply-To: <20231027145534.16803-8-rnagadheeraj@marvell.com>

> Implement enqueue and dequeue burst operations for stateful request
> support.
> 
> Signed-off-by: Nagadheeraj Rottela <rnagadheeraj@marvell.com>
> ---
>  drivers/compress/nitrox/nitrox_comp.c        | 187 +++++--
>  drivers/compress/nitrox/nitrox_comp_reqmgr.c | 555 ++++++++++++++++---
>  drivers/compress/nitrox/nitrox_comp_reqmgr.h |  16 +-
>  3 files changed, 628 insertions(+), 130 deletions(-)
> 
> diff --git a/drivers/compress/nitrox/nitrox_comp.c
> b/drivers/compress/nitrox/nitrox_comp.c
> index cda0633929..ea7a43e432 100644
> --- a/drivers/compress/nitrox/nitrox_comp.c
> +++ b/drivers/compress/nitrox/nitrox_comp.c
> @@ -14,6 +14,8 @@
>  #include "nitrox_qp.h"
> 
>  #define COMPRESSDEV_NAME_NITROX_PMD	compress_nitrox
> +#define NITROX_COMP_WINDOW_SIZE_MIN 1
> +#define NITROX_COMP_WINDOW_SIZE_MAX 15
>  #define NITROX_COMP_LEVEL_LOWEST_START 1
>  #define NITROX_COMP_LEVEL_LOWEST_END 2
>  #define NITROX_COMP_LEVEL_LOWER_START 3
> @@ -49,10 +51,12 @@ static const struct rte_compressdev_capabilities
>  				      RTE_COMP_FF_SHAREABLE_PRIV_XFORM |
>  				      RTE_COMP_FF_OOP_SGL_IN_SGL_OUT |
>  				      RTE_COMP_FF_OOP_SGL_IN_LB_OUT |
> -				      RTE_COMP_FF_OOP_LB_IN_SGL_OUT,
> +				      RTE_COMP_FF_OOP_LB_IN_SGL_OUT |
> +				      RTE_COMP_FF_STATEFUL_COMPRESSION |
> +
> RTE_COMP_FF_STATEFUL_DECOMPRESSION,
>  		.window_size = {
> -			.min = 1,
> -			.max = 15,
> +			.min = NITROX_COMP_WINDOW_SIZE_MIN,
> +			.max = NITROX_COMP_WINDOW_SIZE_MAX,
>  			.increment = 1
>  		},
>  	},
> @@ -64,6 +68,8 @@ static int nitrox_comp_dev_configure(struct
> rte_compressdev *dev,
>  {
>  	struct nitrox_comp_device *comp_dev = dev->data->dev_private;
>  	struct nitrox_device *ndev = comp_dev->ndev;
> +	uint32_t xform_cnt;
> +	char name[RTE_MEMPOOL_NAMESIZE];
> 
>  	if (config->nb_queue_pairs > ndev->nr_queues) {
>  		NITROX_LOG(ERR, "Invalid queue pairs, max supported %d\n",
> @@ -71,21 +77,21 @@ static int nitrox_comp_dev_configure(struct
> rte_compressdev *dev,
>  		return -EINVAL;
>  	}
> 
> -	if (config->max_nb_priv_xforms) {
> -		char xform_name[RTE_MEMPOOL_NAMESIZE];
> -
> -		snprintf(xform_name, sizeof(xform_name), "%s_xform",
> -			 dev->data->name);
> -		comp_dev->xform_pool = rte_mempool_create(xform_name,
> -				config->max_nb_priv_xforms,
> -				sizeof(struct nitrox_comp_xform),
> -				0, 0, NULL, NULL, NULL, NULL,
> -				config->socket_id, 0);
> -		if (comp_dev->xform_pool == NULL) {
> -			NITROX_LOG(ERR, "Failed to create xform pool, err
> %d\n",
> -				   rte_errno);
> -			return -rte_errno;
> -		}
> +	xform_cnt = config->max_nb_priv_xforms + config->max_nb_streams;
> +	if (unlikely(xform_cnt == 0)) {
> +		NITROX_LOG(ERR, "Invalid configuration with 0 xforms\n");
> +		return -EINVAL;
> +	}
> +
> +	snprintf(name, sizeof(name), "%s_xform", dev->data->name);
> +	comp_dev->xform_pool = rte_mempool_create(name,
> +			xform_cnt, sizeof(struct nitrox_comp_xform),
> +			0, 0, NULL, NULL, NULL, NULL,
> +			config->socket_id, 0);
> +	if (comp_dev->xform_pool == NULL) {
> +		NITROX_LOG(ERR, "Failed to create xform pool, err %d\n",
> +			   rte_errno);
> +		return -rte_errno;
>  	}
> 
>  	return 0;
> @@ -257,7 +263,7 @@ static int nitrox_comp_private_xform_create(struct
> rte_compressdev *dev,
>  					    void **private_xform)
>  {
>  	struct nitrox_comp_device *comp_dev = dev->data->dev_private;
> -	struct nitrox_comp_xform *nitrox_xform;
> +	struct nitrox_comp_xform *nxform;

nitrox_xform is added in this patchset only.
It would be better to rename it in the original patch where it is introduced.
This would reduce the change in the subsequent patches.

      reply	other threads:[~2024-02-08  8:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-27 14:55 [PATCH 0/7] add Nitrox compress device support Nagadheeraj Rottela
2023-10-27 14:55 ` [PATCH 1/7] crypto/nitrox: move nitrox common code to common folder Nagadheeraj Rottela
2023-10-27 14:55 ` [PATCH 2/7] compress/nitrox: add nitrox compressdev driver Nagadheeraj Rottela
2024-02-08  7:59   ` [EXT] " Akhil Goyal
2023-10-27 14:55 ` [PATCH 3/7] common/nitrox: add compress hardware queue management Nagadheeraj Rottela
2023-10-27 14:55 ` [PATCH 4/7] crypto/nitrox: set queue type during queue pair setup Nagadheeraj Rottela
2023-10-27 14:55 ` [PATCH 5/7] compress/nitrox: add software queue management Nagadheeraj Rottela
2023-10-27 14:55 ` [PATCH 6/7] compress/nitrox: add stateless request support Nagadheeraj Rottela
2023-10-27 14:55 ` [PATCH 7/7] compress/nitrox: add stateful " Nagadheeraj Rottela
2024-02-08  8:18   ` Akhil Goyal [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CO6PR18MB4484B7A19976E213E1A646C9D8442@CO6PR18MB4484.namprd18.prod.outlook.com \
    --to=gakhil@marvell.com \
    --cc=ashishg@marvell.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=rnagadheeraj@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).