DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  Is there any example application to used DPDK packet distributor library?
@ 2015-09-30  5:45 최익성
  2015-09-30  7:04 ` Joongi Kim
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: 최익성 @ 2015-09-30  5:45 UTC (permalink / raw)
  To: dev

Dear DPDK experts.
 
I am Ick-Sung Choi living in South Korea.
 
I have a question about DPDK에 packet distributor library.
 
Is there any example application to used DPDK packet distributor library?
 
I am trying to experiment simple function using DPDK packet distributor library.
 
If I can study an example application of DPDK packet distributor library, it would be very helpful for my experiment.
 
I will appreciate if I can be given any example applications, advice, and information.
 
Thank you very much.
 
Sincerely Yours,
 
Ick-Sung Choi.
 

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

* Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
  2015-09-30  5:45 [dpdk-dev] Is there any example application to used DPDK packet distributor library? 최익성
@ 2015-09-30  7:04 ` Joongi Kim
  2015-09-30 10:56 ` Bruce Richardson
  2016-01-06 10:37 ` Pattan, Reshma
  2 siblings, 0 replies; 8+ messages in thread
From: Joongi Kim @ 2015-09-30  7:04 UTC (permalink / raw)
  To: 최익성, dev

Hello,
DPDK already provides a number of example applications:
http://dpdk.org/browse/dpdk/tree/examples
You may find my projects to be useful as well:
https://github.com/anlab-kaist/pspgen-dpdk &
https://github.com/anlab-kaist/NBA

ps. DPDK is not a packet "distributor" library but more close to "packet
I/O" library with a lot of utilities, as it not only does packet RX but
also packet TX. (the major usage pattern is to receive, process, and then
forward packets.)

Regards,
Joongi

2015년 9월 30일 (수) 오후 2:45, 최익성 <pnk003@naver.com>님이 작성:

> Dear DPDK experts.
>
> I am Ick-Sung Choi living in South Korea.
>
> I have a question about DPDK에 packet distributor library.
>
> Is there any example application to used DPDK packet distributor library?
>
> I am trying to experiment simple function using DPDK packet distributor
> library.
>
> If I can study an example application of DPDK packet distributor library,
> it would be very helpful for my experiment.
>
> I will appreciate if I can be given any example applications, advice, and
> information.
>
> Thank you very much.
>
> Sincerely Yours,
>
> Ick-Sung Choi.
>
>

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

* Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
  2015-09-30  5:45 [dpdk-dev] Is there any example application to used DPDK packet distributor library? 최익성
  2015-09-30  7:04 ` Joongi Kim
@ 2015-09-30 10:56 ` Bruce Richardson
  2015-09-30 11:41   ` 최익성
  2016-01-06 10:37 ` Pattan, Reshma
  2 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2015-09-30 10:56 UTC (permalink / raw)
  To: 최익성; +Cc: dev

On Wed, Sep 30, 2015 at 02:45:20PM +0900, 최익성 wrote:
> Dear DPDK experts.
>  
> I am Ick-Sung Choi living in South Korea.
>  
> I have a question about DPDK에 packet distributor library.
>  
> Is there any example application to used DPDK packet distributor library?
>  
> I am trying to experiment simple function using DPDK packet distributor library.
>  
> If I can study an example application of DPDK packet distributor library, it would be very helpful for my experiment.
>  
> I will appreciate if I can be given any example applications, advice, and information.
>  
> Thank you very much.
>  
> Sincerely Yours,
>  
> Ick-Sung Choi.
>  
Hi,

there is a "distributor" example app in the examples directory.

/Bruce

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

* Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
  2015-09-30 10:56 ` Bruce Richardson
@ 2015-09-30 11:41   ` 최익성
  2015-09-30 12:03     ` Bruce Richardson
  0 siblings, 1 reply; 8+ messages in thread
From: 최익성 @ 2015-09-30 11:41 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

 Dear Bruce Richardson and DPDK experts.
 
Thank you very much for your precious answer.
 
I found it. It seems very short and simple.
 
Thank you very much.
 
I have another question.
 
I don't know how the following steps work from new_tag to match variables.
 
/* in dpdk library. ~/dpdk-?.?.?/lib/librte_distributor/rte_distributor.c */
/* process a set of packets to distribute them to workers */
rte_distributor_process(struct rte_distributor *d, struct rte_mbuf **mbufs, unsigned num_mbufs)
{
...
     new_tag = next_mb-&gt;hash.usr;  /* flow ID hash.usr is set by NIC */
 
     for (i = 0; i &lt; d-&gt;num_workers; i++)
          match |= (!(d-&gt;in_flight_tags[i] ^ new_tag) &lt;&lt; i);
 
     /* Only turned-on bits are considered as match */
     match &amp;= d-&gt;in_flight_bitmask;
 
     unsigned worker = __builtin_ctzl(match);
...
}
 
I will appreciate if you let me know the steps.
 
Thank you very much.
 
Sincerely Yours,
 
Ick-Sung Choi.
 
 
-----Original Message-----
From: "Bruce Richardson"&lt;bruce.richardson@intel.com&gt; 
To: "최익성"&lt;pnk003@naver.com&gt;; 
Cc: &lt;dev@dpdk.org&gt;; 
Sent: 2015-09-30 (수) 19:56:28
Subject: Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
 
On Wed, Sep 30, 2015 at 02:45:20PM +0900, 최익성 wrote:
&gt; Dear DPDK experts.
&gt;  
&gt; I am Ick-Sung Choi living in South Korea.
&gt;  
&gt; I have a question about DPDK에 packet distributor library.
&gt;  
&gt; Is there any example application to used DPDK packet distributor library?
&gt;  
&gt; I am trying to experiment simple function using DPDK packet distributor library.
&gt;  
&gt; If I can study an example application of DPDK packet distributor library, it would be very helpful for my experiment.
&gt;  
&gt; I will appreciate if I can be given any example applications, advice, and information.
&gt;  
&gt; Thank you very much.
&gt;  
&gt; Sincerely Yours,
&gt;  
&gt; Ick-Sung Choi.
&gt;  
Hi,

there is a "distributor" example app in the examples directory.

/Bruce


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

* Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
  2015-09-30 11:41   ` 최익성
@ 2015-09-30 12:03     ` Bruce Richardson
  2015-10-01  1:41       ` 최익성
  0 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2015-09-30 12:03 UTC (permalink / raw)
  To: 최익성; +Cc: dev

On Wed, Sep 30, 2015 at 08:41:04PM +0900, 최익성 wrote:
>  Dear Bruce Richardson and DPDK experts.
>  
> Thank you very much for your precious answer.
>  
> I found it. It seems very short and simple.
>  
> Thank you very much.
>  
> I have another question.
>  
> I don't know how the following steps work from new_tag to match variables.
>  
> /* in dpdk library. ~/dpdk-?.?.?/lib/librte_distributor/rte_distributor.c */
> /* process a set of packets to distribute them to workers */
> rte_distributor_process(struct rte_distributor *d, struct rte_mbuf **mbufs, unsigned num_mbufs)
> {
> ...
>      new_tag = next_mb-&gt;hash.usr;  /* flow ID hash.usr is set by NIC */
>  
>      for (i = 0; i &lt; d-&gt;num_workers; i++)
>           match |= (!(d-&gt;in_flight_tags[i] ^ new_tag) &lt;&lt; i);
>  
>      /* Only turned-on bits are considered as match */
>      match &amp;= d-&gt;in_flight_bitmask;
>  
>      unsigned worker = __builtin_ctzl(match);
> ...
> }
>  
> I will appreciate if you let me know the steps.

We build up a bitmask for each worker, where the bit is set of the new_tag
matches the inflight tag for the worker. We then find the matching worker, if
any using count-training-zeros (ctz) operation.

/Bruce

>  
> Thank you very much.
>  
> Sincerely Yours,
>  
> Ick-Sung Choi.
>  
>  
> -----Original Message-----
> From: "Bruce Richardson"&lt;bruce.richardson@intel.com&gt; 
> To: "최익성"&lt;pnk003@naver.com&gt;; 
> Cc: &lt;dev@dpdk.org&gt;; 
> Sent: 2015-09-30 (수) 19:56:28
> Subject: Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
>  
> On Wed, Sep 30, 2015 at 02:45:20PM +0900, 최익성 wrote:
> &gt; Dear DPDK experts.
> &gt;  
> &gt; I am Ick-Sung Choi living in South Korea.
> &gt;  
> &gt; I have a question about DPDK에 packet distributor library.
> &gt;  
> &gt; Is there any example application to used DPDK packet distributor library?
> &gt;  
> &gt; I am trying to experiment simple function using DPDK packet distributor library.
> &gt;  
> &gt; If I can study an example application of DPDK packet distributor library, it would be very helpful for my experiment.
> &gt;  
> &gt; I will appreciate if I can be given any example applications, advice, and information.
> &gt;  
> &gt; Thank you very much.
> &gt;  
> &gt; Sincerely Yours,
> &gt;  
> &gt; Ick-Sung Choi.
> &gt;  
> Hi,
> 
> there is a "distributor" example app in the examples directory.
> 
> /Bruce
> 

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

* Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
  2015-09-30 12:03     ` Bruce Richardson
@ 2015-10-01  1:41       ` 최익성
  0 siblings, 0 replies; 8+ messages in thread
From: 최익성 @ 2015-10-01  1:41 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 3399 bytes --]

 Dear Bruce Richardson and DPDK experts.
 
Thank you very much for your the best great efforts and precious answers.
 
I will study and think about it.
 
Thank you very much.
 
Sincerely Yours,
 
Ick-Sung Choi.
 
-----Original Message-----
From: "Bruce Richardson"&lt;bruce.richardson@intel.com&gt; 
To: "최익성"&lt;pnk003@naver.com&gt;; 
Cc: &lt;dev@dpdk.org&gt;; 
Sent: 2015-09-30 (수) 21:03:44
Subject: Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
 
On Wed, Sep 30, 2015 at 08:41:04PM +0900, 최익성 wrote:
&gt;  Dear Bruce Richardson and DPDK experts.
&gt;  
&gt; Thank you very much for your precious answer.
&gt;  
&gt; I found it. It seems very short and simple.
&gt;  
&gt; Thank you very much.
&gt;  
&gt; I have another question.
&gt;  
&gt; I don't know how the following steps work from new_tag to match variables.
&gt;  
&gt; /* in dpdk library. ~/dpdk-?.?.?/lib/librte_distributor/rte_distributor.c */
&gt; /* process a set of packets to distribute them to workers */
&gt; rte_distributor_process(struct rte_distributor *d, struct rte_mbuf **mbufs, unsigned num_mbufs)
&gt; {
&gt; ...
&gt;      new_tag = next_mb-&gt;hash.usr;  /* flow ID hash.usr is set by NIC */
&gt;  
&gt;      for (i = 0; i &lt; d-&gt;num_workers; i++)
&gt;           match |= (!(d-&gt;in_flight_tags[i] ^ new_tag) &lt;&lt; i);
&gt;  
&gt;      /* Only turned-on bits are considered as match */
&gt;      match &amp;= d-&gt;in_flight_bitmask;
&gt;  
&gt;      unsigned worker = __builtin_ctzl(match);
&gt; ...
&gt; }
&gt;  
&gt; I will appreciate if you let me know the steps.

We build up a bitmask for each worker, where the bit is set of the new_tag
matches the inflight tag for the worker. We then find the matching worker, if
any using count-training-zeros (ctz) operation.

/Bruce

&gt;  
&gt; Thank you very much.
&gt;  
&gt; Sincerely Yours,
&gt;  
&gt; Ick-Sung Choi.
&gt;  
&gt;  
&gt; -----Original Message-----
&gt; From: "Bruce Richardson"&lt;bruce.richardson@intel.com&gt; 
&gt; To: "최익성"&lt;pnk003@naver.com&gt;; 
&gt; Cc: &lt;dev@dpdk.org&gt;; 
&gt; Sent: 2015-09-30 (수) 19:56:28
&gt; Subject: Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
&gt;  
&gt; On Wed, Sep 30, 2015 at 02:45:20PM +0900, 최익성 wrote:
&gt; &gt; Dear DPDK experts.
&gt; &gt;  
&gt; &gt; I am Ick-Sung Choi living in South Korea.
&gt; &gt;  
&gt; &gt; I have a question about DPDK에 packet distributor library.
&gt; &gt;  
&gt; &gt; Is there any example application to used DPDK packet distributor library?
&gt; &gt;  
&gt; &gt; I am trying to experiment simple function using DPDK packet distributor library.
&gt; &gt;  
&gt; &gt; If I can study an example application of DPDK packet distributor library, it would be very helpful for my experiment.
&gt; &gt;  
&gt; &gt; I will appreciate if I can be given any example applications, advice, and information.
&gt; &gt;  
&gt; &gt; Thank you very much.
&gt; &gt;  
&gt; &gt; Sincerely Yours,
&gt; &gt;  
&gt; &gt; Ick-Sung Choi.
&gt; &gt;  
&gt; Hi,
&gt; 
&gt; there is a "distributor" example app in the examples directory.
&gt; 
&gt; /Bruce
&gt; 

\x16º&vúÚ£Ÿ8‚f¢•Ê&N^[ŽrÝtëmxßm5å\x17­º¹ÏjØ]¾¶¨çÎ ™¨¥r‰‘yÇ¢½ç_®‰¦j)hoGõïH(¢	^r‰¦j)hoGõïH(¢	^r‰¶Óß9Û^5ïFòv—d¢¸\x0f¢Ë_‹\x1c"¶\x11\x1213âtOCßß\x03\x03§è­×¯v—d¢¸\x13†íNrݴם:Û^6ûM´Ð!\x12M\x17œz+Þu¼¨m¶áó\b­…#\x13>'[‡Ë(ãÎvë\x7f|¡¶ô~ŠÝz÷ivJ+gßDž§m5çmv׍´ïM\x0f\r0Ê Ä¢‚v­º·¯

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

* Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
  2015-09-30  5:45 [dpdk-dev] Is there any example application to used DPDK packet distributor library? 최익성
  2015-09-30  7:04 ` Joongi Kim
  2015-09-30 10:56 ` Bruce Richardson
@ 2016-01-06 10:37 ` Pattan, Reshma
  2016-01-06 10:49   ` 최익성
  2 siblings, 1 reply; 8+ messages in thread
From: Pattan, Reshma @ 2016-01-06 10:37 UTC (permalink / raw)
  To: ???, dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of ???
> Sent: Wednesday, September 30, 2015 6:45 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] Is there any example application to used DPDK packet
> distributor library?
> 
> Dear DPDK experts.
> 
> I am Ick-Sung Choi living in South Korea.
> 
> I have a question about DPDK에 packet distributor library.
> 
> Is there any example application to used DPDK packet distributor library?
> 
> I am trying to experiment simple function using DPDK packet distributor library.
> 

Hi,

examples/distributor/main.c is the example which explains distributor library usage.
Also, you can refer unit tests app/test/test_distributor.c and  app/test/test_distributor.c/test_distributor_perf.c

Thanks,
Reshma

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

* Re: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
  2016-01-06 10:37 ` Pattan, Reshma
@ 2016-01-06 10:49   ` 최익성
  0 siblings, 0 replies; 8+ messages in thread
From: 최익성 @ 2016-01-06 10:49 UTC (permalink / raw)
  To: PattanReshma, dev

 Dear Reshma.
Thank you very much for your answer.
I found the related codes.
I have done some coding related them  and I finished my experiments.
Thank you very much. 
Sincerely Yours,
Ick-Sung Choi.
 
-----Original Message-----
From: "Pattan, Reshma"&lt;reshma.pattan@intel.com&gt; 
To: "???"&lt;pnk003@naver.com&gt;; "dev@dpdk.org"&lt;dev@dpdk.org&gt;; 
Cc: 
Sent: 2016-01-06 (수) 19:37:35
Subject: RE: [dpdk-dev] Is there any example application to used DPDK packet distributor library?
 




&gt; -----Original Message-----

&gt; From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of ???

&gt; Sent: Wednesday, September 30, 2015 6:45 AM

&gt; To: dev@dpdk.org

&gt; Subject: [dpdk-dev] Is there any example application to used DPDK packet

&gt; distributor library?

&gt; 

&gt; Dear DPDK experts.

&gt; 

&gt; I am Ick-Sung Choi living in South Korea.

&gt; 

&gt; I have a question about DPDK에 packet distributor library.

&gt; 

&gt; Is there any example application to used DPDK packet distributor library?

&gt; 

&gt; I am trying to experiment simple function using DPDK packet distributor library.

&gt; 



Hi,



examples/distributor/main.c is the example which explains distributor library usage.

Also, you can refer unit tests app/test/test_distributor.c and  app/test/test_distributor.c/test_distributor_perf.c



Thanks,

Reshma


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

end of thread, other threads:[~2016-01-06 10:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-30  5:45 [dpdk-dev] Is there any example application to used DPDK packet distributor library? 최익성
2015-09-30  7:04 ` Joongi Kim
2015-09-30 10:56 ` Bruce Richardson
2015-09-30 11:41   ` 최익성
2015-09-30 12:03     ` Bruce Richardson
2015-10-01  1:41       ` 최익성
2016-01-06 10:37 ` Pattan, Reshma
2016-01-06 10:49   ` 최익성

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).