Message ID | 20221004095132.198777-1-david.marchand@redhat.com (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 37B23A0543; Tue, 4 Oct 2022 11:51:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D1C9540DFB; Tue, 4 Oct 2022 11:51:48 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 94C3540DDC for <dev@dpdk.org>; Tue, 4 Oct 2022 11:51:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664877107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dfk+v24M6eB2F//Am39to8t9kr8BJD7tPccHQvy/LzM=; b=Ow6+hMhpel3VyjEO1v+UDllYKEkbD5Wzj2Wxid4Exg4tabU5jM8MOrHz4LWCPtsqcfdPp2 SlOi2SsDibPPz2ztR/Z3uXDfxbfGaZZo8XDrmRyACxGRS+1tkAyPQDokn+KzUFgQBIM6aC KsCPLRGtoGEQLblqScled6nXiCYtoCs= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-283-rYiZwKNTN9K9q18w0J38WA-1; Tue, 04 Oct 2022 05:51:44 -0400 X-MC-Unique: rYiZwKNTN9K9q18w0J38WA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A4AD91C07544; Tue, 4 Oct 2022 09:51:43 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.42]) by smtp.corp.redhat.com (Postfix) with ESMTP id DBA29140EBF3; Tue, 4 Oct 2022 09:51:42 +0000 (UTC) From: David Marchand <david.marchand@redhat.com> To: dev@dpdk.org Cc: gakhil@marvell.com, sunilprakashrao.uttarwar@amd.com Subject: [PATCH v2 0/4] crypto/ccp cleanup Date: Tue, 4 Oct 2022 11:51:28 +0200 Message-Id: <20221004095132.198777-1-david.marchand@redhat.com> In-Reply-To: <20220909150411.3702860-1-david.marchand@redhat.com> References: <20220909150411.3702860-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <https://mails.dpdk.org/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://mails.dpdk.org/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <https://mails.dpdk.org/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org |
Series | crypto/ccp cleanup | |
Message
David Marchand
Oct. 4, 2022, 9:51 a.m. UTC
This is a *untested* cleanup series after looking for usage of rte_pci_device objects in DPDK drivers. I can't test those patches by lack of hw, so I hope the driver maintainer can look into them. Thanks.
Comments
Hi Sunil, Please review and ack. Regards, Akhil > This is a *untested* cleanup series after looking for usage of > rte_pci_device objects in DPDK drivers. > I can't test those patches by lack of hw, so I hope the driver maintainer > can look into them. > > Thanks. > -- > David Marchand > > Changes since v1: > - rebased, > - copied new maintainer, > > David Marchand (4): > crypto/ccp: remove some printf > crypto/ccp: remove some dead code for UIO > crypto/ccp: fix IOVA handling > crypto/ccp: fix PCI probing > > drivers/crypto/ccp/ccp_crypto.c | 106 +++----------- > drivers/crypto/ccp/ccp_dev.c | 103 ++----------- > drivers/crypto/ccp/ccp_dev.h | 31 ++-- > drivers/crypto/ccp/ccp_pci.c | 240 ------------------------------- > drivers/crypto/ccp/ccp_pci.h | 27 ---- > drivers/crypto/ccp/meson.build | 1 - > drivers/crypto/ccp/rte_ccp_pmd.c | 23 +-- > 7 files changed, 47 insertions(+), 484 deletions(-) > delete mode 100644 drivers/crypto/ccp/ccp_pci.c > delete mode 100644 drivers/crypto/ccp/ccp_pci.h > > -- > 2.37.3
[Public]
-----Original Message-----
From: David Marchand <david.marchand@redhat.com>
Sent: Tuesday, October 4, 2022 3:21 PM
To: dev@dpdk.org
Cc: gakhil@marvell.com; Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com>
Subject: [PATCH v2 0/4] crypto/ccp cleanup
For this series
Below shared patches seems fine, verified on AMD platform works fine.
crypto/ccp: fix IOVA handling
crypto/ccp: remove some dead code for UIO
crypto/ccp: remove some printf
Now working on the "crypto/ccp: fix PCI probing" patch and will update on this.
Thanks
Sunil
Hi Sunil > For this series > > Below shared patches seems fine, verified on AMD platform works fine. > > crypto/ccp: fix IOVA handling > crypto/ccp: remove some dead code for UIO > crypto/ccp: remove some printf > > Now working on the "crypto/ccp: fix PCI probing" patch and will update on this. > Any update on this? Please provide your ack if no comments.
[Public] Hi Akhil & David, Regarding "crypto/ccp: fix PCI probing" patch, observing some issues while verifying on AMD platform(Floating point exception). It seems there are some issues with this patch. Thanks Sunil -----Original Message----- From: Akhil Goyal <gakhil@marvell.com> Sent: Thursday, October 13, 2022 3:10 PM To: Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com>; David Marchand <david.marchand@redhat.com>; dev@dpdk.org Subject: RE: [PATCH v2 0/4] crypto/ccp cleanup Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. Hi Sunil > For this series > > Below shared patches seems fine, verified on AMD platform works fine. > > crypto/ccp: fix IOVA handling > crypto/ccp: remove some dead code for UIO > crypto/ccp: remove some printf > > Now working on the "crypto/ccp: fix PCI probing" patch and will update on this. > Any update on this? Please provide your ack if no comments.
Hello, On Mon, Oct 17, 2022 at 3:42 PM Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> wrote: > > [Public] > > Hi Akhil & David, > > Regarding "crypto/ccp: fix PCI probing" patch, observing some issues while verifying on AMD platform(Floating point exception). > > It seems there are some issues with this patch. Thanks for testing. Can you provide a backtrace?
On Mon, Oct 17, 2022 at 3:53 PM David Marchand <david.marchand@redhat.com> wrote: > On Mon, Oct 17, 2022 at 3:42 PM Uttarwar, Sunil Prakashrao > <SunilPrakashrao.Uttarwar@amd.com> wrote: > > > > [Public] > > > > Hi Akhil & David, > > > > Regarding "crypto/ccp: fix PCI probing" patch, observing some issues while verifying on AMD platform(Floating point exception). > > > > It seems there are some issues with this patch. > > Thanks for testing. > Can you provide a backtrace? ping.
Hello, On Wed, Nov 2, 2022 at 2:54 PM Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> wrote: > > [AMD Official Use Only - General] > > Hi David, > > Please find below response. Not sure why dev@ was dropped. Adding it back. > > -----Original Message----- > From: David Marchand <david.marchand@redhat.com> > Sent: Wednesday, November 2, 2022 6:18 PM > To: Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> > Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Akhil Goyal <gakhil@marvell.com>; Namburu, Chandu-babu <chandu@amd.com> > Subject: Re: [PATCH v2 0/4] crypto/ccp cleanup > > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > Hello, > > On Wed, Nov 2, 2022 at 11:26 AM Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> wrote: > > As mentioned earlier, observing issues with "crypto/ccp: fix PCI probing" patch (Floating point exception). Please find the below backtrace . > > > > (gdb) r -l 0,4 -n 4 -- --ptest throughput --buffer-sz 64 --burst-sz 32 > > --total-ops 3000 --silent --devtype crypto_ccp --optype cipher-only > > --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 > > --cipher-iv-sz 16 Starting program: /home/cae/sunil/dpdk_main/dpdk/build/app/dpdk-test-crypto-perf -l 0,4 -n 4 -- --ptest throughput --buffer-sz 64 --burst-sz 32 --total-ops 3000 --silent --devtype crypto_ccp --optype cipher-only --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --cipher-iv-sz 16 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > > EAL: Detected CPU lcores: 24 > > EAL: Detected NUMA nodes: 2 > > EAL: Detected static linkage of DPDK > > [New Thread 0x7ffff6dc5400 (LWP 171350)] > > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket [New Thread > > 0x7ffff65c4400 (LWP 171351)] > > EAL: Selected IOVA mode 'PA' > > EAL: VFIO support initialized > > [New Thread 0x7ffff5dc3400 (LWP 171352)] > > EAL: Probe PCI driver: crypto_ccp (1022:1456) device: 0000:04:00.2 > > (socket 0) > > PMD: Initialising 0000:04:00.2 on NUMA node 0 > > PMD: Max number of queue pairs = 8 > > PMD: Authentication offload to CCP > > CRYPTODEV: User specified device name = 0000:04:00.2 > > CRYPTODEV: Creating cryptodev 0000:04:00.2 > > CRYPTODEV: Initialisation parameters - name: 0000:04:00.2,socket id: > > 0, max queue pairs: 8 > > EAL: Probe PCI driver: crypto_ccp (1022:1468) device: 0000:05:00.1 > > (socket 0) > > PMD: CCP PMD already initialized > > EAL: Requested device 0000:05:00.1 cannot be used > > EAL: Probe PCI driver: crypto_ccp (1022:1456) device: 0000:41:00.2 > > (socket 1) > > PMD: CCP PMD already initialized > > EAL: Requested device 0000:41:00.2 cannot be used > > EAL: Probe PCI driver: crypto_ccp (1022:1468) device: 0000:42:00.1 > > (socket 1) > > PMD: CCP PMD already initialized > > EAL: Requested device 0000:42:00.1 cannot be used [New Thread > > 0x7ffff55c2400 (LWP 171353)] > > TELEMETRY: No legacy callbacks, legacy socket not created Allocated > > pool "sess_mp_0" on socket 0 > > > > Thread 4 "rte-worker-4" received signal SIGFPE, Arithmetic exception. > > [Switching to Thread 0x7ffff5dc3400 (LWP 171352)] 0x000055555767397a > > in ccp_pmd_enqueue_burst (queue_pair=0x17fefe940, ops=0x7ffff5dbe6e0, nb_ops=32) at ../drivers/crypto/ccp/rte_ccp_pmd.c:97 > > 97 cur_ops = nb_ops / cryptodev_cnt + (nb_ops)%cryptodev_cnt; > > (gdb) bt > > I have a hard time understanding the logic in this enqueue code... > > Is this driver exposing a single crypto device and will "balance" > crypto operations across all pci devices on the system? > > Driver is exposing a single crypto device as physical device and only one device can be used by the driver for single instance for all operations. > Afaik, this is the only crypto driver that implements this. I see two issues with the approach. - only one DPDK application can use ccp crypto engines (PCI bus allow/blocklist is not respected, right?), - since only one crypto device is exposed, there is no way for the application to dedicate/decide how to distribute crypto operations over the different ccp crypto engines available on the system.
[AMD Official Use Only - General] Hi David, Please find the below update - only one DPDK application can use ccp crypto engines (PCI bus allow/blocklist is not respected, right?), Yes, only one crypto device can be used in a DPDK application for the crypto operations. This is introduced from the patch crypto/ccp: convert driver from vdev to PCI. This is implemented as per community suggestion. - since only one crypto device is exposed, there is no way for the application to dedicate/decide how to distribute crypto operations over the different ccp crypto engines available on the system. When there is no ccp device passed from the application dpdk-test-crypto-perf, it tries to probe all CCP devices present on a system and only one device can be used. It seems this is bug in the patch implemented for crypto/ccp: convert driver from vdev to PCI and we are looking into this. Thanks Sunil -----Original Message----- From: David Marchand <david.marchand@redhat.com> Sent: Thursday, November 3, 2022 6:39 PM To: Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Akhil Goyal <gakhil@marvell.com>; Namburu, Chandu-babu <chandu@amd.com>; Sebastian, Selwin <Selwin.Sebastian@amd.com>; dev <dev@dpdk.org>; Thomas Monjalon <thomas@monjalon.net> Subject: Re: [PATCH v2 0/4] crypto/ccp cleanup Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. Hello, On Wed, Nov 2, 2022 at 2:54 PM Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> wrote: > > [AMD Official Use Only - General] > > Hi David, > > Please find below response. Not sure why dev@ was dropped. Adding it back. > > -----Original Message----- > From: David Marchand <david.marchand@redhat.com> > Sent: Wednesday, November 2, 2022 6:18 PM > To: Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> > Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Akhil Goyal > <gakhil@marvell.com>; Namburu, Chandu-babu <chandu@amd.com> > Subject: Re: [PATCH v2 0/4] crypto/ccp cleanup > > Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. > > > Hello, > > On Wed, Nov 2, 2022 at 11:26 AM Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> wrote: > > As mentioned earlier, observing issues with "crypto/ccp: fix PCI probing" patch (Floating point exception). Please find the below backtrace . > > > > (gdb) r -l 0,4 -n 4 -- --ptest throughput --buffer-sz 64 --burst-sz > > 32 --total-ops 3000 --silent --devtype crypto_ccp --optype > > cipher-only --cipher-algo aes-cbc --cipher-op encrypt > > --cipher-key-sz 16 --cipher-iv-sz 16 Starting program: /home/cae/sunil/dpdk_main/dpdk/build/app/dpdk-test-crypto-perf -l 0,4 -n 4 -- --ptest throughput --buffer-sz 64 --burst-sz 32 --total-ops 3000 --silent --devtype crypto_ccp --optype cipher-only --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --cipher-iv-sz 16 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". > > EAL: Detected CPU lcores: 24 > > EAL: Detected NUMA nodes: 2 > > EAL: Detected static linkage of DPDK [New Thread 0x7ffff6dc5400 (LWP > > 171350)] > > EAL: Multi-process socket /var/run/dpdk/rte/mp_socket [New Thread > > 0x7ffff65c4400 (LWP 171351)] > > EAL: Selected IOVA mode 'PA' > > EAL: VFIO support initialized > > [New Thread 0x7ffff5dc3400 (LWP 171352)] > > EAL: Probe PCI driver: crypto_ccp (1022:1456) device: 0000:04:00.2 > > (socket 0) > > PMD: Initialising 0000:04:00.2 on NUMA node 0 > > PMD: Max number of queue pairs = 8 > > PMD: Authentication offload to CCP > > CRYPTODEV: User specified device name = 0000:04:00.2 > > CRYPTODEV: Creating cryptodev 0000:04:00.2 > > CRYPTODEV: Initialisation parameters - name: 0000:04:00.2,socket id: > > 0, max queue pairs: 8 > > EAL: Probe PCI driver: crypto_ccp (1022:1468) device: 0000:05:00.1 > > (socket 0) > > PMD: CCP PMD already initialized > > EAL: Requested device 0000:05:00.1 cannot be used > > EAL: Probe PCI driver: crypto_ccp (1022:1456) device: 0000:41:00.2 > > (socket 1) > > PMD: CCP PMD already initialized > > EAL: Requested device 0000:41:00.2 cannot be used > > EAL: Probe PCI driver: crypto_ccp (1022:1468) device: 0000:42:00.1 > > (socket 1) > > PMD: CCP PMD already initialized > > EAL: Requested device 0000:42:00.1 cannot be used [New Thread > > 0x7ffff55c2400 (LWP 171353)] > > TELEMETRY: No legacy callbacks, legacy socket not created Allocated > > pool "sess_mp_0" on socket 0 > > > > Thread 4 "rte-worker-4" received signal SIGFPE, Arithmetic exception. > > [Switching to Thread 0x7ffff5dc3400 (LWP 171352)] 0x000055555767397a > > in ccp_pmd_enqueue_burst (queue_pair=0x17fefe940, ops=0x7ffff5dbe6e0, nb_ops=32) at ../drivers/crypto/ccp/rte_ccp_pmd.c:97 > > 97 cur_ops = nb_ops / cryptodev_cnt + (nb_ops)%cryptodev_cnt; > > (gdb) bt > > I have a hard time understanding the logic in this enqueue code... > > Is this driver exposing a single crypto device and will "balance" > crypto operations across all pci devices on the system? > > Driver is exposing a single crypto device as physical device and only one device can be used by the driver for single instance for all operations. > Afaik, this is the only crypto driver that implements this. I see two issues with the approach. - only one DPDK application can use ccp crypto engines (PCI bus allow/blocklist is not respected, right?), - since only one crypto device is exposed, there is no way for the application to dedicate/decide how to distribute crypto operations over the different ccp crypto engines available on the system. -- David Marchand
On Fri, Nov 18, 2022 at 12:58 PM Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> wrote: > Hi David, > > Please find the below update > > - only one DPDK application can use ccp crypto engines (PCI bus allow/blocklist is not respected, right?), > Yes, only one crypto device can be used in a DPDK application for the crypto operations. This is introduced from the patch crypto/ccp: convert driver from vdev to PCI. This is implemented as per community suggestion. Community suggested to have this driver a standard PCI driver, not a vdev one. I don't remember anything about the limitation. Can you point at the discussion that leaded to this? > > - since only one crypto device is exposed, there is no way for the application to dedicate/decide how to distribute crypto operations over the different ccp crypto engines available on the system. > > When there is no ccp device passed from the application dpdk-test-crypto-perf, it tries to probe all CCP devices present on a system and only one device can be used. It seems this is bug in the patch implemented for crypto/ccp: convert driver from vdev to PCI and we are looking into this. Indeed. So how should we proceed? Patches 1 to 3 are ready and can be merged. I don't mind dropping patch 4 if you have a better solution/alternative.
[AMD Official Use Only - General] Hi David, Please find the below update. Thanks Sunil -----Original Message----- From: David Marchand <david.marchand@redhat.com> Sent: Wednesday, January 11, 2023 8:44 PM To: Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Akhil Goyal <gakhil@marvell.com>; Namburu, Chandu-babu <chandu@amd.com>; Sebastian, Selwin <Selwin.Sebastian@amd.com>; dev <dev@dpdk.org>; Thomas Monjalon <thomas@monjalon.net> Subject: Re: [PATCH v2 0/4] crypto/ccp cleanup Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. On Fri, Nov 18, 2022 at 12:58 PM Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> wrote: > Hi David, > > Please find the below update > > - only one DPDK application can use ccp crypto engines (PCI bus > allow/blocklist is not respected, right?), Yes, only one crypto device can be used in a DPDK application for the crypto operations. This is introduced from the patch crypto/ccp: convert driver from vdev to PCI. This is implemented as per community suggestion. Community suggested to have this driver a standard PCI driver, not a vdev one. I don't remember anything about the limitation. Can you point at the discussion that leaded to this? Sunil -> Please find the discussion about CCP driver as a PCI driver @ https://patches.dpdk.org/project/dpdk/patch/20201225080358.366162-1-asomalap@amd.com/ > > - since only one crypto device is exposed, there is no way for the application to dedicate/decide how to distribute crypto operations over the different ccp crypto engines available on the system. > > When there is no ccp device passed from the application dpdk-test-crypto-perf, it tries to probe all CCP devices present on a system and only one device can be used. It seems this is bug in the patch implemented for crypto/ccp: convert driver from vdev to PCI and we are looking into this. Indeed. So how should we proceed? Patches 1 to 3 are ready and can be merged. I don't mind dropping patch 4 if you have a better solution/alternative. Sunil-> As mentioned earlier, there is some issue with the patch https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-5-david.marchand@redhat.com/. I worked on this patch and found issue. Did change in this patch and observing no issues. Still need some more time test, confirm changes and will share. For now, we can merge below changes, I will ack it. https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-2-david.marchand@redhat.com/ https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-3-david.marchand@redhat.com/ https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-4-david.marchand@redhat.com/ We will merge the below patch once we fix it with modifications https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-5-david.marchand@redhat.com/ Please let me know if any suggestions. -- David Marchand
[AMD Official Use Only - General] Hi David Regarding patch https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-5-david.marchand@redhat.com/ As mentioned earlier, observed floating point exception with using patch. Found issue that cryptodev_cnt variable is not getting updated and set to zero. Please find the below change and share the modified patch, I will ack it. --- a/drivers/crypto/ccp/rte_ccp_pmd.c +++ b/drivers/crypto/ccp/rte_ccp_pmd.c @@ -225,6 +225,8 @@ cryptodev_ccp_create(const char *name, CCP_LOG_ERR("failed to detect CCP crypto device"); goto init_error; } + else + cryptodev_cnt++; CCP_LOG_DBG("CCP : Crypto device count = %d\n", cryptodev_cnt); dev->device = &pci_dev->device; Thanks Sunil -----Original Message----- From: Uttarwar, Sunil Prakashrao Sent: Thursday, January 12, 2023 5:58 PM To: David Marchand <david.marchand@redhat.com> Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Akhil Goyal <gakhil@marvell.com>; Namburu, Chandu-babu <chandu@amd.com>; Sebastian, Selwin <Selwin.Sebastian@amd.com>; dev <dev@dpdk.org>; Thomas Monjalon <thomas@monjalon.net> Subject: RE: [PATCH v2 0/4] crypto/ccp cleanup [AMD Official Use Only - General] Hi David, Please find the below update. Thanks Sunil -----Original Message----- From: David Marchand <david.marchand@redhat.com> Sent: Wednesday, January 11, 2023 8:44 PM To: Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> Cc: Yigit, Ferruh <Ferruh.Yigit@amd.com>; Akhil Goyal <gakhil@marvell.com>; Namburu, Chandu-babu <chandu@amd.com>; Sebastian, Selwin <Selwin.Sebastian@amd.com>; dev <dev@dpdk.org>; Thomas Monjalon <thomas@monjalon.net> Subject: Re: [PATCH v2 0/4] crypto/ccp cleanup Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding. On Fri, Nov 18, 2022 at 12:58 PM Uttarwar, Sunil Prakashrao <SunilPrakashrao.Uttarwar@amd.com> wrote: > Hi David, > > Please find the below update > > - only one DPDK application can use ccp crypto engines (PCI bus > allow/blocklist is not respected, right?), Yes, only one crypto device can be used in a DPDK application for the crypto operations. This is introduced from the patch crypto/ccp: convert driver from vdev to PCI. This is implemented as per community suggestion. Community suggested to have this driver a standard PCI driver, not a vdev one. I don't remember anything about the limitation. Can you point at the discussion that leaded to this? Sunil -> Please find the discussion about CCP driver as a PCI driver @ https://patches.dpdk.org/project/dpdk/patch/20201225080358.366162-1-asomalap@amd.com/ > > - since only one crypto device is exposed, there is no way for the application to dedicate/decide how to distribute crypto operations over the different ccp crypto engines available on the system. > > When there is no ccp device passed from the application dpdk-test-crypto-perf, it tries to probe all CCP devices present on a system and only one device can be used. It seems this is bug in the patch implemented for crypto/ccp: convert driver from vdev to PCI and we are looking into this. Indeed. So how should we proceed? Patches 1 to 3 are ready and can be merged. I don't mind dropping patch 4 if you have a better solution/alternative. Sunil-> As mentioned earlier, there is some issue with the patch https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-5-david.marchand@redhat.com/. I worked on this patch and found issue. Did change in this patch and observing no issues. Still need some more time test, confirm changes and will share. For now, we can merge below changes, I will ack it. https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-2-david.marchand@redhat.com/ https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-3-david.marchand@redhat.com/ https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-4-david.marchand@redhat.com/ We will merge the below patch once we fix it with modifications https://patches.dpdk.org/project/dpdk/patch/20221004095132.198777-5-david.marchand@redhat.com/ Please let me know if any suggestions. -- David Marchand