All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 935] aesni_mb_pmd does not trigger parallel processing for multiple jobs
@ 2022-02-07  0:56 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2022-02-07  0:56 UTC (permalink / raw)
  To: dev

https://bugs.dpdk.org/show_bug.cgi?id=935

            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 
aesni_mb_dequeue_burst() has a bug which leads to the intel-ipsec-mb does not
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 finish
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 = queue_pair;
        IMB_MGR *mb_mgr = qp->mb_mgr;
        struct rte_crypto_op *op;
        IMB_JOB *job;
        int retval, processed_jobs = 0;

        if (unlikely(nb_ops == 0 || mb_mgr == NULL))
                return 0;

        uint8_t digest_idx = qp->digest_idx;

        do {
                /* Get next free mb job struct from mb manager */
                job = IMB_GET_NEXT_JOB(mb_mgr);
......
                retval = rte_ring_dequeue(qp->ingress_queue, (void **)&op);
......
                job = IMB_SUBMIT_JOB(mb_mgr);
......
                if (job)
                        processed_jobs += handle_completed_jobs(qp, mb_mgr,
                                        job, &ops[processed_jobs],
                                        nb_ops - processed_jobs);

        } while (processed_jobs < nb_ops);      

        if (processed_jobs < 1)
                processed_jobs += 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 job 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, the
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 += 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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-02-07  0:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07  0:56 [Bug 935] aesni_mb_pmd does not trigger parallel processing for multiple jobs bugzilla

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.