DPDK usage discussions
 help / color / mirror / Atom feed
From: Kyle Larose <eomereadig@gmail.com>
To: Mahdi Moradmand Badie <mahdi.mbadie@gmail.com>
Cc: users@dpdk.org
Subject: Re: [dpdk-users] Send and Receive packets to/from specific core
Date: Fri, 11 Mar 2016 15:54:51 -0500	[thread overview]
Message-ID: <CAMFWN9m5+3RCoZJTJHmwPEPtj_BqHkeTQ3T8x3xzhG7m-CW8Qg@mail.gmail.com> (raw)
In-Reply-To: <CAM=H7we2aFvdE6SYOgBdQKnKVx190BJmw2NRME0_5LG6VXN-ew@mail.gmail.com>

On Fri, Mar 11, 2016 at 3:47 PM, Mahdi Moradmand Badie
<mahdi.mbadie@gmail.com> wrote:
> My big challenge is having a tested code (run able with right
> functionality), then run and change it in order to have my task.
> I wanna use the share memory btw cores in order to write/read to/from and
> knowing how do that :), all available code which I found are based on NIC :(
> or maybe I am wrong!!!
> Thanks in advance,

Take a look at this example:

http://dpdk.org/doc/guides/sample_app_ug/multi_process.html#basic-multi-process-example

IIRC, it uses rings to send messages back and forth between the cores.
The code is available with the dpdk source, so it should serve as a
good starting point to see how to set up the shared memory and use it.

Does that help?

>
> On 11 March 2016 at 15:43, Kyle Larose <eomereadig@gmail.com> wrote:
>>
>> On Fri, Mar 11, 2016 at 3:22 PM, Mahdi Moradmand Badie
>> <mahdi.mbadie@gmail.com> wrote:
>> > Dear All,
>> >
>> > I wanna Send(write) a Packet(s) with specific data (for example x = 10)
>> > from core 0 to share memory and Receive (Read) it with another Core (for
>> > example Core 1), change it in Core 1 (for example X = X + 1) and write
>> > again in share memory.
>> > I really don't know How I could do it, I wanna do this without using NIC
>> > ot
>> > rte_eth at all, so simple and easy but I confused.
>> > Please help me.
>> >
>> > PS. I know there are many example do more complex than this small
>> > exercise
>> > but all did it via NIC.
>>
>> What is your biggest challenge? Is it moving information between
>> cores, or getting information into your application?
>>
>> Consider that most of the multiprocess examples in DPDK do two things:
>> 1) Send/Receive packets to/from a NIC
>> 2) Send packets between cores
>>
>> You obviously want to do #2, and looking at those examples should make
>> how to do it fairly obvious. Is your challenge replacing #1 with
>> something other than a NIC? If so, you *could* consider using a pcap
>> PMD to just read packets from a file. In the past, I have used ring
>> PMDs in conjunction with a secondary process which generates packets
>> to inject arbitrarily formatted packets into my program.
>>
>> >
>> > --
>> > M@hdi Mor@dm@nd B@die
>
>
>
>
> --
> M@hdi Mor@dm@nd B@die

  reply	other threads:[~2016-03-11 20:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-11 20:22 Mahdi Moradmand Badie
2016-03-11 20:29 ` Matt Laswell
2016-03-11 20:43 ` Kyle Larose
2016-03-11 20:47   ` Mahdi Moradmand Badie
2016-03-11 20:54     ` Kyle Larose [this message]
2016-03-11 21:01       ` Mahdi Moradmand Badie
2016-03-11 21:50         ` Kyle Larose
2016-03-11 22:19           ` Mahdi Moradmand Badie
2016-03-14 17:37             ` Mahdi Moradmand Badie
2016-03-16 13:25             ` Kyle Larose

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=CAMFWN9m5+3RCoZJTJHmwPEPtj_BqHkeTQ3T8x3xzhG7m-CW8Qg@mail.gmail.com \
    --to=eomereadig@gmail.com \
    --cc=mahdi.mbadie@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).