From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 96E6EA00C2; Thu, 3 Nov 2022 14:09:20 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3C2A74069B; Thu, 3 Nov 2022 14:09:20 +0100 (CET) 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 EAE9D40694 for ; Thu, 3 Nov 2022 14:09:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667480957; 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=3978vY9mOCLKd7+Q5dQMEkpg3+TUEf/NChG3DlPjbpI=; b=Ia9ydmJ9jho3qG1oYv8bYXjuY2zCBTmyvPvCImT4Jd0qzbbfYDx7WUhH38tXO0cRn4+Of0 4dh+Ekz5o66KyVw8+xKcegQQOSW4LhKDbvEgTy1FAeEC6AoV+w0698bgkAwZuGUgsez465 n42axFotxVH83pEKf+9WfXD1xbojfYw= Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-493-M2E-vDxWPaeOzmTWzJKtsw-1; Thu, 03 Nov 2022 09:09:11 -0400 X-MC-Unique: M2E-vDxWPaeOzmTWzJKtsw-1 Received: by mail-pl1-f200.google.com with SMTP id p5-20020a170902e74500b001884ba979f8so1322922plf.17 for ; Thu, 03 Nov 2022 06:09:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3978vY9mOCLKd7+Q5dQMEkpg3+TUEf/NChG3DlPjbpI=; b=KgKlUwRkitoGJiMibLFRuvjEjx4mbDp4pTIzdmajoOZ74zh3iWwY6DPghpx3dwkoMw mklX7uksWOKHVaMl08JgaSKWlpnwQEwu/sp7ud4eY2TAaiuIAa2Nstyd2vKBj3/1QsK3 dl1DSBqkM5HygUqyWktbqOvf4fqJComdootE/bU3znSUQ2aH60vrI3+7Mu45rE76+m30 s1Gp8nJVWiGGmk2pwXiJsPUUt9H5/zfUTyymqzo2SzUuy4yn6lIJtK4nwO3O6vPtIYAR ANYQkC2RHc69hosBX9gxzXlGPgrRjmynj6FP16ZYjb/iX4Vg1qNEa/XgL1/ZBkK1m+Vv GYJw== X-Gm-Message-State: ACrzQf2pHHPoUhCl2APNazgslXt5Az4y8CrstzMfOkza8dlCqQ4iyO3N AwbHg/pdyn3ZL+6gwX5cbCk+3ZofdetN3U1C6XaZEq3bTLIHov8QXdHb61Qged1vZ64hNI3gM9+ HF2G/tebw4BDJwLtX6eg= X-Received: by 2002:a63:5b58:0:b0:452:2ba4:f86b with SMTP id l24-20020a635b58000000b004522ba4f86bmr25531556pgm.223.1667480950326; Thu, 03 Nov 2022 06:09:10 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4zgE8o3YhIsXAzl1Gbvp4rpYcFKjmyOeGg5JhtGMGt+g/j482fx4uMqc3gTV7Taww4sTopdccGxesBGVYAvxM= X-Received: by 2002:a63:5b58:0:b0:452:2ba4:f86b with SMTP id l24-20020a635b58000000b004522ba4f86bmr25531530pgm.223.1667480949973; Thu, 03 Nov 2022 06:09:09 -0700 (PDT) MIME-Version: 1.0 References: <20220909150411.3702860-1-david.marchand@redhat.com> <20221004095132.198777-1-david.marchand@redhat.com> <1ec3f0fc-631f-2aa6-70f7-7f9b96caa2a2@amd.com> In-Reply-To: From: David Marchand Date: Thu, 3 Nov 2022 14:08:58 +0100 Message-ID: Subject: Re: [PATCH v2 0/4] crypto/ccp cleanup To: "Uttarwar, Sunil Prakashrao" Cc: "Yigit, Ferruh" , Akhil Goyal , "Namburu, Chandu-babu" , "Sebastian, Selwin" , dev , Thomas Monjalon X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Hello, On Wed, Nov 2, 2022 at 2:54 PM Uttarwar, Sunil Prakashrao 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 > Sent: Wednesday, November 2, 2022 6:18 PM > To: Uttarwar, Sunil Prakashrao > Cc: Yigit, Ferruh ; Akhil Goyal ; Namburu, Chandu-babu > Subject: Re: [PATCH v2 0/4] crypto/ccp cleanup > > Caution: This message originated from an External Source. Use proper caut= ion when opening attachments, clicking links, or responding. > > > Hello, > > On Wed, Nov 2, 2022 at 11:26 AM Uttarwar, Sunil Prakashrao wrote: > > As mentioned earlier, observing issues with "crypto/ccp: fix PCI probin= g" 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/buil= d/app/dpdk-test-crypto-perf -l 0,4 -n 4 -- --ptest throughput --buffer-sz 6= 4 --burst-sz 32 --total-ops 3000 --silent --devtype crypto_ccp --optype cip= her-only --cipher-algo aes-cbc --cipher-op encrypt --cipher-key-sz 16 --cip= her-iv-sz 16 [Thread debugging using libthread_db enabled] Using host libth= read_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 =3D 8 > > PMD: Authentication offload to CCP > > CRYPTODEV: User specified device name =3D 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=3D0x17fefe940, ops=3D0x7ffff5dbe6e= 0, nb_ops=3D32) at ../drivers/crypto/ccp/rte_ccp_pmd.c:97 > > 97 cur_ops =3D nb_ops / cryptodev_cnt + (nb_ops)%c= ryptodev_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. --=20 David Marchand