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 9AC8BA0544; Mon, 10 Oct 2022 11:09:03 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 812B640146; Mon, 10 Oct 2022 11:09:03 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 9271740041 for ; Mon, 10 Oct 2022 11:09:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665392942; x=1696928942; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=wffmMtbJWLYazPO+ffJaZU/68kf/eVitNfsDctEiDoE=; b=Be2S2KuPjTln8NHqxwXMMA2QBTIyN/hE3LibTVWPD66W+aGB2k3Se8je f6UaPe1jt57cpUgqQDcHlG35pG67chVNcxY3aUdMPUslBH6JM2gPfPKAT GPYDG48RGijohRsKKWpSaivWqHAYYOTsaCDM05T8Qk+RRuOJmKT5qIjNk jyijjl2di/bvSkwYdn5Fr4mrM8It5tpkr0CPJdzXbUwVpU4FAVjwT/PB7 B1tM+u62UIhoaxaeCKyfh5Z+zEi5n8z/dCxCSWCCGPy8g2hTifWiQVjnb Q4hYef7D6rEKfpz2HdVBVd4ThP2+lKs7RAcLXCI3GPuRALjOWffx/b8dA g==; X-IronPort-AV: E=McAfee;i="6500,9779,10495"; a="390486698" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="390486698" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2022 02:09:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10495"; a="715025070" X-IronPort-AV: E=Sophos;i="5.95,173,1661842800"; d="scan'208";a="715025070" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by FMSMGA003.fm.intel.com with ESMTP; 10 Oct 2022 02:09:01 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) 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.2375.31; Mon, 10 Oct 2022 02:09:01 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Mon, 10 Oct 2022 02:09:00 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Mon, 10 Oct 2022 02:09:00 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.174) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Mon, 10 Oct 2022 02:09:00 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HafaXbrTWTwaXE7OTYFFeT806JSIqEYSsCSWQ6zigFEnrmh9wk9HktyCDFFPFrAKvgcPDGeuPqYA+dT70OdW/slX/8UP+ubmO940LzrOU9CpY6JOHfc9EF02nVGVlzBK2vlpTsb7nTpJCn77AtHYjqmMqjBlA0xzvGUu3xHqXdPJz9FiyjJgCyvK3YUebId+9sneJELUoLLwxTwsvVqn2YEI1DnAe16/miYc0z/AIAwYedmYzcGau3tfLpHQmSyr2yqMlCBw8LqopvSV5OmWsZL1xzkUo82vNboyX8BoPUN3w+Bnup2BImUwV9IzsK34fAzUK1uQu/BOix2qZyObPA== 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=HChZJDM71CD7/lj+CO7p6omCy3NJWocL8C4bCCKahBI=; b=P2hu9+6ZfaAcYBB9Udg155GP/vr2itaM02sifzcWTRfTyqfHP/YqrD1TVDj1xdLSMqFF5kcSoxaIy/VYXLkAgsDo3qXcy9GRtkH+w797S8OAVWrifd2/qg6qDMYgz9B4Z+6YGHGQJXRVr/J0x4sRbPKJZALf2xeQoyNneSWjq+Hv8J923m0XAwfTJj0+23eUMs3kOrWcHc78QFit3O+RXWcNYK3Nhd8ixUdv4+xCUBFbty3pom1zv4nGnKHQIX6d9c8wE6MX9VzNJ6HK8FhcNxyEs8jiC1GG1I6MNL3A/ccQ3WKCraB457+zIMq0l0O/9fCZ+Pxfc8hV0+3w4sQHVQ== 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 BYAPR11MB3366.namprd11.prod.outlook.com (2603:10b6:a03:7f::20) by IA1PR11MB7387.namprd11.prod.outlook.com (2603:10b6:208:421::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Mon, 10 Oct 2022 09:08:57 +0000 Received: from BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::e7bb:69c6:ff4f:1d84]) by BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::e7bb:69c6:ff4f:1d84%4]) with mapi id 15.20.5676.032; Mon, 10 Oct 2022 09:08:57 +0000 From: "Pattan, Reshma" To: Dongdong Liu , "dev@dpdk.org" , "thomas@monjalon.net" , "ferruh.yigit@xilinx.com" , "andrew.rybchenko@oktetlabs.ru" CC: Min Hu , Maryam Tahhan Subject: RE: [PATCH v9 7/8] app/procinfo: support descriptor dump Thread-Topic: [PATCH v9 7/8] app/procinfo: support descriptor dump Thread-Index: AQHY2wSOeSIoNeGsoEWHYHZyRnObSK4HWE4w Date: Mon, 10 Oct 2022 09:08:56 +0000 Message-ID: References: <20220722091236.15469-1-liudongdong3@huawei.com> <20221008105353.18195-1-liudongdong3@huawei.com> <20221008105353.18195-8-liudongdong3@huawei.com> In-Reply-To: <20221008105353.18195-8-liudongdong3@huawei.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.500.17 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: BYAPR11MB3366:EE_|IA1PR11MB7387:EE_ x-ms-office365-filtering-correlation-id: 283b0de1-51ab-49bc-3697-08daaa9f0ff3 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: GZa/1rT/bgDPeRUfwcIZzRbA4m6kh5hqvKsNfWgO8HN2PZoRJZTwz9j+d4qwDF8Flgr3vEO+GfMIz4JTByNIz4ItAfaA4DPN0adFcB5cpWiBNJo9YBz6Q++AgMyMQmYdZ/hb+QRmLRF5nyDQ1bLFLTntbGwqCxYJOe4bljTGSygq1o9FvYvOx8buwrSCMR+vZZvrhUvC9goPKzxX2Ie9Xl5uspcLQ/byZpG99ZazbkAErfstFigXm3AZ2uXUytEbEKSTTnOKVJ7kiOLyyXNHgaxj98DrJLVllHyswb4b/OqgUjQZyTQ8vFMgOX6b9nmr2p+dZEynjek2AkMJZH3Kvxq5el6DE035CKP7dlmAc1NmfhLD/d+fkK90AiSNpwAtE06w5KcLTkbEG0wF98qet23GsGDPQUf0vUX1PmOp9hjLSNFcwPysQQWstzri6B6MJC40CGJHn5lASo+sDWwjZbxQclN1pqk8h9o0K2NOWF3eJJPy6jYcjhPF6iDDE2Yj1QqbaoQaxQMtt3hhn6/I6NHvICBRd/z0keImUDe0fA8//lulFn3mPVRx+LhddMQECErjhj3/Awcn4BkwYtQM3i7jxPcsVPSgSL4fIi2F9/TY7B5uyLEVfwbw9iut6icv82fpO7Vbjsy0/8qTbOj6MjjBWpzoBNXsat5RcEZdL1TEVY7uVmWqcRxZxPjZk+GFqlLCiaU6S4kAPULftGs8rJljhXBgu6JlNrjCLC1ISttWHtg9X739G7tgGlbz1b0sZerUXeIoTNt8aga9sFA43w== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3366.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(376002)(366004)(39860400002)(346002)(396003)(136003)(451199015)(66446008)(6506007)(71200400001)(107886003)(52536014)(478600001)(2906002)(41300700001)(55016003)(7696005)(64756008)(8676002)(8936002)(76116006)(66476007)(86362001)(66556008)(186003)(9686003)(316002)(5660300002)(83380400001)(110136005)(66946007)(38100700002)(33656002)(4326008)(122000001)(82960400001)(54906003)(38070700005); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fbwya3FOFbrjea1yMLfOrjKybgFxYUu8xns1LSqt5anjxmr7eZJEx2pGTe78?= =?us-ascii?Q?ubWnu1GuJlY/ZrJ0BhOPOyrXOdky3EjzQZ2p9GIP+6AN7n2SjwSWj1bUHFO+?= =?us-ascii?Q?l1xuBGhpz5P3+qvvsA4+kYxltLCRl8APFqbc3GaKVcY7FUsEtHx5X/ZEXCIo?= =?us-ascii?Q?5KXuywRQc6D0ky97oM5nlC2LxRdkDHGaQ938jTYf+qv0tU/5VGGLAmw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XTiIp2BMm7wf6+dV4URkA7FESV6ZHIhorB1ZMNBQZO3W/x8Lv?= =?us-ascii?Q?my3NtVfgLDsZ1vz8YRfNUr2LK9/w1k8qcY4FbaTk2zgffSvADxCCSh5Ztm+q?= =?us-ascii?Q?pnp0QKxiA/WVBoT68SDaw6yyUc2wWPUjtYs2Fn4B3AeTYGYhmO43dbrYHL07?= =?us-ascii?Q?VGp+YhpNSEFrtmhjTvvImq7Ond/zIHGnDoHFZ+XIQxxp0yfvz7ffM5TqnM2c?= =?us-ascii?Q?pUJyJz1t0vWsjIcx+Do/WcRiuVo23fOrivedUJCFL/5fGJJzTaiKRCiqNE5g?= =?us-ascii?Q?QF30UXYtXbdtnjxIsUchj2dKF72bupTEFjwv8iml5wavGyHtKF/wR+65jkgc?= =?us-ascii?Q?7icG1SB4W6hf5fjOUO1dbs2qVfBaHUHB80pNoZlG1kP3vGd9hDIpgmHWPyo8?= =?us-ascii?Q?POcMbiA904fdP+f+C5XSetd2B0tr9s2+XCiWTAmGKl0Xgu9ftHMWg8DR2BE/?= =?us-ascii?Q?oRDJr7LVnWJvj3aLZfnu2kVJnIDzH1UHhOxvu89qK5pYd0F7ydX4U/z0DVJe?= =?us-ascii?Q?2IBb/xXijSHCNzLsqtI+uTrtiC4EbS95TvAVeR2Sjdla?= 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: BYAPR11MB3366.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 283b0de1-51ab-49bc-3697-08daaa9f0ff3 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Oct 2022 09:08:56.9841 (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: snqNymWC6oy86fzyuryRrOxFtDqBM8/+zT7Fpw9Qk5e84LzknRYqk8Ur9A1+IFuMqyjzfexiz+H8iFD3pHbWTQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB7387 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: Dongdong Liu > +static void > +nic_descriptor_display(uint16_t port_id, struct desc_param *desc, > + desc_dump_t desc_dump) > +{ > + static const char *nic_desc_border =3D "###"; > + uint16_t queue_id =3D desc->queue_id; > + uint16_t offset =3D desc->offset; > + uint16_t num =3D desc->num; > + > + printf("%s NIC descriptor for port %u %s\n", > + nic_desc_border, port_id, nic_desc_border); > + > + desc_dump(port_id, queue_id, offset, num, stdout); } > + > int > main(int argc, char **argv) > { > @@ -1732,6 +1806,12 @@ main(int argc, char **argv) > metrics_display(i); > #endif >=20 > + if (enable_shw_rx_desc_dump) > + nic_descriptor_display(i, &rx_desc_param, > + rte_eth_rx_descriptor_dump); I don't think you need the function nic_descriptor_display() to dump the de= scriptors.=20 You can call the rte_eth_rx_descriptor_dump() directly here. And same comme= nt for below code too. This way you can have the RX/TX descriptor scase specific dump printfs in = these sections.=20 Also, the printf in the nic_descriptor_display() is not telling if your dum= ping TX descriptors or Rx descriptors.=20 If you want to keep nic_descriptor_display() that's fine but you need to ma= ke sure printf to be RX/TX specific. > + if (enable_shw_tx_desc_dump) > + nic_descriptor_display(i, &tx_desc_param, > + rte_eth_tx_descriptor_dump); > } >=20 > #ifdef RTE_LIB_METRICS > -- > 2.22.0