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 830CB43760; Fri, 22 Dec 2023 17:17:55 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 48320402B9; Fri, 22 Dec 2023 17:17:55 +0100 (CET) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 31C0F402A6 for ; Fri, 22 Dec 2023 17:17:54 +0100 (CET) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 5834C21AE4; Fri, 22 Dec 2023 17:17:52 +0100 (CET) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] net/i40e: add diagnostic support in TX path X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 22 Dec 2023 17:17:47 +0100 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F0F5@smartserver.smartshare.dk> In-Reply-To: <20231221101336.2815928-1-mingjinx.ye@intel.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] net/i40e: add diagnostic support in TX path Thread-Index: Adoz+I2aEk7jX6KuTretJX41L+vmUAA+JKpA References: <20231221101336.2815928-1-mingjinx.ye@intel.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Mingjin Ye" , Cc: , "Yuying Zhang" , "Beilei Xing" 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 > From: Mingjin Ye [mailto:mingjinx.ye@intel.com] > Sent: Thursday, 21 December 2023 11.14 >=20 > The only way to enable diagnostics for TX paths is to modify the > application source code. Making it difficult to diagnose faults. >=20 > In this patch, the devarg option "mbuf_check" is introduced and the > parameters are configured to enable the corresponding diagnostics. Why not use the already existing RTE_LIBRTE_MBUF_DEBUG? >=20 > supported cases: mbuf, size, segment, offload, strict. > 1. mbuf: check for corrupted mbuf. > 2. size: check min/max packet length according to hw spec. > 3. segment: check number of mbuf segments not exceed hw limitation. > 4. offload: check any unsupported offload flag. > 5. strict: check protocol headers. These are all good things to test for, when debugging. The checks should be part of RTE_LIBRTE_MBUF_DEBUG, instead of = introducing yet another runtime parameter. Also, it would be better to add these checks somewhere in the ethdev = library instead of in the individual drivers. That would make them = available for all drivers. >=20 > parameter format: mbuf_check=3D[mbuf,,] > eg: dpdk-testpmd -a 0000:81:01.0,mbuf_check=3D[mbuf,size] -- -i >=20 > Signed-off-by: Mingjin Ye > ---