From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B695DA0C43; Thu, 30 Sep 2021 20:25:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 321EA40DDA; Thu, 30 Sep 2021 20:25:52 +0200 (CEST) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by mails.dpdk.org (Postfix) with ESMTP id B365C4067E for ; Thu, 30 Sep 2021 20:25:50 +0200 (CEST) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18UIGtoI008260; Thu, 30 Sep 2021 14:25:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=subject : to : cc : references : from : message-id : date : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pp1; bh=Sq3t29SHtkVOouWhXWujO9hpmOdT6C+aYBS/4+EolY0=; b=B/n+iCvDjMCcEB64t4mcYBeFfTZ8JZMC5hxE2AihG+xqSLEzkySyaB3gLnas+QTeHi6n ttr6giF1e6lNx4yj1qf0aZO826Ck4Nm3tvnFTFWTaWRXNX67ElIO27nGBcIVSgbGrKPz xAk7jxFK3pf0cqU3dXGOX1m0zLmHNq6HWfhhLN1rZR+eG3RlqtzLZ1mbdSr0RDdoPIq4 OJqwR0LwDSuJdsVUOwFxm+ThLVhucpAaPymwGaehgWSECcK2sjid8r/VvVN1virpzDq0 b5z1Jiow9kgZ7zu3y8gsDV9qcLRCFUUzhn0t2wxjNUNDvk8feYs1IoJRTDgaY07bFp+s rA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bdgcp3839-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Sep 2021 14:25:49 -0400 Received: from m0098420.ppops.net (m0098420.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 18UIK7Zg019360; Thu, 30 Sep 2021 14:25:49 -0400 Received: from ppma03wdc.us.ibm.com (ba.79.3fa9.ip4.static.sl-reverse.com [169.63.121.186]) by mx0b-001b2d01.pphosted.com with ESMTP id 3bdgcp382u-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Sep 2021 14:25:49 -0400 Received: from pps.filterd (ppma03wdc.us.ibm.com [127.0.0.1]) by ppma03wdc.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 18UIHEiB023050; Thu, 30 Sep 2021 18:25:48 GMT Received: from b01cxnp23033.gho.pok.ibm.com (b01cxnp23033.gho.pok.ibm.com [9.57.198.28]) by ppma03wdc.us.ibm.com with ESMTP id 3b9udc5f25-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 Sep 2021 18:25:48 +0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 18UIPlW130933338 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 30 Sep 2021 18:25:47 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 84B2928059; Thu, 30 Sep 2021 18:25:47 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D298B28058; Thu, 30 Sep 2021 18:25:46 +0000 (GMT) Received: from Davids-MBP.randomparity.org (unknown [9.211.69.22]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP; Thu, 30 Sep 2021 18:25:46 +0000 (GMT) To: "Min Hu (Connor)" , dev@dpdk.org Cc: Maxime Coquelin , chenbo.xia@intel.com, Thomas Monjalon , Ferruh Yigit References: <7d1804f4-e8df-82be-0c61-1d2fa182442a@huawei.com> <309f930f-1022-77f8-d65c-2920275e7d0d@huawei.com> From: David Christensen Message-ID: Date: Thu, 30 Sep 2021 11:25:46 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <309f930f-1022-77f8-d65c-2920275e7d0d@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US X-TM-AS-GCONF: 00 X-Proofpoint-GUID: 1WBK-0XIbXl7T9zWDy3fbhCBHEaiC1oZ X-Proofpoint-ORIG-GUID: SayQ3_41CePhhzpY5TfuFLa7vlEKaAzl Content-Transfer-Encoding: 8bit X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.182.1,Aquarius:18.0.790,Hydra:6.0.391,FMLib:17.0.607.475 definitions=2021-09-30_06,2021-09-30_01,2020-04-07_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 mlxscore=0 spamscore=0 suspectscore=0 lowpriorityscore=0 adultscore=0 mlxlogscore=999 clxscore=1011 phishscore=0 impostorscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001 definitions=main-2109300110 Subject: Re: [dpdk-dev] Questions about vm2vm vhost-user/virtio-net test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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], >                 ð_hdr->d_addr); >     rte_ether_addr_copy(&ports[fs->tx_port].eth_addr, >                 ð_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