From: "Wan, Siming" <siming.wan@intel.com>
To: Kamlesh Gurudasani <kamlesh@ti.com>,
"Zeng, Xin" <xin.zeng@intel.com>,
"herbert@gondor.apana.org.au" <herbert@gondor.apana.org.au>,
"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
"jgg@nvidia.com" <jgg@nvidia.com>,
"yishaih@nvidia.com" <yishaih@nvidia.com>,
"shameerali.kolothum.thodi@huawei.com"
<shameerali.kolothum.thodi@huawei.com>,
"Tian, Kevin" <kevin.tian@intel.com>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
qat-linux <qat-linux@intel.com>, "Zeng, Xin" <xin.zeng@intel.com>
Subject: RE: [EXTERNAL] [PATCH 07/10] crypto: qat - add bank save and restore flows
Date: Mon, 19 Feb 2024 03:41:04 +0000 [thread overview]
Message-ID: <DM8PR11MB56875F986E6BC02D408CB4708E512@DM8PR11MB5687.namprd11.prod.outlook.com> (raw)
In-Reply-To: <87o7cwzn1t.fsf@kamlesh.i-did-not-set--mail-host-address--so-tickle-me>
From: Kamlesh Gurudasani <kamlesh@ti.com>
Sent: Sunday, February 4, 2024 3:50 PM
To: Zeng, Xin <xin.zeng@intel.com>; herbert@gondor.apana.org.au; alex.williamson@redhat.com; jgg@nvidia.com; yishaih@nvidia.com; shameerali.kolothum.thodi@huawei.com; Tian, Kevin <kevin.tian@intel.com>
Cc: linux-crypto@vger.kernel.org; kvm@vger.kernel.org; qat-linux <qat-linux@intel.com>; Wan, Siming <siming.wan@intel.com>; Zeng, Xin <xin.zeng@intel.com>
Subject: Re: [EXTERNAL] [PATCH 07/10] crypto: qat - add bank save and restore flows
Xin Zeng <xin.zeng@intel.com> writes:
> This message was sent from outside of Texas Instruments.
> Do not click links or open attachments unless you recognize the source of this email and know the content is safe.
>
> From: Siming Wan <siming.wan@intel.com>
>
> Add logic to save, restore, quiesce and drain a ring bank for QAT GEN4
> devices.
> This allows to save and restore the state of a Virtual Function (VF)
> and will be used to implement VM live migration.
>
> Signed-off-by: Siming Wan <siming.wan@intel.com>
> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> Reviewed-by: Xin Zeng <xin.zeng@intel.com>
> Signed-off-by: Xin Zeng <xin.zeng@intel.com>
...
> +#define CHECK_STAT(op, expect_val, name, args...) \ ({ \
> + u32 __expect_val = (expect_val); \
> + u32 actual_val = op(args); \
> + if (__expect_val != actual_val) \
> + pr_err("QAT: Fail to restore %s register. Expected 0x%x, but actual is 0x%x\n", \
> + name, __expect_val, actual_val); \
> + (__expect_val == actual_val) ? 0 : -EINVAL; \
I was wondering if this can be done like following, saves repeat comparison.
(__expect_val == actual_val) ? 0 : (pr_err("QAT: Fail to restore %s \
register. Expected 0x%x, \
but actual is 0x%x\n", \
name, __expect_val, \
actual_val), -EINVAL); \ Regards, Kamlesh
> +})
...
Thanks for your comments! Will update.
next prev parent reply other threads:[~2024-02-19 3:41 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 15:33 [PATCH 00/10] crypto: qat - enable SRIOV VF live migration for Xin Zeng
2024-02-01 15:33 ` [PATCH 01/10] crypto: qat - adf_get_etr_base() helper Xin Zeng
2024-02-01 15:33 ` [PATCH 02/10] crypto: qat - relocate and rename 4xxx PF2VM definitions Xin Zeng
2024-02-01 15:33 ` [PATCH 03/10] crypto: qat - move PFVF compat checker to a function Xin Zeng
2024-02-01 15:33 ` [PATCH 04/10] crypto: qat - relocate CSR access code Xin Zeng
2024-02-01 15:33 ` [PATCH 05/10] crypto: qat - rename get_sla_arr_of_type() Xin Zeng
2024-02-01 15:33 ` [PATCH 06/10] crypto: qat - expand CSR operations for QAT GEN4 devices Xin Zeng
2024-02-01 15:33 ` [PATCH 07/10] crypto: qat - add bank save and restore flows Xin Zeng
2024-02-04 7:49 ` [EXTERNAL] " Kamlesh Gurudasani
2024-02-19 3:41 ` Wan, Siming [this message]
2024-02-01 15:33 ` [PATCH 08/10] crypto: qat - add interface for live migration Xin Zeng
2024-02-01 15:33 ` [PATCH 09/10] crypto: qat - implement " Xin Zeng
2024-02-01 15:33 ` [PATCH 10/10] vfio/qat: Add vfio_pci driver for Intel QAT VF devices Xin Zeng
2024-02-06 12:55 ` Jason Gunthorpe
2024-02-09 8:23 ` Zeng, Xin
2024-02-09 12:10 ` Jason Gunthorpe
2024-02-11 8:17 ` Yishai Hadas
2024-02-17 16:20 ` Zeng, Xin
2024-02-20 13:24 ` Jason Gunthorpe
2024-02-20 15:53 ` Zeng, Xin
2024-02-20 17:03 ` Jason Gunthorpe
2024-02-21 8:44 ` Zeng, Xin
2024-02-21 13:18 ` Jason Gunthorpe
2024-02-21 15:11 ` Yishai Hadas
2024-02-22 9:39 ` Yishai Hadas
2024-02-06 21:14 ` Alex Williamson
2024-02-09 16:16 ` Zeng, Xin
2024-02-08 12:17 ` Shameerali Kolothum Thodi
2024-02-13 13:08 ` Zeng, Xin
2024-02-13 14:55 ` Jason Gunthorpe
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=DM8PR11MB56875F986E6BC02D408CB4708E512@DM8PR11MB5687.namprd11.prod.outlook.com \
--to=siming.wan@intel.com \
--cc=alex.williamson@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=jgg@nvidia.com \
--cc=kamlesh@ti.com \
--cc=kevin.tian@intel.com \
--cc=kvm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=qat-linux@intel.com \
--cc=shameerali.kolothum.thodi@huawei.com \
--cc=xin.zeng@intel.com \
--cc=yishaih@nvidia.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).