All of lore.kernel.org
 help / color / mirror / Atom feed
* Is it possible to have dpdk running with no dependency on a nic ?
@ 2014-02-12 18:21 Ymo Lists
       [not found] ` <CACSP18RNigOqE8ORBZWV5F5C8SEu_40W7sJ7ikhuYufX6V_xow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Ymo Lists @ 2014-02-12 18:21 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

1) I have two apps that need to communicate on the same machine . Is it
possible to have these two apps communicating via dpdk without referencing
a nic ?

2) The apps need to run on an amazon vm. How can you run dpdk on an amazon
vm with only one nic if the above is not possible ?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found] ` <CACSP18RNigOqE8ORBZWV5F5C8SEu_40W7sJ7ikhuYufX6V_xow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-13 20:19   ` Ymo Lists
       [not found]     ` <CACSP18RWf1ExHW18fpWsQ9Y=g7f2y_yo2k-0AvCiAK9Ju1rSpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Ymo Lists @ 2014-02-13 20:19 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

Is this a faq ???


On Wed, Feb 12, 2014 at 1:21 PM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> 1) I have two apps that need to communicate on the same machine . Is it
> possible to have these two apps communicating via dpdk without referencing
> a nic ?
>
> 2) The apps need to run on an amazon vm. How can you run dpdk on an amazon
> vm with only one nic if the above is not possible ?
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found]     ` <CACSP18RWf1ExHW18fpWsQ9Y=g7f2y_yo2k-0AvCiAK9Ju1rSpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-14  8:42       ` Vivek Soni
       [not found]         ` <CA+U1=GuECxtwiLKoZTxgEwJ2hqqBm=V28ZyAaYBsOz7CTcvbqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Vivek Soni @ 2014-02-14  8:42 UTC (permalink / raw)
  Cc: dev-VfR2kkLFssw

Yes, It is very well possible to run DPDK without dependency on the NIC.
But it all depends what you want to do.
The two DPDK applications can communicate using the ring library provided
by DPDK. In case there is no NIC, DPDK provides pure software based PMDs
which can be used on systems without a NIC or with unsupported NIC using
standard kernel drivers.

Hope it helps.

Regards,
Vivek


On Fri, Feb 14, 2014 at 1:49 AM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Is this a faq ???
>
>
> On Wed, Feb 12, 2014 at 1:21 PM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > 1) I have two apps that need to communicate on the same machine . Is it
> > possible to have these two apps communicating via dpdk without
> referencing
> > a nic ?
> >
> > 2) The apps need to run on an amazon vm. How can you run dpdk on an
> amazon
> > vm with only one nic if the above is not possible ?
> >
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found]         ` <CA+U1=GuECxtwiLKoZTxgEwJ2hqqBm=V28ZyAaYBsOz7CTcvbqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-14 17:20           ` Ymo Lists
       [not found]             ` <CACSP18QDnVVP8sRabLwk+-TKyz0ePC7H+w54hZ-R_BHcMUmahg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Ymo Lists @ 2014-02-14 17:20 UTC (permalink / raw)
  Cc: dev-VfR2kkLFssw

Could you please point me to a sample doing this ? All the sample i have
seen are initializing the eal and that involves initializing the nics. Is
there a sample ? Can you mock up some code ?

plz plzzz :-)


On Fri, Feb 14, 2014 at 3:42 AM, Vivek Soni <tellviveks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Yes, It is very well possible to run DPDK without dependency on the NIC.
> But it all depends what you want to do.
> The two DPDK applications can communicate using the ring library provided
> by DPDK. In case there is no NIC, DPDK provides pure software based PMDs
> which can be used on systems without a NIC or with unsupported NIC using
> standard kernel drivers.
>
> Hope it helps.
>
> Regards,
> Vivek
>
>
> On Fri, Feb 14, 2014 at 1:49 AM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Is this a faq ???
> >
> >
> > On Wed, Feb 12, 2014 at 1:21 PM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > 1) I have two apps that need to communicate on the same machine . Is it
> > > possible to have these two apps communicating via dpdk without
> > referencing
> > > a nic ?
> > >
> > > 2) The apps need to run on an amazon vm. How can you run dpdk on an
> > amazon
> > > vm with only one nic if the above is not possible ?
> > >
> >
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found]             ` <CACSP18QDnVVP8sRabLwk+-TKyz0ePC7H+w54hZ-R_BHcMUmahg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-14 18:20               ` Jayakumar, Muthurajan
       [not found]                 ` <5D695A7F6F10504DBD9B9187395A21797C6E384A-P5GAC/sN6hlQxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Jayakumar, Muthurajan @ 2014-02-14 18:20 UTC (permalink / raw)
  To: Ymo Lists; +Cc: dev-VfR2kkLFssw

Can you please refer Chapter 15.1.2 of the programmer's manual http://www.intel.com/content/dam/www/public/us/en/documents/guides/intel-dpdk-programmers-guide.pdf titled "Rings-based PMD".
It indicates that  " To run an Intel(r) DPDK application on a machine without any Ethernet devices, a pair of ring-based rte_ethdevs can be used as below"
As Vivek indicated, the ring based PMD (libte_pmd_ring) allows a set of s/w FIFOs (that is rte_ring) to be accessed using the PMD APIs, as though they were physical NICs"

-----Original Message-----
From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Ymo Lists
Sent: Friday, February 14, 2014 9:20 AM
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [dpdk-dev] Is it possible to have dpdk running with no dependency on a nic ?

Could you please point me to a sample doing this ? All the sample i have seen are initializing the eal and that involves initializing the nics. Is there a sample ? Can you mock up some code ?

plz plzzz :-)


On Fri, Feb 14, 2014 at 3:42 AM, Vivek Soni <tellviveks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Yes, It is very well possible to run DPDK without dependency on the NIC.
> But it all depends what you want to do.
> The two DPDK applications can communicate using the ring library 
> provided by DPDK. In case there is no NIC, DPDK provides pure software 
> based PMDs which can be used on systems without a NIC or with 
> unsupported NIC using standard kernel drivers.
>
> Hope it helps.
>
> Regards,
> Vivek
>
>
> On Fri, Feb 14, 2014 at 1:49 AM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Is this a faq ???
> >
> >
> > On Wed, Feb 12, 2014 at 1:21 PM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > 1) I have two apps that need to communicate on the same machine . 
> > > Is it possible to have these two apps communicating via dpdk 
> > > without
> > referencing
> > > a nic ?
> > >
> > > 2) The apps need to run on an amazon vm. How can you run dpdk on 
> > > an
> > amazon
> > > vm with only one nic if the above is not possible ?
> > >
> >
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found]                 ` <5D695A7F6F10504DBD9B9187395A21797C6E384A-P5GAC/sN6hlQxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2014-02-14 20:11                   ` Ymo Lists
       [not found]                     ` <CACSP18QdpFb71x0JymmDuicz7ft68U6cbcNVC=i47yprWp4FWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Ymo Lists @ 2014-02-14 20:11 UTC (permalink / raw)
  Cc: dev-VfR2kkLFssw

Than you so much Jayakumar for your help. Quick note. In the document you
pointed It states that

"Enqueuing and dequeuing items from an rte_ring using the rings-based PMD
may be slower than using the native rings API. This is because Intel® DPDK
Ethernet drivers make use of function pointers to call the appropriate
enqueue or dequeue functions, while the rte_ring specific functions are
direct function calls in the code and are often inlined by the compiler."

Is that statement correct ? I would imagine that inlined code would be be
faster than using function pointers ?

Also what are the native apis ? it does not make it very clear. could you
make it clear what is referrend as "native rings API" ?






On Fri, Feb 14, 2014 at 1:20 PM, Jayakumar, Muthurajan <
muthurajan.jayakumar-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:

> Can you please refer Chapter 15.1.2 of the programmer's manual
> http://www.intel.com/content/dam/www/public/us/en/documents/guides/intel-dpdk-programmers-guide.pdftitled "Rings-based PMD".
> It indicates that  " To run an Intel(r) DPDK application on a machine
> without any Ethernet devices, a pair of ring-based rte_ethdevs can be used
> as below"
> As Vivek indicated, the ring based PMD (libte_pmd_ring) allows a set of
> s/w FIFOs (that is rte_ring) to be accessed using the PMD APIs, as though
> they were physical NICs"
>
> -----Original Message-----
> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Ymo Lists
> Sent: Friday, February 14, 2014 9:20 AM
> Cc: dev-VfR2kkLFssw@public.gmane.org
> Subject: Re: [dpdk-dev] Is it possible to have dpdk running with no
> dependency on a nic ?
>
> Could you please point me to a sample doing this ? All the sample i have
> seen are initializing the eal and that involves initializing the nics. Is
> there a sample ? Can you mock up some code ?
>
> plz plzzz :-)
>
>
> On Fri, Feb 14, 2014 at 3:42 AM, Vivek Soni <tellviveks-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> > Yes, It is very well possible to run DPDK without dependency on the NIC.
> > But it all depends what you want to do.
> > The two DPDK applications can communicate using the ring library
> > provided by DPDK. In case there is no NIC, DPDK provides pure software
> > based PMDs which can be used on systems without a NIC or with
> > unsupported NIC using standard kernel drivers.
> >
> > Hope it helps.
> >
> > Regards,
> > Vivek
> >
> >
> > On Fri, Feb 14, 2014 at 1:49 AM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > Is this a faq ???
> > >
> > >
> > > On Wed, Feb 12, 2014 at 1:21 PM, Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> > >
> > > > 1) I have two apps that need to communicate on the same machine .
> > > > Is it possible to have these two apps communicating via dpdk
> > > > without
> > > referencing
> > > > a nic ?
> > > >
> > > > 2) The apps need to run on an amazon vm. How can you run dpdk on
> > > > an
> > > amazon
> > > > vm with only one nic if the above is not possible ?
> > > >
> > >
> >
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found]                     ` <CACSP18QdpFb71x0JymmDuicz7ft68U6cbcNVC=i47yprWp4FWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-16 19:02                       ` Stephen Hemminger
       [not found]                         ` <20140216110241.0e789750-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Hemminger @ 2014-02-16 19:02 UTC (permalink / raw)
  To: Ymo Lists; +Cc: dev-VfR2kkLFssw

On Fri, 14 Feb 2014 15:11:29 -0500
Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> "Enqueuing and dequeuing items from an rte_ring using the rings-based PMD
> may be slower than using the native rings API. This is because Intel® DPDK
> Ethernet drivers make use of function pointers to call the appropriate
> enqueue or dequeue functions, while the rte_ring specific functions are
> direct function calls in the code and are often inlined by the compiler."
> 
> Is that statement correct ? I would imagine that inlined code would be be
> faster than using function pointers ?

Actually, the Intel DPDK has a bad case of inlineitis. The code for ring's
and other parts use inline on largish functions which bloats the code without
any perceivable gain in performance. The larger code causes more cache misses
which actually hurt performance.  Also using GCC link time optimization helps
to reduce any need for inlining larger code bits.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found]                         ` <20140216110241.0e789750-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
@ 2014-02-17 12:49                           ` jigsaw
       [not found]                             ` <CAHVfvh4-KNT8EaGZ_HZaWwYEZ45QD3DO1znYZEXMO0Dy_Aiceg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: jigsaw @ 2014-02-17 12:49 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev-VfR2kkLFssw

Hi Stephen,

Have you tried link time optimization on DPDK application? Does it
decrease the I-cache miss rate evidently?

thx &
rgds,
-Qinglai

On Sun, Feb 16, 2014 at 9:02 PM, Stephen Hemminger
<stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org> wrote:
> On Fri, 14 Feb 2014 15:11:29 -0500
> Ymo Lists <ymolists-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
>> "Enqueuing and dequeuing items from an rte_ring using the rings-based PMD
>> may be slower than using the native rings API. This is because Intel® DPDK
>> Ethernet drivers make use of function pointers to call the appropriate
>> enqueue or dequeue functions, while the rte_ring specific functions are
>> direct function calls in the code and are often inlined by the compiler."
>>
>> Is that statement correct ? I would imagine that inlined code would be be
>> faster than using function pointers ?
>
> Actually, the Intel DPDK has a bad case of inlineitis. The code for ring's
> and other parts use inline on largish functions which bloats the code without
> any perceivable gain in performance. The larger code causes more cache misses
> which actually hurt performance.  Also using GCC link time optimization helps
> to reduce any need for inlining larger code bits.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found]                             ` <CAHVfvh4-KNT8EaGZ_HZaWwYEZ45QD3DO1znYZEXMO0Dy_Aiceg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2014-02-17 16:41                               ` Stephen Hemminger
       [not found]                                 ` <20140217084150.4a2d1f4c-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Hemminger @ 2014-02-17 16:41 UTC (permalink / raw)
  To: jigsaw; +Cc: dev-VfR2kkLFssw

On Mon, 17 Feb 2014 14:49:47 +0200
jigsaw <jigsaw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Hi Stephen,
> 
> Have you tried link time optimization on DPDK application? Does it
> decrease the I-cache miss rate evidently?
> 
> thx &
> rgds,
> -Qinglai
> 

We use link-time-optimization without any problem.
No big performance gain, but I really don't think all the inlining of big
functions is necessary.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Is it possible to have dpdk running with no dependency on a nic ?
       [not found]                                 ` <20140217084150.4a2d1f4c-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
@ 2014-02-17 17:52                                   ` Venkatesan, Venky
  0 siblings, 0 replies; 10+ messages in thread
From: Venkatesan, Venky @ 2014-02-17 17:52 UTC (permalink / raw)
  To: Stephen Hemminger, jigsaw; +Cc: dev-VfR2kkLFssw

If in-lining is that big a concern, you could create your own wrapper function and explicitly mark it no-inline. Personally, I haven't seen any inordinate increase in i-cache miss rates because of in-lining on the applications we have - prefetchers on IA are usually capable of keeping up. However, every application is different enough that there really is no "general" rule here.

-Venky


-----Original Message-----
From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Stephen Hemminger
Sent: Monday, February 17, 2014 8:42 AM
To: jigsaw
Cc: dev-VfR2kkLFssw@public.gmane.org
Subject: Re: [dpdk-dev] Is it possible to have dpdk running with no dependency on a nic ?

On Mon, 17 Feb 2014 14:49:47 +0200
jigsaw <jigsaw-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> Hi Stephen,
> 
> Have you tried link time optimization on DPDK application? Does it 
> decrease the I-cache miss rate evidently?
> 
> thx &
> rgds,
> -Qinglai
> 

We use link-time-optimization without any problem.
No big performance gain, but I really don't think all the inlining of big functions is necessary.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-02-17 17:52 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12 18:21 Is it possible to have dpdk running with no dependency on a nic ? Ymo Lists
     [not found] ` <CACSP18RNigOqE8ORBZWV5F5C8SEu_40W7sJ7ikhuYufX6V_xow-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-13 20:19   ` Ymo Lists
     [not found]     ` <CACSP18RWf1ExHW18fpWsQ9Y=g7f2y_yo2k-0AvCiAK9Ju1rSpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-14  8:42       ` Vivek Soni
     [not found]         ` <CA+U1=GuECxtwiLKoZTxgEwJ2hqqBm=V28ZyAaYBsOz7CTcvbqA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-14 17:20           ` Ymo Lists
     [not found]             ` <CACSP18QDnVVP8sRabLwk+-TKyz0ePC7H+w54hZ-R_BHcMUmahg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-14 18:20               ` Jayakumar, Muthurajan
     [not found]                 ` <5D695A7F6F10504DBD9B9187395A21797C6E384A-P5GAC/sN6hlQxe9IK+vIArfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-02-14 20:11                   ` Ymo Lists
     [not found]                     ` <CACSP18QdpFb71x0JymmDuicz7ft68U6cbcNVC=i47yprWp4FWQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-16 19:02                       ` Stephen Hemminger
     [not found]                         ` <20140216110241.0e789750-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
2014-02-17 12:49                           ` jigsaw
     [not found]                             ` <CAHVfvh4-KNT8EaGZ_HZaWwYEZ45QD3DO1znYZEXMO0Dy_Aiceg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-02-17 16:41                               ` Stephen Hemminger
     [not found]                                 ` <20140217084150.4a2d1f4c-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
2014-02-17 17:52                                   ` Venkatesan, Venky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.