DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] DPDK packet capture question
@ 2015-06-22  0:09 Daeyoung Kim
  2015-06-22  2:40 ` Matthew Hall
  0 siblings, 1 reply; 2+ messages in thread
From: Daeyoung Kim @ 2015-06-22  0:09 UTC (permalink / raw)
  To: dev

Hello,

I am a newbie to DPDK. I'm making a packet capture program from the l3fwd
sample application. When I tested my program in a virtual environment, it
worked. But in a real world, it does not work correctly. In the virtual
environment, there are 3 VMs. VM1 sends DNS packets to VM3 and VM3 also
replies to VM1. VM2 as DPDK promiscuous mode captures the packets. In this
settings, the port 0 receives all the packets, but the port 1 receives
nothing. I want to get all the packets on both ports, but anyway it's fine.

Now, in the real world, a client sends DNS packets to a DNS server, but
between them, there are 3 switches. The DPDK port 0 is connected to the
switch 1 and the port 1 is connected the switch 3. The port 0 receives only
DNS queries and the port 1 receives only DNS responses. I use Intel I-350
NIC. The network looks like below.

CLIENT -> SWITCH1 -> SWITCH2 -> SWITCH3 -> DNS
              |
   |
           PORT 0                                                     PORT 1

I don't know how to fix it. When I tested with WireShark, it received both
packets on both ports.
Do you have any idea? Am I missing something?

Thank you very much in advance.
Dan

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

* Re: [dpdk-dev] DPDK packet capture question
  2015-06-22  0:09 [dpdk-dev] DPDK packet capture question Daeyoung Kim
@ 2015-06-22  2:40 ` Matthew Hall
  0 siblings, 0 replies; 2+ messages in thread
From: Matthew Hall @ 2015-06-22  2:40 UTC (permalink / raw)
  To: Daeyoung Kim; +Cc: dev

On Jun 21, 2015, at 5:09 PM, Daeyoung Kim <kdy1029@gmail.com> wrote:
> I am a newbie to DPDK.

Welcome!

> I'm making a packet capture program from the l3fwd
> sample application. When I tested my program in a virtual environment, it
> worked. But in a real world, it does not work correctly.

This topology is kind of complicated.

I recommend beginning with just a single port sending ARPs, pings, etc. It takes a lot of careful work to get everything right.

Switches are going to drop some packets from different ports depending on the MAC addresses they learn from the traffic.

So if there is a switch, when beginning it is good to enable a mirror mode on two systems communicating, and sending the mirror to the DPDK port that is listening. Or use some kind of cheap 100BaseT network tap (Gigabit-plus active taps are very expensive, and not needed for simple uses like this anyway, as you don't usually send heavy traffic when just debugging).

There is also a promiscuous flag in DPDK which you usually end up needing to set if you are doing special-purpose stuff...

rte_eth_promiscuous_enable(port_id)

Good luck, happy hacking!
Matthew.

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

end of thread, other threads:[~2015-06-22  2:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22  0:09 [dpdk-dev] DPDK packet capture question Daeyoung Kim
2015-06-22  2:40 ` Matthew Hall

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