Sending/Enqueue a <mbuf> from different threads to single queue --- how to ?
Pavel Vazharov
freakpv at gmail.com
Thu Jan 26 12:08:47 CET 2023
On Thu, Jan 26, 2023 at 12:46 PM Ruslan R. Laishev <zator at yandex.ru> wrote:
> Hello!
>
> Continue studying DPDK ...
>
> I have a some nano-task : I'm need to send a packet/mbuf to queue of a
> device from separate worker .
>
> Several workers (every worker run on own lcore) send/receive packets
> to/from queues of devices
> worker #0 ------- port0/que0
> - port1/que0
> - portN/que0
> worker #1 ------- port0/que1
> - port1/que1
> - portN/que1
> ...
> worker #N ------- port0/queN
> - port1/queN
> - portN/queN
>
> There is a yet another thread which want to send mbuf/packet to queue #0
> (just for example) to every device
>
Hi,
I don't think you can inject packets into the device queues.
However, you can achieve the same, sending mbufs between the worker
threads, using the provided ring functionality of DPDK -
http://doc.dpdk.org/guides/prog_guide/ring_lib.html.
The worker threads will need to try to dequeue regularly for the shared
ring(s).
Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/users/attachments/20230126/fbcbe36a/attachment.htm>
More information about the users
mailing list