From: "Cabiddu, Giovanni" <giovanni.cabiddu@intel.com>
To: Chen Ni <nichen@iscas.ac.cn>
Cc: <herbert@gondor.apana.org.au>, <davem@davemloft.net>,
<markas.rapoportas@intel.com>, <ahsan.atta@intel.com>,
<mun.chun.yep@intel.com>, <xin.zeng@intel.com>,
<qat-linux@intel.com>, <linux-crypto@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] crypto: qat - add check for adf_cfg_add_key_value_param
Date: Tue, 11 Jun 2024 12:23:59 +0100 [thread overview]
Message-ID: <Zmgzz98P24EU/p9y@gcabiddu-mobl.ger.corp.intel.com> (raw)
In-Reply-To: <20240605031835.2916052-1-nichen@iscas.ac.cn>
On Wed, Jun 05, 2024 at 11:18:35AM +0800, Chen Ni wrote:
> Add check for the return value of adf_cfg_add_key_value_param() and
> return the error if it fails in order to catch the error.
>
> Fixes: 4469f9b23468 ("crypto: qat - re-enable sriov after pf reset")
> Signed-off-by: Chen Ni <nichen@iscas.ac.cn>
> ---
> drivers/crypto/intel/qat/qat_common/adf_sriov.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/crypto/intel/qat/qat_common/adf_sriov.c b/drivers/crypto/intel/qat/qat_common/adf_sriov.c
> index 8d645e7e04aa..30ff9097f527 100644
> --- a/drivers/crypto/intel/qat/qat_common/adf_sriov.c
> +++ b/drivers/crypto/intel/qat/qat_common/adf_sriov.c
> @@ -228,8 +228,10 @@ int adf_sriov_configure(struct pci_dev *pdev, int numvfs)
> return ret;
>
> val = 1;
> - adf_cfg_add_key_value_param(accel_dev, ADF_GENERAL_SEC, ADF_SRIOV_ENABLED,
> + ret = adf_cfg_add_key_value_param(accel_dev, ADF_GENERAL_SEC, ADF_SRIOV_ENABLED,
> &val, ADF_DEC);
> + if (ret)
> + return ret;
This has the side effect of failing the enablement of VFs for QAT GEN2 as
ADF_GENERAL_SEC is not present.
For GEN4, where ADF_GENERAL_SEC is used, if this function fails, the recovery
paths is not going to re-enable SRIOV VFs after reset.
It is ok to omit this check.
Regards,
--
Giovanni
prev parent reply other threads:[~2024-06-11 11:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-05 3:18 Chen Ni
2024-06-11 11:23 ` Cabiddu, Giovanni [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=Zmgzz98P24EU/p9y@gcabiddu-mobl.ger.corp.intel.com \
--to=giovanni.cabiddu@intel.com \
--cc=ahsan.atta@intel.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markas.rapoportas@intel.com \
--cc=mun.chun.yep@intel.com \
--cc=nichen@iscas.ac.cn \
--cc=qat-linux@intel.com \
--cc=xin.zeng@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
all inboxes | Powered by JetHome®