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 24D15A0543; Wed, 14 Dec 2022 08:25:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B3C63400D6; Wed, 14 Dec 2022 08:25:18 +0100 (CET) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id CF8734003F for ; Wed, 14 Dec 2022 08:25:16 +0100 (CET) Received: from dggpeml500024.china.huawei.com (unknown [172.30.72.53]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NX6LS4Yqgz16LZh; Wed, 14 Dec 2022 15:24:16 +0800 (CST) Received: from [10.67.100.224] (10.67.100.224) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Wed, 14 Dec 2022 15:25:14 +0800 Subject: Re: Question about add ethdev loopback set API To: Ferruh Yigit CC: "dev@dpdk.org" References: <1109431c-2b18-cc02-5e36-5c1e2d298a82@amd.com> From: fengchengwen Message-ID: <2d70ef33-5cc8-f56e-91c1-a44fd5450ba2@huawei.com> Date: Wed, 14 Dec 2022 15:25:14 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: <1109431c-2b18-cc02-5e36-5c1e2d298a82@amd.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected 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 On 2022/12/13 19:25, Ferruh Yigit wrote: > On 12/13/2022 10:04 AM, fengchengwen wrote: >> Hi Ferruh, >> >> During the test, we need to delineate where go wrong when encountered >> e.g. CRC error. In this scenario, loopback is useful. >> >> I think we can add a loopback set API which could set inner or outer loop, >> and user can use telemetry to set the loopback in the above scenario. >> >> I'd like to hear your opinion about add a loopback set API. >> > > Hi Chengwen, > > Is the intention to test ethdev layer or driver? > > It is possible to use ring vdev to create a loopback and to test ethdev > layer. > > For driver, it can be possible to create physical loopback connection, > or even can implement loopback Rx/Tx burst functions in driver. > Using another host to send/receive packets to DUT (device under test) is > another approach. > > > What kind of loopback implementation do you have in your mind? Mainly MAC layer and lower physical layer: -------- --------------- ------------ ---------- -------------------- | | | - rx | | - rx - | | - rx - | | | | Host | - | MAC | - | SerDes | - | PHY | ==== | Packet Generator | | | | - tx | | - tx - | | - tx - | | | -------- --------------- ------------ ---------- -------------------- The support loopback in hns3 platform: Inner loopback subtypes: which host send pkts and recv and then verify: Serdes tx to rx PHY tx to rx Outer loopback subtypes: which Packet-Generator send pkts and recv and then verify: MAC tx to rx I think we could support the above loopback types, and maybe other PMD platform support more loopback types. > > > . >