DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Christensen <drc@linux.vnet.ibm.com>
To: "Min Hu (Connor)" <humin29@huawei.com>, dev@dpdk.org
Cc: Maxime Coquelin <maxime.coquelin@redhat.com>,
	chenbo.xia@intel.com, Thomas Monjalon <thomas@monjalon.net>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] Questions about vm2vm vhost-user/virtio-net test
Date: Thu, 30 Sep 2021 11:25:46 -0700	[thread overview]
Message-ID: <a832b361-3e4d-29ff-70ff-a7703096c2ce@linux.vnet.ibm.com> (raw)
In-Reply-To: <309f930f-1022-77f8-d65c-2920275e7d0d@huawei.com>



On 9/30/21 2:07 AM, Min Hu (Connor) wrote:
> 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 
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

  reply	other threads:[~2021-09-30 18:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-29 12:09 Min Hu (Connor)
2021-09-30  9:07 ` Min Hu (Connor)
2021-09-30 18:25   ` David Christensen [this message]
2021-10-08  6:55     ` Min Hu (Connor)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a832b361-3e4d-29ff-70ff-a7703096c2ce@linux.vnet.ibm.com \
    --to=drc@linux.vnet.ibm.com \
    --cc=chenbo.xia@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=humin29@huawei.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).