DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
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
Date: Thu, 3 Nov 2022 14:08:58 +0100	[thread overview]
Message-ID: <CAJFAV8zN9=2PznOqtsb1cfQzvK1jgEkO3WiZuM2RxffqyPfENQ@mail.gmail.com> (raw)
In-Reply-To: <CY4PR1201MB01992328892E48006952D3C892399@CY4PR1201MB0199.namprd12.prod.outlook.com>

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


  parent reply	other threads:[~2022-11-03 13:09 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-09 15:04 [PATCH " David Marchand
2022-09-09 15:04 ` [PATCH 1/4] crypto/ccp: remove some printf David Marchand
2022-09-09 15:04 ` [PATCH 2/4] crypto/ccp: remove some dead code for UIO David Marchand
2022-09-09 15:04 ` [PATCH 3/4] crypto/ccp: fix IOVA handling David Marchand
2022-09-09 15:04 ` [PATCH 4/4] crypto/ccp: fix PCI probing David Marchand
2022-10-04  9:51 ` [PATCH v2 0/4] crypto/ccp cleanup David Marchand
2022-10-04  9:51   ` [PATCH v2 1/4] crypto/ccp: remove some printf David Marchand
2023-01-13 11:58     ` Uttarwar, Sunil Prakashrao
2023-01-30 18:42     ` [EXT] " Akhil Goyal
2022-10-04  9:51   ` [PATCH v2 2/4] crypto/ccp: remove some dead code for UIO David Marchand
2023-01-13 12:00     ` Uttarwar, Sunil Prakashrao
2022-10-04  9:51   ` [PATCH v2 3/4] crypto/ccp: fix IOVA handling David Marchand
2023-01-13 12:00     ` Uttarwar, Sunil Prakashrao
2022-10-04  9:51   ` [PATCH v2 4/4] crypto/ccp: fix PCI probing David Marchand
2022-10-07  6:54   ` [EXT] [PATCH v2 0/4] crypto/ccp cleanup Akhil Goyal
2022-10-11 11:44   ` Uttarwar, Sunil Prakashrao
2022-10-13  9:40     ` Akhil Goyal
2022-10-17 13:42       ` Uttarwar, Sunil Prakashrao
2022-10-17 13:53         ` David Marchand
2022-10-26  6:21           ` David Marchand
     [not found]             ` <1ec3f0fc-631f-2aa6-70f7-7f9b96caa2a2@amd.com>
     [not found]               ` <CY4PR1201MB019989039CF117EE75F9025692399@CY4PR1201MB0199.namprd12.prod.outlook.com>
     [not found]                 ` <CAJFAV8xpZM96qDzaezO64LsRSdhWu8A2quCo8xGpufRrfjrMSw@mail.gmail.com>
     [not found]                   ` <CY4PR1201MB01992328892E48006952D3C892399@CY4PR1201MB0199.namprd12.prod.outlook.com>
2022-11-03 13:08                     ` David Marchand [this message]
2022-11-18 11:58                       ` Uttarwar, Sunil Prakashrao
2023-01-11 15:14                         ` David Marchand
2023-01-12 12:28                           ` Uttarwar, Sunil Prakashrao
2023-01-17 13:56                             ` Uttarwar, Sunil Prakashrao
2023-03-02 11:43 ` [PATCH v2] crypto/ccp: fix PCI probing David Marchand
2023-03-06 12:05   ` Uttarwar, Sunil Prakashrao
2023-03-11 18:49     ` Akhil Goyal

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='CAJFAV8zN9=2PznOqtsb1cfQzvK1jgEkO3WiZuM2RxffqyPfENQ@mail.gmail.com' \
    --to=david.marchand@redhat.com \
    --cc=Ferruh.Yigit@amd.com \
    --cc=Selwin.Sebastian@amd.com \
    --cc=SunilPrakashrao.Uttarwar@amd.com \
    --cc=chandu@amd.com \
    --cc=dev@dpdk.org \
    --cc=gakhil@marvell.com \
    --cc=thomas@monjalon.net \
    /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).