Thread (4 messages) 4 messages, 2 authors, 2021-10-08

Re: [dpdk-dev] Questions about vm2vm vhost-user/virtio-net test

From: Min Hu (Connor) <hidden>
Date: 2021-10-08 06:55:45

Hi, David, thanks for your reply,
  other question as below,

在 2021/10/1 2:25, David Christensen 写道:

On 9/30/21 2:07 AM, Min Hu (Connor) wrote:
quoted
Hi, all,
     I got the answer: testpmd fwd mode should be set "io", then ping
OK.

     IO fwd mode, it will not change packet MAC address info, and
ping OK
     MAC fwd mode, it will change packet MAC address info, like:
     "rte_ether_addr_copy(&peer_eth_addrs[fs->peer_addr],
                 &eth_hdr->d_addr);
     rte_ether_addr_copy(&ports[fs->tx_port].eth_addr,
                 &eth_hdr->s_addr)"
     Then, ping failed.

     So, everyone, I got one question: how could this happen?
     router change packet src MAC and dst MAC, but ping OK,
     testpmd vhost, treated as switch, also changes packert src MAC
     and dst MAC, but ping failed ?
Running testpmd in this configuration is more like a virtual wire, not a 
switch, though in both cases the SRC/DST MAC addresses aren't typically 
Well, if SRC/DST MAC addresses modifed in some case, what will happen?
That is, A send ping request to B, while SRC/DST MAC addresses
modified,B can get the packet, but B cannot send ping reply.
This is the result of my test. Why?

modified by the wire/switch when the frame is in transit. Both endpoints 
reside in the same Ethernet broadcast domain and can talk to each other 
directly.

A router typically connects two different broadcast domains, which may 
or may not be using Ethernet, so the router usually changes the SRC/DST 
MAC address to work correctly as the frame transitions from one 
broadcast domain into another. See 
https://en.wikipedia.org/wiki/Broadcast_domain.

Dave
.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help