DPDK patches and discussions
 help / color / mirror / Atom feed
From: Maxime Coquelin <maxime.coquelin@redhat.com>
To: Nicolas Chautru <nicolas.chautru@intel.com>, dev@dpdk.org
Cc: trix@redhat.com, hemant.agrawal@nxp.com,
	david.marchand@redhat.com, hernan.vargas@intel.com
Subject: Re: [PATCH v2 4/5] bbdev: improving error handling for queue configuration
Date: Mon, 18 Sep 2023 17:20:48 +0200	[thread overview]
Message-ID: <7e403933-adb1-2674-7030-62cbb9587dc9@redhat.com> (raw)
In-Reply-To: <20230615164901.40845-5-nicolas.chautru@intel.com>



On 6/15/23 18:49, Nicolas Chautru wrote:
> Refactor of the error handling based on available priority
> queue to be more generic.
> 
> Signed-off-by: Nicolas Chautru <nicolas.chautru@intel.com>
> ---
>   lib/bbdev/rte_bbdev.c | 15 ++++++---------
>   1 file changed, 6 insertions(+), 9 deletions(-)
> 
> diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
> index 26fc077bdc..589b796ea3 100644
> --- a/lib/bbdev/rte_bbdev.c
> +++ b/lib/bbdev/rte_bbdev.c
> @@ -441,6 +441,7 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
>   	const struct rte_bbdev_op_cap *p;
>   	struct rte_bbdev_queue_conf *stored_conf;
>   	const char *op_type_str;
> +	unsigned int max_priority;
>   	VALID_DEV_OR_RET_ERR(dev, dev_id);
>   
>   	VALID_DEV_OPS_OR_RET_ERR(dev, dev_id);
> @@ -494,20 +495,16 @@ rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
>   					conf->queue_size, queue_id, dev_id);
>   			return -EINVAL;
>   		}
> -		if (conf->op_type == RTE_BBDEV_OP_TURBO_DEC &&
> -			conf->priority > dev_info.max_ul_queue_priority) {
> +		if ((uint8_t)conf->op_type >= RTE_BBDEV_OP_TYPE_SIZE_MAX) {
>   			rte_bbdev_log(ERR,
> -					"Priority (%u) of queue %u of bbdev %u must be <= %u",
> -					conf->priority, queue_id, dev_id,
> -					dev_info.max_ul_queue_priority);
> +					"Invalid operation type (%u) ", conf->op_type);
>   			return -EINVAL;
>   		}
> -		if (conf->op_type == RTE_BBDEV_OP_TURBO_ENC &&
> -			conf->priority > dev_info.max_dl_queue_priority) {
> +		max_priority = dev_info.queue_priority[conf->op_type];
> +		if (conf->priority > max_priority) {
>   			rte_bbdev_log(ERR,
>   					"Priority (%u) of queue %u of bbdev %u must be <= %u",
> -					conf->priority, queue_id, dev_id,
> -					dev_info.max_dl_queue_priority);
> +					conf->priority, queue_id, dev_id, max_priority);
>   			return -EINVAL;
>   		}
>   	}

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Maxime


  reply	other threads:[~2023-09-18 15:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 16:48 [PATCH v2 0/5] bbdev: API extension for 23.11 Nicolas Chautru
2023-06-15 16:48 ` [PATCH v2 1/5] bbdev: add operation type for MLDTS procession Nicolas Chautru
2023-09-18 15:03   ` Maxime Coquelin
2023-06-15 16:48 ` [PATCH v2 2/5] bbdev: add new capabilities for FFT processing Nicolas Chautru
2023-09-18 15:08   ` Maxime Coquelin
2023-09-18 15:42     ` Maxime Coquelin
2023-09-18 20:50       ` Chautru, Nicolas
2023-06-15 16:48 ` [PATCH v2 3/5] bbdev: add new capability for FEC 5G UL processing Nicolas Chautru
2023-09-18 15:09   ` Maxime Coquelin
2023-06-15 16:49 ` [PATCH v2 4/5] bbdev: improving error handling for queue configuration Nicolas Chautru
2023-09-18 15:20   ` Maxime Coquelin [this message]
2023-06-15 16:49 ` [PATCH v2 5/5] devtools: ignore changes into bbdev experimental API Nicolas Chautru
2023-09-06  6:17   ` Hemant Agrawal
2023-09-12 20:32     ` Vargas, Hernan
2023-09-13  9:31       ` Hemant Agrawal
2023-09-18 15:22   ` Maxime Coquelin
2023-07-17 22:28 ` [PATCH v2 0/5] bbdev: API extension for 23.11 Chautru, Nicolas
2023-08-04 16:14   ` Vargas, Hernan
2023-09-05 17:48     ` Chautru, Nicolas
2023-07-18  9:18 ` Hemant Agrawal
2023-09-06  6:20 ` Hemant Agrawal
2023-09-21  7:35 ` Maxime Coquelin

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=7e403933-adb1-2674-7030-62cbb9587dc9@redhat.com \
    --to=maxime.coquelin@redhat.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=hemant.agrawal@nxp.com \
    --cc=hernan.vargas@intel.com \
    --cc=nicolas.chautru@intel.com \
    --cc=trix@redhat.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).