DPDK usage discussions
 help / color / mirror / Atom feed
From: Victor Huertas <vhuertas@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] running multiple pthreads in the same lcore id
Date: Fri, 16 Mar 2018 17:24:08 +0100	[thread overview]
Message-ID: <CAGxG5chZaqSmnnQU6zNWKgTYr0H10DqySd=vG3_fSHebBtdJuQ@mail.gmail.com> (raw)

Hi all,

I have developed a simple application which implements a network bridge. It
captures packets in one port (port0), sends them into a software ring
towards a second thread which receives them and sends them out via port1.

Same implementation is performed in the direction port1->port0. So there
are 4 threads in total.

[port0]-->rx thread0 -->sw ring--> tx thread1-->[port 1]
[port0]<--rx thread2 <--sw ring<-- tx thread3<--[port 1]

The thing is that this application is a first step of a functionality
expansion by inserting additional threads (all connected with software
rings) in the middle of the path so that it performs some packet
manipulation before delivering them to the destination port:

[port0]-->rx thread0 -->sw ring--> add_thread 1-->sw ring--> add_thread
N-->sw ring-> tx thread1-->[port 1]

The total number of threads can reach hundreds (much more than number of
lcores) and I would like to assign every thread to a particular lcore, no
mattering if more than one thread is being executed by the same lcore. This
assignment would be done through an XML config file, which would be loaded
at the very beginning of the application execution.

the rte_eal_remote_launch function at rte_launch.h can only launch one
thread and attach it to one and unique lcore. So imagine that I want to
launch another thread on the same lcore. DPDK doesn't seem to allow me to
do that.

I have read that using cgroups could make this possible but I haven't found
an example application where DPDK and cgroups are used toghether.

what is your recommendation on this as expert users? Is using cgroups an
acceptable option?

Is DPDK contemplating in a future release to support natively multi pthread
on one lcore on the rte_launch.h lib?

Thanks for your attention,

-- 
Victor

             reply	other threads:[~2018-03-16 16:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 16:24 Victor Huertas [this message]
2018-03-16 17:11 ` Van Haaren, Harry
2018-03-16 18:20   ` Victor Huertas
     [not found] <855335141.522018.1521368574772.JavaMail.zimbra@viettel.com.vn>
2018-03-18 10:25 ` longtb5

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='CAGxG5chZaqSmnnQU6zNWKgTYr0H10DqySd=vG3_fSHebBtdJuQ@mail.gmail.com' \
    --to=vhuertas@gmail.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).