DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Running independent processes on the same machine
@ 2014-07-20 18:03 Kai Zhang
  2014-07-20 19:15 ` Richardson, Bruce
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Zhang @ 2014-07-20 18:03 UTC (permalink / raw)
  To: dev

Hello,

I have been trying to measure the round trip latency with two machines,
A->B->A. I modified l2fwd as two new apps: rx and tx, where tx sends
packets and embeds time stamp, rx receives packets and calculate the round
trip latency.
The source code are as follows:
https://github.com/kay21s/dpdk/tree/master/examples/rx
https://github.com/kay21s/dpdk/tree/master/examples/tx

Both of rx and tx run correctly if only one app is running. However, when I
am trying to run rx and tx simultaneously on machine A, rx cannot receive
any packets.
The commands I used are


sudo ./build/tx -c 0x2 -n 1 --file-prefix p2 -m 64 -- -q 1 -p 1
sudo ./build/rx -c 0x1 -n 1 --file-prefix p1 -m 64 -- -q 1 -p 1

Thanks for your help,
Kai

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

* Re: [dpdk-dev] Running independent processes on the same machine
  2014-07-20 18:03 [dpdk-dev] Running independent processes on the same machine Kai Zhang
@ 2014-07-20 19:15 ` Richardson, Bruce
  2014-07-21  0:19   ` Kai Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Richardson, Bruce @ 2014-07-20 19:15 UTC (permalink / raw)
  To: Kai Zhang, dev

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Kai Zhang
> Sent: Sunday, July 20, 2014 11:04 AM
> To: dev@dpdk.org
> Subject: [dpdk-dev] Running independent processes on the same machine
> 
> Hello,
> 
> I have been trying to measure the round trip latency with two machines,
> A->B->A. I modified l2fwd as two new apps: rx and tx, where tx sends
> packets and embeds time stamp, rx receives packets and calculate the round
> trip latency.
> The source code are as follows:
> https://github.com/kay21s/dpdk/tree/master/examples/rx
> https://github.com/kay21s/dpdk/tree/master/examples/tx
> 
> Both of rx and tx run correctly if only one app is running. However, when I
> am trying to run rx and tx simultaneously on machine A, rx cannot receive
> any packets.
> The commands I used are
> 
> 
> sudo ./build/tx -c 0x2 -n 1 --file-prefix p2 -m 64 -- -q 1 -p 1
> sudo ./build/rx -c 0x1 -n 1 --file-prefix p1 -m 64 -- -q 1 -p 1
> 
> Thanks for your help,
> Kai

Hi Kai,

Two independent processes on the same machine cannot share Ethernet ports as each will reconfigure the ports for its own use when it runs. To run independent processes, you need to assign unique ports to each one and blacklist the ports being used by any other processes so that the new process doesn't reset those ports and stop the other processes from working.

Regards,
/Bruce

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

* Re: [dpdk-dev] Running independent processes on the same machine
  2014-07-20 19:15 ` Richardson, Bruce
@ 2014-07-21  0:19   ` Kai Zhang
  0 siblings, 0 replies; 3+ messages in thread
From: Kai Zhang @ 2014-07-21  0:19 UTC (permalink / raw)
  To: Richardson, Bruce; +Cc: dev

Hi Bruce,

Thanks for your help. I have implemented rx and tx in the same program to
measure round trip latency.

2 machines (A and B) are connected back-to-back with Intel 82599 NIC.
Machine A embeds a time stamp in the packet and sends to B, B (use testpmd
or l2fwd) forwards packets back to A immediately (A->B->A), and A receives
packets and calculates time difference between current time and the
embedded time stamp. (code :
https://github.com/kay21s/dpdk/tree/master/examples/recv_send)

I got an average of 650~720 microseconds round-trip latency. I have 3
machines, and performing the above experiment on each pair leads to a
similar latency. However, previous academic papers report that DPDK offers
only a few 10 microseconds round trip latency.

What's the round trip latency DPDK is supposed to offer? Have you measured
it at Intel?

Thanks a lot,
Kai

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

end of thread, other threads:[~2014-07-21  0:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-20 18:03 [dpdk-dev] Running independent processes on the same machine Kai Zhang
2014-07-20 19:15 ` Richardson, Bruce
2014-07-21  0:19   ` Kai Zhang

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