DPDK patches and discussions
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <bug-935-3@http.bugs.dpdk.org/> (raw)

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.

                 reply	other threads:[~2022-02-07  0:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bug-935-3@http.bugs.dpdk.org/ \
    --to=bugzilla@dpdk.org \
    --cc=dev@dpdk.org \
    /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).