DPDK usage discussions
 help / color / mirror / Atom feed
From: Mattia Milani <mattia.milani@nokia.com>
To: users@dpdk.org
Subject: [BBDev - assistance] Operations executions shouldn't be asynchronous?
Date: Mon, 22 Jul 2024 10:34:46 +0200	[thread overview]
Message-ID: <aa7f7603-1c49-46cb-913c-642fa5f82911@nokia.com> (raw)

Hi All,

I've originally written this message on dpdk@dev but received now 
answer, I'm
forwarding it hear int he hope somebody could give me his opinion :)

I'm currently experimenting with BBDev, in particular with the decoding 
operations
and there is something that is puzzling me. I'm sorry if in reality this 
is just a
misunderstanding from my side, but I would really appreciate some 
clarifications.

What I expected was the following:

Once I call the function `rte_bbdev_enqueue_dec_ops` with a certain number
of operations and a specific queue_id I expect the function to append 
the operations
to a queue and return, after that I can use `rte_bbdev_dequeue_dec_ops` 
to read
an "output_queue" structure to obtain the operations already processed 
by the
decoder (the number of op. returned could differ from the number of op. 
enqueued).
My assumption is that the decoder works in an asynchronous way in 
respect to the
process that it's enqueuing operations, and dequeuing the once concluded 
(this last
one could even be another separate process from the op. producer).
Such that, if the queues are empty the decoder has nothing to do, but if 
there are
operations in the queue the decoder is going to execute them, while the 
producer(s)
and consumer(s) can do something else.

What I've understood from the source code:

Once the function `rte_bbdev_enqueue_dec_ops` is called then, there is a 
sequence
of functions calls, up to the point where, in `enqueue_dec_all_ops`
(drivers/baseband/turbo_sw/bbdev_turbo_software.c:1724), there is a for 
loop that take
care of each operation one by one. At this point, for each operation, the
`enqueue_dec_one_op` cycles until there is nothing more to decode 
calling `process_dec_cb`.
This last function executes both `bblib_turbo_adapter_ul` and later 
`bblib_turbo_decoder`.

This sequence of calls never gives back the control to the original 
function which called
`rte_bbdev_enqueue_dec_ops`, that has to wait for all the operations to 
be concluded
before continuing.

The same logic applies for both Turbo and LDPC, from what I've see in 
`enqueue_ldpc_dec_all_ops`.

Now my question is, shouldn't the decoder being built with the first 
approach in mind?
By any chance, is the asynchronous part controlled by FlexRAN? I've to 
admit that I didn't
check more deeply.
Am I missing something in the code that invalidate what I've understood?

I'm of the opinion that an approach like the first one would be more 
resilient and ductile,
separating the logic that controls the queue(s) from the one that 
executes the actual processing.
This way we could simulate more stressful situations where the growing 
rate of the
operations is greater that the outgoing rate from the decoder.

Thank you very much for your help.

Best regards,
Mattia Milani


                 reply	other threads:[~2024-07-22  9:03 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=aa7f7603-1c49-46cb-913c-642fa5f82911@nokia.com \
    --to=mattia.milani@nokia.com \
    --cc=users@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).