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 C88F543BCD; Fri, 1 Mar 2024 11:25:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64CCC4335A; Fri, 1 Mar 2024 11:25:04 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 37341400D5 for ; Fri, 1 Mar 2024 11:25:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709288703; x=1740824703; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=DbLwUqVEtoNFvnW2ODQYJGUFUJxlGX2kgyWhY9dylfU=; b=VH0TslpLzi3wLQiAPFvjreFUvGxUrYwLCw5NkmFD3qjHKXKs2vn4ZHHz VEc1gfrKWIgqEVsjySNdz2/9QI38O0IxFCcakMk0ZY0CcACpGIIef8aaJ 82FyhPiE2XQB/7BkdiCJFW/lqLrWrh0CToEPdBNBqOWjJkmSnCPgLOdC0 ZnmKv2q+z0V87trDulHwUd819cILmiAfE9AfkeTwjj+rGrwXwyS826JpB vCQSQHG9p5Iku4zZk52xk47/PLNUk+dQSF9kgUPcZ1J1v2ukDJ72W/ddy LOfTpQHOO/jcQdFXaOnFoVVR3EbVdIMY3bQwk3gjKgNl8qxZbE4K7n4Kf g==; X-IronPort-AV: E=McAfee;i="6600,9927,10999"; a="21359627" X-IronPort-AV: E=Sophos;i="6.06,195,1705392000"; d="scan'208";a="21359627" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Mar 2024 02:25:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,195,1705392000"; d="scan'208";a="8105610" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmviesa010.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 01 Mar 2024 02:25:02 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 1 Mar 2024 02:25:01 -0800 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 1 Mar 2024 02:25:01 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Fri, 1 Mar 2024 02:25:01 -0800 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.168) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 1 Mar 2024 02:25:01 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=buEOPmpf78CqlqShIDLORK9m9IcqfduS3S7Uv56co1rUNvLnP93wLyhNdQoQY8KmXKeodsJSWQ2nAA50cJttw3BQvBKNjDdpmWhvIqFMNsAzGpWIE0SDjDmFQ+N2KmOCKSoamErArn77B95MUN3UOoa2lgXvK/RkwsjexTK8H240DoLWqVgFeXIzIZXaaCdpJ0GFv+SvXVuBpe+/2+4I+H9dbhi1G7f46KLcINY5AlThQ1BeuFEtHoy8nJ06woqfmywpyARYv8baSp0r8AuPfMhRabqzxfNpNViJmNq9MDIZOLU3sdB5NB9W+nybhnPKUrzzxMt5UX2XJa89bo75Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Th6r0oLLqzDWEYq/R27tjGkb2Qz5tfgTblI5E5XPpuY=; b=QObhwF0EhQLT1vfSUivSNIW7dwnt8O/O9b1P9UvEfK7m4MOzaZNohR+0IfBCobLjwAe/tdsKBURkUQkdUN9lhxj+4dqYv9/umIFfxDbnFVeZMkE8/aL/pkpm7wM+ET0+btmpm9mukNSGqhdFWvyTOf9FDR4m2gk7NL7fDNFYU0R0s5LHfClp9yOwMeSu9p0gMnFUaY4kmoOtcM/3OctHdQymgk9wY9DbrVJLUfxXPOpoCBrN4QY1hwue1qSVrhrnXKD8IjFcoP3iNgXXQbgtTm/rFsizFPgug+8n2CLl40PCcHexSdSyBJ6gcpJ+LgVbRH70MoifTDF2jrSmO6HaTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DS7PR11MB6271.namprd11.prod.outlook.com (2603:10b6:8:95::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.17; Fri, 1 Mar 2024 10:24:59 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d10:3009:a8d3:1d2e]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::d10:3009:a8d3:1d2e%7]) with mapi id 15.20.7339.024; Fri, 1 Mar 2024 10:24:59 +0000 Date: Fri, 1 Mar 2024 10:24:55 +0000 From: Bruce Richardson To: Mingjin Ye CC: , Yuying Zhang , Beilei Xing Subject: Re: [PATCH v5] net/i40e: add diagnostic support in TX path Message-ID: References: <20240105095956.2402477-1-mingjinx.ye@intel.com> <20240301094422.460012-1-mingjinx.ye@intel.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20240301094422.460012-1-mingjinx.ye@intel.com> X-ClientProxiedBy: DUZPR01CA0313.eurprd01.prod.exchangelabs.com (2603:10a6:10:4ba::11) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DS7PR11MB6271:EE_ X-MS-Office365-Filtering-Correlation-Id: 2dc47139-cf2e-4e42-12e6-08dc39d9d914 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1ktVvH5J1G2aPllgVLOHJa1Cn7315TsyMmkLvsNviP1IV2YXL5GlaBFLEpbH0TLXegbXIsL9PYwR85Omk46qOyJYo+Owp+KJ309A9khqhWXusoP4kGAcDfXPZO8skOm37emnxw79tyzs2OWseQrBG9vPjx5SWYsVopoorjAGNtv/spuBYm4x2QjWFUl7RQLtd5AaFmDznC7cUoxxFXegBItfW5pEakG/gADw1dwjV8AJSQ7tj1GhVTZF+fAOw7+cBFyzOBqNCqsumqbTmJOcZLEpIaT4MfU5zQG9fw0izxXmIuHh4OOzDnDA5ItoonlTPBKXKVT8CnsJJsSJl10VyH3nZclmdtft9xkAadU6RVLw2kmw85EdUTE3X5BWtcmNe3PMEdL1LSRBQa9tuhia9aklwHFzAkwPgijxCbiB/3VSWM7QILad52s7J1ibf0aXo87af0Z5L+3tHNWvNL08dW6K1w4wIWksZ1NsZFOpjrU9VJL2KHnFs4PUfAqpGXCyrONKdshdF5dL8lc0oro1sai0grb09qoZcIUBe4OldC9w0lnpWNePVju0XPbcxl6RZevp5O7T662GTesFuJaQ1MznaUcUj95gpWlTlQqWrdG0/H4tXttNV/3EDaocG/gMv9tmYRPJM3N0uDNGIQiGNw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?gE1bPa6Tmc7TgiDH+qt8pRa0iXg73+bZa0UX+YRSujoVLV7rO5sz2AxS/bnI?= =?us-ascii?Q?UGfDv1jKjgsuVLFcqZ33ede1uficx7SClcSrmPIFUe87Nb6tOcuV/X9cfXJS?= =?us-ascii?Q?HnmijLfwsvpCw5cdLoCI63n7gY9R8HCtKusv8tFmJDcWLLagoiIoHKn81g4r?= =?us-ascii?Q?Wf6r4agLbLjq3GXxXTnNmXC2eIF75I7jOgs3XOciLo/0ceEzHrpiaQmtpydg?= =?us-ascii?Q?za39M5hHlNpxNcg5dZW4J0BpWT1d1zbHfF0vZ3Epz8vkumv+Xq3Zj2k3wD8x?= =?us-ascii?Q?PpQ2w9kbq83AD6o86Ff1YJS9Qf8v0l2SeKjCm9e5UxjGYgs4Huc6lv8Ziboo?= =?us-ascii?Q?ZvwNc35r42Q/NGKrlGak9icPaPfzUftFqQep+58mbwfDqh35fpTNbY2S4PIU?= =?us-ascii?Q?AnGTRyB96uR0KPPzeTujeDdCbSCyLHdVC1iWkrzYb6bbHtuQwuv7Pot4V1fE?= =?us-ascii?Q?AlrW8RwNJfNigCMnG92lAO1dEH4XQrVpXHKH70zVOo88wLE+ql4qWSZmMfU4?= =?us-ascii?Q?ixpUG/kRJYsdS/XriMmoQkPO+1KZXYy8NZW2R/EgfpMYlUFJxRDBo0k5ch2E?= =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9Yfmo5eMxUwaER2OGWwszMbM?= =?us-ascii?Q?hjcP7iCeTmllzGWwRL68wOD+dIKgYJgTucFhfGYeOYvZsvX1MQicUu3doYFn?= =?us-ascii?Q?B2DoplDSnUyxL+h+Kz/NazyJokd7sH7TpzPb9eaPGHFMIjATTxjwnJ5e5nK/?= =?us-ascii?Q?dA=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 2dc47139-cf2e-4e42-12e6-08dc39d9d914 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Mar 2024 10:24:59.3792 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: XeyuFaOXx4ryD4wD+NZ8ajsK3Jop2BM9u7bvD/InIVpCCR16zSL3Chaid63AJcJXlIPNTGdcUBKca+JbbG+NuONc/UCgrU31NZo6fqz9NQE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR11MB6271 X-OriginatorOrg: intel.com 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 Fri, Mar 01, 2024 at 09:44:21AM +0000, Mingjin Ye wrote: > Implemented a Tx wrapper to perform a thorough check on mbufs, > categorizing and counting invalid cases by types for diagnostic > purposes. The count of invalid cases is accessible through xstats_get. > > Also, the devarg option "mbuf_check" was introduced to configure the > diagnostic parameters to enable the appropriate diagnostic features. > > supported cases: mbuf, size, segment, offload. > 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. > > parameter format: "mbuf_check=" or "mbuf_check=[,]" > eg: dpdk-testpmd -a 0000:81:01.0,mbuf_check=[mbuf,size] -- -i > > Signed-off-by: Mingjin Ye > --- > v2: remove strict. > --- > v3: optimised. > --- > v4: rebase. > --- > v5: fix ci error. > --- > doc/guides/nics/i40e.rst | 13 +++ > drivers/net/i40e/i40e_ethdev.c | 138 ++++++++++++++++++++++++++++- > drivers/net/i40e/i40e_ethdev.h | 28 ++++++ > drivers/net/i40e/i40e_rxtx.c | 153 +++++++++++++++++++++++++++++++-- > drivers/net/i40e/i40e_rxtx.h | 2 + > 5 files changed, 326 insertions(+), 8 deletions(-) > > diff --git a/doc/guides/nics/i40e.rst b/doc/guides/nics/i40e.rst > index 15689ac958..bf1d1e5d60 100644 > --- a/doc/guides/nics/i40e.rst > +++ b/doc/guides/nics/i40e.rst > @@ -275,6 +275,19 @@ Runtime Configuration > > -a 84:00.0,vf_msg_cfg=80@120:180 > > +- ``Support TX diagnostics`` (default ``not enabled``) > + > + Set the ``devargs`` parameter ``mbuf_check`` to enable TX diagnostics. For example, > + ``-a 18:01.0,mbuf_check=`` or ``-a 18:01.0,mbuf_check=[,...]``. Also, > + ``xstats_get`` can be used to get the error counts, which are collected in > + ``tx_mbuf_error_packets`` xstats. For example, ``testpmd> show port xstats all``. > + Supported cases: > + > + * mbuf: Check for corrupted mbuf. > + * size: Check min/max packet length according to hw spec. > + * segment: Check number of mbuf segments not exceed hw limitation. > + * offload: Check any unsupported offload flag. > + Hi Mingjin, please see the changes made to the equivalent doc (and commit-log) updates for iavf when I applied that earlier patch to next-net-intel. This patch should be updated to match that. Changes were pretty basic, but still useful, for example, aligning line breaks to punctuation. Thanks, /Bruce PS: This feedback applies to the net/ice patch too.