common/qat: enable gen4 c devices

Message ID 20230811123833.3114791-1-ciara.power@intel.com (mailing list archive)
State Superseded, archived
Delegated to: akhil goyal
Headers
Series common/qat: enable gen4 c devices |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-compile-amd64-testing success Testing PASS

Commit Message

Power, Ciara Aug. 11, 2023, 12:38 p.m. UTC
  This commit enables QAT 2.0c devices in the
Intel QuickAssist Technology PMD.

Signed-off-by: Ciara Power <ciara.power@intel.com>
---
 doc/guides/cryptodevs/qat.rst          | 4 ++++
 doc/guides/rel_notes/release_23_11.rst | 3 +++
 drivers/common/qat/qat_device.c        | 4 ++++
 3 files changed, 11 insertions(+)
  

Comments

David Marchand Aug. 11, 2023, 1:40 p.m. UTC | #1
Hello Ciara,

On Fri, Aug 11, 2023 at 2:38 PM Ciara Power <ciara.power@intel.com> wrote:
>
> This commit enables QAT 2.0c devices in the
> Intel QuickAssist Technology PMD.

It is hard to make a link between the commit title "gen 4 c devices",
the table below "402xxx" and the release notes "QAT 2.0c".
Can you use a single designation of this new device?


>
> Signed-off-by: Ciara Power <ciara.power@intel.com>
> ---
>  doc/guides/cryptodevs/qat.rst          | 4 ++++
>  doc/guides/rel_notes/release_23_11.rst | 3 +++
>  drivers/common/qat/qat_device.c        | 4 ++++
>  3 files changed, 11 insertions(+)
>
> diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
> index afdfb0bd22..fc5a212d00 100644
> --- a/doc/guides/cryptodevs/qat.rst
> +++ b/doc/guides/cryptodevs/qat.rst
> @@ -457,6 +457,10 @@ to see the full table)
>     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
>     | Yes | No  | No  | 4   | 401xxx   | IDZ/ N/A      | qat_401xxx    | 4xxx       | 4942   | 2    | 4943   | 16     |
>     +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
> +   | Yes | Yes | Yes | 4   | 402xxx   | linux/6.4+    | qat_402xxx    | 4xxx       | 4944   | 2    | 4945   | 16     |
> +   +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
> +   | Yes | No  | No  | 4   | 402xxx   | IDZ/ N/A      | qat_402xxx    | 4xxx       | 4944   | 2    | 4945   | 16     |
> +   +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+

Is there such a kernel module named qat_402xxx upstream?
I can only find qat_4xxx.


>
>  * Note: Symmetric mixed crypto algorithms feature on Gen 2 works only with IDZ driver version 4.9.0+
>
> diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst
> index 4411bb32c1..3bdd51a4a5 100644
> --- a/doc/guides/rel_notes/release_23_11.rst
> +++ b/doc/guides/rel_notes/release_23_11.rst
> @@ -72,6 +72,9 @@ New Features
>       Also, make sure to start the actual text at the margin.
>       =======================================================
>
> +* **Added support for QAT 2.0c devices to Intel QuickAssist Technology PMD.**
> +
> +  * QAT 2.0c (4944) devices are now enabled for QAT.

Missing an empty line.

>
>  Removed Items
>  -------------
> diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c
> index 2675f0d9d1..cbf1e6a988 100644
> --- a/drivers/common/qat/qat_device.c
> +++ b/drivers/common/qat/qat_device.c
> @@ -50,6 +50,9 @@ static const struct rte_pci_id pci_id_qat_map[] = {
>                 {
>                         RTE_PCI_DEVICE(0x8086, 0x4943),
>                 },
> +               {
> +                       RTE_PCI_DEVICE(0x8086, 0x4945),
> +               },
>                 {.device_id = 0},
>  };
>
> @@ -202,6 +205,7 @@ qat_pci_device_allocate(struct rte_pci_device *pci_dev,
>                 break;
>         case 0x4941:
>         case 0x4943:
> +       case 0x4945:
>                 qat_dev_gen = QAT_GEN4;
>                 break;
>         default:
> --
> 2.25.1
>
  
Power, Ciara Aug. 21, 2023, 9:37 a.m. UTC | #2
Hi David,

> >     +-----+-----+-----+-----+----------+---------------+---------------+------------+---
> -----+------+--------+--------+
> >     | Yes | No  | No  | 4   | 401xxx   | IDZ/ N/A      | qat_401xxx    | 4xxx       |
> 4942   | 2    | 4943   | 16     |
> >
> > +-----+-----+-----+-----+----------+---------------+---------------+--
> > ----------+--------+------+--------+--------+
> > +   | Yes | Yes | Yes | 4   | 402xxx   | linux/6.4+    | qat_402xxx    | 4xxx       |
> 4944   | 2    | 4945   | 16     |
> > +   +-----+-----+-----+-----+----------+---------------+---------------+------------+--
> ------+------+--------+--------+
> > +   | Yes | No  | No  | 4   | 402xxx   | IDZ/ N/A      | qat_402xxx    | 4xxx       |
> 4944   | 2    | 4945   | 16     |
> > +
> > + +-----+-----+-----+-----+----------+---------------+---------------+
> > + ------------+--------+------+--------+--------+
> 
> Is there such a kernel module named qat_402xxx upstream?
> I can only find qat_4xxx.
> 
Good catch, you're right, there is no kernel module 402xxx.
These devices fall under the original 4xxx driver.
Will update here, and send a fix for the 401xxx entry later.

Have sent a v2 addressing the above comments:
https://patches.dpdk.org/project/dpdk/patch/20230821093349.3519591-1-ciara.power@intel.com/

Thanks,
Ciara
  
David Marchand Oct. 11, 2023, 7:50 a.m. UTC | #3
Hello Ciara,

On Mon, Aug 21, 2023 at 11:37 AM Power, Ciara <ciara.power@intel.com> wrote:
> > >     +-----+-----+-----+-----+----------+---------------+---------------+------------+---
> > -----+------+--------+--------+
> > >     | Yes | No  | No  | 4   | 401xxx   | IDZ/ N/A      | qat_401xxx    | 4xxx       |
> > 4942   | 2    | 4943   | 16     |
> > >
> > > +-----+-----+-----+-----+----------+---------------+---------------+--
> > > ----------+--------+------+--------+--------+
> > > +   | Yes | Yes | Yes | 4   | 402xxx   | linux/6.4+    | qat_402xxx    | 4xxx       |
> > 4944   | 2    | 4945   | 16     |
> > > +   +-----+-----+-----+-----+----------+---------------+---------------+------------+--
> > ------+------+--------+--------+
> > > +   | Yes | No  | No  | 4   | 402xxx   | IDZ/ N/A      | qat_402xxx    | 4xxx       |
> > 4944   | 2    | 4945   | 16     |
> > > +
> > > + +-----+-----+-----+-----+----------+---------------+---------------+
> > > + ------------+--------+------+--------+--------+
> >
> > Is there such a kernel module named qat_402xxx upstream?
> > I can only find qat_4xxx.
> >
> Good catch, you're right, there is no kernel module 402xxx.
> These devices fall under the original 4xxx driver.
> Will update here, and send a fix for the 401xxx entry later.

I noticed this patch for 402xxx pulled in the main branch.
Don't forget to send the fix on 401xxx entry please.
  

Patch

diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst
index afdfb0bd22..fc5a212d00 100644
--- a/doc/guides/cryptodevs/qat.rst
+++ b/doc/guides/cryptodevs/qat.rst
@@ -457,6 +457,10 @@  to see the full table)
    +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
    | Yes | No  | No  | 4   | 401xxx   | IDZ/ N/A      | qat_401xxx    | 4xxx       | 4942   | 2    | 4943   | 16     |
    +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
+   | Yes | Yes | Yes | 4   | 402xxx   | linux/6.4+    | qat_402xxx    | 4xxx       | 4944   | 2    | 4945   | 16     |
+   +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
+   | Yes | No  | No  | 4   | 402xxx   | IDZ/ N/A      | qat_402xxx    | 4xxx       | 4944   | 2    | 4945   | 16     |
+   +-----+-----+-----+-----+----------+---------------+---------------+------------+--------+------+--------+--------+
 
 * Note: Symmetric mixed crypto algorithms feature on Gen 2 works only with IDZ driver version 4.9.0+
 
diff --git a/doc/guides/rel_notes/release_23_11.rst b/doc/guides/rel_notes/release_23_11.rst
index 4411bb32c1..3bdd51a4a5 100644
--- a/doc/guides/rel_notes/release_23_11.rst
+++ b/doc/guides/rel_notes/release_23_11.rst
@@ -72,6 +72,9 @@  New Features
      Also, make sure to start the actual text at the margin.
      =======================================================
 
+* **Added support for QAT 2.0c devices to Intel QuickAssist Technology PMD.**
+
+  * QAT 2.0c (4944) devices are now enabled for QAT.
 
 Removed Items
 -------------
diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c
index 2675f0d9d1..cbf1e6a988 100644
--- a/drivers/common/qat/qat_device.c
+++ b/drivers/common/qat/qat_device.c
@@ -50,6 +50,9 @@  static const struct rte_pci_id pci_id_qat_map[] = {
 		{
 			RTE_PCI_DEVICE(0x8086, 0x4943),
 		},
+		{
+			RTE_PCI_DEVICE(0x8086, 0x4945),
+		},
 		{.device_id = 0},
 };
 
@@ -202,6 +205,7 @@  qat_pci_device_allocate(struct rte_pci_device *pci_dev,
 		break;
 	case 0x4941:
 	case 0x4943:
+	case 0x4945:
 		qat_dev_gen = QAT_GEN4;
 		break;
 	default: