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 255D9A034F; Mon, 7 Feb 2022 01:56:15 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AEE874069D; Mon, 7 Feb 2022 01:56:14 +0100 (CET) Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178]) by mails.dpdk.org (Postfix) with ESMTP id 0C57340685 for ; Mon, 7 Feb 2022 01:56:13 +0100 (CET) Received: by inbox.dpdk.org (Postfix, from userid 33) id ADFDEA0352; Mon, 7 Feb 2022 01:56:12 +0100 (CET) From: bugzilla@dpdk.org To: dev@dpdk.org Subject: [Bug 935] aesni_mb_pmd does not trigger parallel processing for multiple jobs Date: Mon, 07 Feb 2022 00:56:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: DPDK X-Bugzilla-Component: cryptodev X-Bugzilla-Version: 20.11 X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: changchun.zhang@oracle.com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: dev@dpdk.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.dpdk.org/ Auto-Submitted: auto-generated X-Auto-Response-Suppress: All MIME-Version: 1.0 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 https://bugs.dpdk.org/show_bug.cgi?id=3D935 Bug ID: 935 Summary: aesni_mb_pmd does not trigger parallel processing for multiple jobs Product: DPDK Version: 20.11 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: major Priority: Normal Component: cryptodev Assignee: dev@dpdk.org Reporter: changchun.zhang@oracle.com Target Milestone: --- The issue exists in DPDK 20.11 and later. The intel-ipsec-mb library supports gathering multiple jobs and process the multi-jobs in parallel. However in the current aesni_mb_pmd, the=20 aesni_mb_dequeue_burst() has a bug which leads to the intel-ipsec-mb does n= ot run in parallel mode at all. Each time the a crypto op is dequeued from the ring, the aes_mb_dequeu_burst() will call the flush_mb_mgr directly to fini= sh this job processing. In detail: static uint16_t aesni_mb_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops, uint16_t nb_ops) { struct ipsec_mb_qp *qp =3D queue_pair; IMB_MGR *mb_mgr =3D qp->mb_mgr; struct rte_crypto_op *op; IMB_JOB *job; int retval, processed_jobs =3D 0; if (unlikely(nb_ops =3D=3D 0 || mb_mgr =3D=3D NULL)) return 0; uint8_t digest_idx =3D qp->digest_idx; do { /* Get next free mb job struct from mb manager */ job =3D IMB_GET_NEXT_JOB(mb_mgr); ...... retval =3D rte_ring_dequeue(qp->ingress_queue, (void **)&op= ); ...... job =3D IMB_SUBMIT_JOB(mb_mgr); ...... if (job) processed_jobs +=3D handle_completed_jobs(qp, mb_mg= r, job, &ops[processed_jobs], nb_ops - processed_jobs); } while (processed_jobs < nb_ops);=20=20=20=20=20=20 if (processed_jobs < 1) processed_jobs +=3D flush_mb_mgr(qp, mb_mgr, &ops[processed_jobs], nb_ops - processed_jobs); return processed_jobs; } After submit the first job, the intel-mb-ipsec library does process this jo= b as it is waiting enough jobs submitted, however, in this pmd, it triggers the flush_mb_mgr() if the first submitted job is not processed. Consequently, t= he parallel processing is always not happening. We are actually processing the packet in single buffer mode. During the debug test, I have to disable below code if (processed_jobs < 1) processed_jobs +=3D flush_mb_mgr(qp, mb_mgr, &ops[processed_jobs], nb_ops - processed_jobs); for intel-mb-ipsec to gather enough jobs to launch prarallel processing. --=20 You are receiving this mail because: You are the assignee for the bug.=