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 F04684375E; Fri, 22 Dec 2023 12:37:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7748A402F0; Fri, 22 Dec 2023 12:37:52 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 0BE404025D for ; Fri, 22 Dec 2023 12:37:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1703245071; x=1734781071; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=PqZ+8W5n+7pgZSIy8XXArli0n1gO9Wi/iNA2EIb2KVc=; b=cf03g0iRG1dSGnUId/h1phTp8N3gS/w1TE1bhGDaShpqrcbxtjOYlnzF BL2FqygObwamZZaePnaHol+XkyHQ1dMdZL7hqIfBHJ2eodgCajCw8x8C7 95rKMydcE3pkhK8GPn+47Kd7crHxWuYNua4MH0gKgC/moNBWQC3gJVnUm HneuVdNRv8oQR3W/MnnSVNReVFgyxXEL9iy6nTgzr+JmNEavd5dKR/vex X4E+GgBXIeeS/YXq0xTfvcsBchaecomk61H1xiVZlWvgwZ2CksUGSDJ/o sIlNstUoI4xHirXKAqzHYBdz3LPAkSJuwWZ6KaUSQKljh/e9gZM+Nhj+2 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="427265649" X-IronPort-AV: E=Sophos;i="6.04,296,1695711600"; d="scan'208";a="427265649" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Dec 2023 03:37:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10931"; a="867614660" X-IronPort-AV: E=Sophos;i="6.04,296,1695711600"; d="scan'208";a="867614660" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by FMSMGA003.fm.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 22 Dec 2023 03:37:36 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 22 Dec 2023 03:37:35 -0800 Received: from orsmsx603.amr.corp.intel.com (10.22.229.16) by ORSMSX610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Fri, 22 Dec 2023 03:37:35 -0800 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx603.amr.corp.intel.com (10.22.229.16) 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, 22 Dec 2023 03:37:35 -0800 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.40) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Fri, 22 Dec 2023 03:37:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fkMGm/kf+Bs6vvlGtkAdjwk6tZU3B4NxpE6eejxqtdrzNjnR0Cq6ssCK3lrWhILU0enrOSoiP1tfbE2JZSDrUGQ8vAAsnqObBPpKxOe2xi6uZ0hHeKtjnIrk5440h6sh9bQFqqRfVQ1SAYvNoKNoXzlIUPa0fwWxdN/WC8AKNn3TsFQc1+Ms7gmghpst7pvgC/3v2cUTXREWk98B08bZNZAxnsI+CS3GQJyZfVVn8lPSTcLSLlAgoQbDwH1IecqaPxiy+1MOx0BnQUkSrHYWpM7E1bIqKxg89WYYmk/avqKthFBtQ4KpjU8UvXSpef1B+pcYBawzGKmFlOqeuyDu6w== 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=vhB9SnabFj+6y7Y0l9quX1wsxs/FH7HuJIsjCi1t9zk=; b=UFttyJuV3xYtQCbp61WP1RQL1Ajq+tribEQj0sv3uq3ylR5RgDNr77MKN7Or8DsCFdqHxab27wx+7AjrN2jyNVaxhimYcfAbRB+CeSa0WsVUo6fyFezvsoWB9Cp3dsPVYnCA6qFzU26ywaamgfs+uWqhIW/n9caPM3Nq7kBklC5TgW0JicUwuIWDeYquSyLeeHlvZSFBPE4nH3lBR2jBoGIEYPqbQbca4YXJcLI9qRgyxSTERUOGJ/Ki6UNmwGe/biem8mhwDxPUAoWZSptlZxObvKAN0+0W3pMEUZUjVBW62fnJPU+FoHKu4EhQxWuDyI9eUx9Ij78BQH6CUFJ5tA== 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 Received: from DM4PR11MB5994.namprd11.prod.outlook.com (2603:10b6:8:5d::20) by BL1PR11MB5301.namprd11.prod.outlook.com (2603:10b6:208:309::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.21; Fri, 22 Dec 2023 11:37:32 +0000 Received: from DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::fc91:526:bead:4f73]) by DM4PR11MB5994.namprd11.prod.outlook.com ([fe80::fc91:526:bead:4f73%4]) with mapi id 15.20.7113.019; Fri, 22 Dec 2023 11:37:31 +0000 From: "Zhang, Qi Z" To: "Ye, MingjinX" , "dev@dpdk.org" CC: "Yang, Qiming" , "Ye, MingjinX" , "Wu, Jingjing" , "Xing, Beilei" Subject: RE: [PATCH v2] net/iavf: add diagnostic support in TX path Thread-Topic: [PATCH v2] net/iavf: add diagnostic support in TX path Thread-Index: AQHaNMY+haqIxenJI0mUfCF7/kul/rC1KjzQ Date: Fri, 22 Dec 2023 11:37:31 +0000 Message-ID: References: <20231221101202.2815069-1-mingjinx.ye@intel.com> <20231222104458.3663930-1-mingjinx.ye@intel.com> In-Reply-To: <20231222104458.3663930-1-mingjinx.ye@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB5994:EE_|BL1PR11MB5301:EE_ x-ms-office365-filtering-correlation-id: eb2712a9-1937-42cb-f9a5-08dc02e2622b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: fizy/LG++J2ntFUBFkyyVuq7tfUYtq6zpCi2mUBouTHWR/3Y6l3+zcLF2vivZnT48JwEwPg6QKv/twwCs9sVqkENjSDEKrpLJa1iu2d9vLLdiOnjbtEHUv3b6WzwIEX0/KQbVx8srq6xVec7KgxmjpHbtQWy/ibXtNyceVvQyDmiE85+OSnNtF0aQLFcnCj4CUjxajpwh0tBSKu1TqwvRRISGwyskfow0lvfmp6doG0cbMR5AAHjKV2v0qbG88mZhTDuDCUeIBJo+OIZxLk1If50mb8agwYzJMT4g6sQC7UDTEdE3RQq4L+2ql6TxmJG/qUjhYeb8Ih9kycrwOynQrksY9x5b/IBidsv1YkOElfw+SUbHu2mA1rSs+Cmh2eqNdLa8nnYS+lzTCEGaEDkrh+GW5RUXXm1W5eGOvYz85gGJ3m4Ivi0bVpgZTI7U+E5ZA//pmfrFMowIs0+r4QNCIy2jGRqlH7WXsEu9Ky4uwgp0sie6OXeqKAEQ4kjwp+d+EqwF36lnXVZcjioR8I+VGoRkozXXIbT+CkxBMFiudNpwrqWjccLw+b/8AV+Bo2eVtkGvXCvefNv2ase5vHavu+wLXIJg1scGE+FFPoDLuJ6/eZB7TzgYucyqsL7DHlg x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB5994.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(366004)(396003)(136003)(376002)(346002)(39860400002)(230922051799003)(1800799012)(451199024)(186009)(64100799003)(107886003)(83380400001)(478600001)(4326008)(55016003)(8936002)(8676002)(316002)(2906002)(5660300002)(66476007)(64756008)(76116006)(9686003)(54906003)(110136005)(52536014)(66556008)(66446008)(71200400001)(66946007)(33656002)(122000001)(38100700002)(82960400001)(53546011)(26005)(86362001)(6506007)(7696005)(41300700001)(38070700009); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?phf8zijIVI//Fs+I/jauUIf0w/S5RRNRND24KO2u224ouI0mYStvxGTLQ3Ka?= =?us-ascii?Q?AtHt6Mf6rCSjJScwqEhzfO5MQVQchN7l3dTvqXLELB8Pq/5rrYhXOl46EOn9?= =?us-ascii?Q?AOVpU3j8eWUbjU4sH3DlanjYT2cllbVMsOcpN/+9Nu4REuNaSLI32mYr/w3p?= =?us-ascii?Q?T0DTXisAyrA/Hiu4YMaWqjP/fW9LomC5Qt5hyqgma4b89Qh95Po/0K8BR53n?= =?us-ascii?Q?589bch+OfxtnQZJ3+BoGczIL0tzddgdD8fjIDJ9A6g16bvOc8R/cNCP6f6Io?= =?us-ascii?Q?m5cSvCdFV1tHfWq86FOL7M/uCss/zdRzvzMVkevEaVrVHGMHeCjM7y3aDrm/?= =?us-ascii?Q?Kvm/ZqmDrcyIHGokx1fxsBb7qOQf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4qWArRBvhHDz3agRgRPevdXpwqXgzcwG6R2YVI4YyL66ECx1/lSd/Z?= =?us-ascii?Q?Ih0/4YWcTcVUqThoaHoI0ETLDE6vpask9bMgfJdGA2xTH31ao9Wnma5Ms0hr?= =?us-ascii?Q?ugeCqPQO6C+EahMaHiWFTOwxDGJ3XjY0Els+YyklBwjvszatTz0mFimnDII4?= =?us-ascii?Q?FJ/uJZeYfs/vATO7fD8puZ3J6fbNrND0jgYlMr2LtUpNp0DVUxTokPfSq498?= =?us-ascii?Q?Sb3ly0BuJWeZxsEtZhCXLmgcxxU/Iy+WkkJjOUhpPBF2uzdC3YKKOq6+Xoqk?= =?us-ascii?Q?BrwsYzuMNXQ4DsSlDaMqoo2Im5bTZuDkYZwkFOLE?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB5994.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: eb2712a9-1937-42cb-f9a5-08dc02e2622b X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Dec 2023 11:37:31.2525 (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: a+wKR4866jkdXrHgJGaeVpYEodyuK7SPKv0mCH6nwlHhNWJeLTqR0s6SXdZatAEUEBj6gDM3cJSoYl2PvLd4og== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR11MB5301 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 > -----Original Message----- > From: Mingjin Ye > Sent: Friday, December 22, 2023 6:45 PM > To: dev@dpdk.org > Cc: Yang, Qiming ; Ye, MingjinX > ; Wu, Jingjing ; Xing, Beil= ei > > Subject: [PATCH v2] net/iavf: add diagnostic support in TX path >=20 > The only way to enable diagnostics for TX paths is to modify the applicat= ion > 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. >=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. >=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 > --- > v2: Remove call chain. ... >=20 > +static struct iavf_pkt_burst iavf_rxtx_pkt_burst[RTE_MAX_ETHPORTS]; Global array is not necessary, I assume we can get adapter with rxq->vsi->a= dapter. > + > static inline void > iavf_rxd_to_pkt_fields_by_comms_ovs(__rte_unused struct iavf_rx_queue > *rxq, > struct rte_mbuf *mb, > @@ -3394,34 +3396,34 @@ check_mbuf_len(struct offload_info *info, > struct rte_mbuf *m) { > if (m->ol_flags & RTE_MBUF_F_TX_TUNNEL_MASK) { > if (info->outer_l2_len !=3D m->outer_l2_len) { > - PMD_TX_LOG(ERR, "outer_l2_len error in mbuf. > Original " > - "length: %hu, calculated length: %u", m- > >outer_l2_len, > + PMD_DRV_LOG(ERR, "outer_l2_len error in mbuf. > Original " > + "length: %d, calculated length: %u", m- > >outer_l2_len, > info->outer_l2_len); > return -1; > } > if (info->outer_l3_len !=3D m->outer_l3_len) { > - PMD_TX_LOG(ERR, "outer_l3_len error in mbuf. > Original " > - "length: %hu,calculated length: %u", m- > >outer_l3_len, > + PMD_DRV_LOG(ERR, "outer_l3_len error in mbuf. > Original " > + "length: %d,calculated length: %u", m->outer_l3_len, > info->outer_l3_len); > return -1; > } > } >=20 > if (info->l2_len !=3D m->l2_len) { > - PMD_TX_LOG(ERR, "l2_len error in mbuf. Original " > - "length: %hu, calculated length: %u", m->l2_len, > + PMD_DRV_LOG(ERR, "l2_len error in mbuf. Original " > + "length: %d, calculated length: %u", m->l2_len, > info->l2_len); > return -1; Can you explain why need to change all the log type here? basically the dia= gnose check is for Tx only , we don't need to touch existing Rx implementat= ion. it could be a separate patch if you think something need to be refact= or.