DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Power, Ciara" <ciara.power@intel.com>
To: "Kusztal, ArkadiuszX" <arkadiuszx.kusztal@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Cc: "gakhil@marvell.com" <gakhil@marvell.com>, "Ji, Kai" <kai.ji@intel.com>
Subject: RE: [PATCH 1/3] common/qat: limit configuration to the primary process
Date: Mon, 18 Sep 2023 15:07:19 +0000	[thread overview]
Message-ID: <SN7PR11MB76395F331050ADA54636FCCFE6FBA@SN7PR11MB7639.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20230917154258.3509805-1-arkadiuszx.kusztal@intel.com>

Hi Arek,

> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Sunday, September 17, 2023 4:43 PM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Ji, Kai <kai.ji@intel.com>; Power, Ciara
> <ciara.power@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH 1/3] common/qat: limit configuration to the primary process
> 
> This change prevents certain configuration functions from being called by the
> secondary process.
> 
> Signed-off-by: Arkadiusz Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  drivers/common/qat/qat_device.c | 113 +++++++++++++++++++++++-------
> ----------
>  drivers/common/qat/qat_device.h |   2 +
>  2 files changed, 66 insertions(+), 49 deletions(-)
> 
<snip>
> +static enum qat_device_gen
> +pick_gen(struct rte_pci_device *pci_dev) {
> +	switch (pci_dev->id.device_id) {
> +	case 0x0443:
> +		return QAT_GEN1;
> +	case 0x37c9:
> +	case 0x19e3:
> +	case 0x6f55:
> +	case 0x18ef:
> +		return QAT_GEN2;
> +	case 0x18a1:
> +		return QAT_GEN3;
> +	case 0x4941:
> +	case 0x4943:
> +		return QAT_GEN4;
> +	default:
> +		QAT_LOG(ERR, "Invalid dev_id, can't determine generation");
> +		return QAT_N_GENS;
> +	}
> +}
> +
>  struct qat_pci_device *
>  qat_pci_device_allocate(struct rte_pci_device *pci_dev,
>  		struct qat_dev_cmd_param *qat_dev_cmd_param) @@ -
> 187,24 +218,8 @@ qat_pci_device_allocate(struct rte_pci_device *pci_dev,
>  	rte_pci_device_name(&pci_dev->addr, name, sizeof(name));
>  	snprintf(name+strlen(name), QAT_DEV_NAME_MAX_LEN-
> strlen(name), "_qat");
> 
> -	switch (pci_dev->id.device_id) {
> -	case 0x0443:
> -		qat_dev_gen = QAT_GEN1;
> -		break;
> -	case 0x37c9:
> -	case 0x19e3:
> -	case 0x6f55:
> -	case 0x18ef:
> -		qat_dev_gen = QAT_GEN2;
> -		break;
> -	case 0x18a1:
> -		qat_dev_gen = QAT_GEN3;
> -		break;
> -	case 0x4941:
> -	case 0x4943:
> -		qat_dev_gen = QAT_GEN4;
> -		break;
> -	default:
> +	qat_dev_gen = pick_gen(pci_dev);
> +	if (qat_dev_gen == QAT_N_GENS) {
>  		QAT_LOG(ERR, "Invalid dev_id, can't determine generation");
>  		return NULL;
>  	}

The above log is duplicated, once in pick_gen() and once here.

> @@ -261,20 +276,15 @@ qat_pci_device_allocate(struct rte_pci_device
> *pci_dev,
>  	qat_dev->dev_private = qat_dev + 1;
>  	strlcpy(qat_dev->name, name, QAT_DEV_NAME_MAX_LEN);
>  	qat_dev->qat_dev_id = qat_dev_id;
> -	qat_pci_devs[qat_dev_id].pci_dev = pci_dev;
>  	qat_dev->qat_dev_gen = qat_dev_gen;
> 
>  	ops_hw = qat_dev_hw_spec[qat_dev->qat_dev_gen];
> -	if (ops_hw->qat_dev_get_misc_bar == NULL) {
> -		QAT_LOG(ERR, "qat_dev_get_misc_bar function pointer not
> set");
> -		rte_memzone_free(qat_dev_mz);
> -		return NULL;
> -	}
> +	NOT_NULL(ops_hw->qat_dev_reset_ring_pairs, goto error,
> +		"QAT internal error! qat_dev_get_misc_bar function not set");

This check should be for ops_hw->qat_dev_get_misc_bar as mentioned in log.

Thanks,
Ciara

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-17 15:42 Arkadiusz Kusztal
2023-09-17 15:42 ` [PATCH 2/3] common/qat: move command line params to the device struct Arkadiusz Kusztal
2023-09-18 16:01   ` Power, Ciara
2023-09-17 15:42 ` [PATCH 3/3] common/qat: decouple pmds from the common code Arkadiusz Kusztal
2023-10-06 12:50   ` Power, Ciara
2023-10-06 13:02   ` Power, Ciara
2024-02-23  7:48   ` [PATCH v2 1/2] drivers/qat: isolate parser arguments configuration Arkadiusz Kusztal
2024-02-23  7:48     ` [PATCH v2 2/2] common/qat: decouple pmds from the common code Arkadiusz Kusztal
2024-02-29  9:30     ` [PATCH v3 1/3] common/qat: isolate parser arguments configuration Arkadiusz Kusztal
2024-02-29  9:30       ` [PATCH v3 2/3] common/qat: decouple pmds from the common code Arkadiusz Kusztal
2024-02-29  9:30       ` [PATCH v3 3/3] common/qat: fix incorrectly placed legacy flag Arkadiusz Kusztal
2023-09-18 15:07 ` Power, Ciara [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=SN7PR11MB76395F331050ADA54636FCCFE6FBA@SN7PR11MB7639.namprd11.prod.outlook.com \
    --to=ciara.power@intel.com \
    --cc=arkadiuszx.kusztal@intel.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=kai.ji@intel.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).