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 06C22A0544; Fri, 23 Sep 2022 14:18:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E3D974003F; Fri, 23 Sep 2022 14:18:23 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id C8FA64003C for ; Fri, 23 Sep 2022 14:18:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663935500; x=1695471500; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=7vf1O68FztzlMLOHEE1hjELaef3IMc5BpJWxu2Gj+yc=; b=Mx1OvFAg+XfZi5G2nwurQfV98Gc7DmoMKNs5QKcX5FGbiESc3Hn1wrXW Mz+69CnZxuD3EFYoV6qnikVBDiTcIaxgorpJPIoQv0T1t3YNLKDq8gWKc gFL5MLiZU9df1lVGbC2GIJKVxt61MY/tWT0cAgrsZfYEw/PGEP7sN0zrM N4r+YeoeQwzVTYm3SFx6dvqweeN2vKTItgdvs7lADUOr6CGJfEBhfzeGo o6WTsVmjZbMgMMqjIt1tTzpr67iaOioecmNEcEIzgTPDGoAze5XpGCnqB cM/5QBwtaKpCrtW6cPzbrbLHDFKm0Gmw8ILf0awbBXDiG2HTnEmUU+yfH w==; X-IronPort-AV: E=McAfee;i="6500,9779,10478"; a="364595492" X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="364595492" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Sep 2022 05:18:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,339,1654585200"; d="scan'208";a="620193758" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orsmga002.jf.intel.com with ESMTP; 23 Sep 2022 05:18:20 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) 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.2375.31; Fri, 23 Sep 2022 05:18:20 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Fri, 23 Sep 2022 05:18:20 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) 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.2375.31 via Frontend Transport; Fri, 23 Sep 2022 05:18:20 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.106) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Fri, 23 Sep 2022 05:18:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=P7TKQJ9o66rY5fLsdq6X/0IQH1EemoEHZr4j39VRMUT1h0kW2vxBKyEiikKuKeFU4VsZVHFTNIyD2gtFg/qhdkIXzuHRVSZ9ENSy4vkE+IGkGo1c85HRuk6yc0Zj72cjbMqgdK7L9+XaI3VI05YJElm3cCWqGqjQ/3RfwiIjXoTkb/ErPQZ+5JwY6uUfsV4gBDA7RQCx16JwLg4o/tODve1bYbs8cl7AcUY72o+wNCXMwkxmRodGKFJl0sciaP58vsPHib/ltYKlPsdLP2WdsXcRgNLB4b6sLeiTSWTZeWVWUpB1453xmdFvkz114v/9L93+7pOIV5StzX+GXnslMg== 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=wIkWopn8I8jfG33kozRBSoyfXSKbQ93CLg6sOfzdGME=; b=fP+LsYMf7XZHoj/E4LQcAZsMa/RSfn20DiS0+mixLJbEtN57V8iSGM1u3QFkIhVKhqKmP6ryhJ9zDQPPwd1cOL2ioEVRNz4UkTu35HS06LbQlN0XYz7qrFlnYMgGRGYlIsKS8SJN2sHKqRXwGir3kqfgv+5pCPznOE1sWfYvVOlHJwikPmofghjtCBZPZhUjq9mhVHxc6cqbVmmlHfw5Vz3PyGBM2v8wL3sapuF07YljrdlrOpev45gPNWam2ndM5yhTpfAdbALhcWf22xmCN1cN0kESUrOL+spaiwMzwFlpu+4zmhDtDkx4Elac01kf964yI5r6cOO+HJ7XI48xDw== 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 PH7PR11MB6356.namprd11.prod.outlook.com (2603:10b6:510:1fc::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.16; Fri, 23 Sep 2022 12:18:18 +0000 Received: from BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::180:43ce:5132:adc5]) by BYAPR11MB3366.namprd11.prod.outlook.com ([fe80::180:43ce:5132:adc5%3]) with mapi id 15.20.5654.020; Fri, 23 Sep 2022 12:18:16 +0000 From: "Pattan, Reshma" To: Dongdong Liu , "dev@dpdk.org" , "thomas@monjalon.net" , "ferruh.yigit@xilinx.com" , "andrew.rybchenko@oktetlabs.ru" , "stephen@networkplumber.org" , "mdr@ashroe.eu" CC: "Min Hu (Connor)" , Maryam Tahhan Subject: RE: [PATCH v4 3/3] app/procinfo: support descriptor dump Thread-Topic: [PATCH v4 3/3] app/procinfo: support descriptor dump Thread-Index: AQHYzyBwgNbcJRESV0+zIJ6A2PuJe63s1Y7Q Date: Fri, 23 Sep 2022 12:18:15 +0000 Message-ID: References: <20220527023351.40577-1-humin29@huawei.com> <20220923074316.25077-1-liudongdong3@huawei.com> <20220923074316.25077-4-liudongdong3@huawei.com> In-Reply-To: <20220923074316.25077-4-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_|PH7PR11MB6356:EE_ x-ms-office365-filtering-correlation-id: 9fc7585a-c1e3-4ec8-dde8-08da9d5db168 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9S0Pi+oWtOPnCJSY/VPdGMs6nbqjHnoQh3ZhI9ZNCd8RJdFxcafWIjOJTd3STVoOMhdZvdGVPzZCs+uR+AWQASyGj1lSYpmr0fEbiX0V7Xq5SxaSNECBB7C/LM3WlCDBNDVPqxfFOh3+X2+atwN4QcgRotWxj7OmmW3r+nzDYEs1aTXND6nWmRMhqfXsfI34eba9UG1NDfScHhMS61ebFnbraIRicjWGlwDWohT0Hv6vW2HmnBuzZw4ifkMuHWKbHxPGum8D9bBacgwszxc5icsnbiJIU/GO1DOt48nFYdh5tdwMUXw9E0HMD5PdsZpVWxytlw9uAoXsfUYStW+whPTVQHpx00++IfjtdOfwTvT7hPdZ8GYZWySTrFPVsJ80a3s2Sh3IUccOTwBL0auz9J0HmEA4dBDjm9i8bwlX8uvWJq1tP0pfbYIXeb8Q2UOyuIRS4YRr9XiZF5ED4nSNIHtAuGk5pClJ0Y7p6PQGddy3uwO37yXPpQGn3KAXL6KGMDUn9Kcp7lCllclVdJH7dvRNyp3tVGkSF0WjWxXlyqbPL4WbuP3UV2NapWe28DsKMbmNf3MDU+9J38r8q1RiGphkTx5SUZHulL8i13o8KtQkBm7yMu+qUly7MdcMbY6yUjZk0t1UCAKC8seweLGABNirBHB8LbJtL6JokT3Sm0joszaYYvo36o0QwXgG/zNU5TzDHjz+/9c4l8zWNdGC+h23N1KDzBIx8nDsw18SDRdguRibmEhfjvZtwIWvzukqf2CQgwkey/OEoi6sHNRxPQdcMUX8NktZezYwlgjDXIw= 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)(346002)(396003)(136003)(39860400002)(366004)(451199015)(66476007)(83380400001)(76116006)(38100700002)(2906002)(54906003)(66446008)(122000001)(86362001)(8676002)(107886003)(38070700005)(4326008)(66556008)(66946007)(64756008)(8936002)(71200400001)(52536014)(33656002)(186003)(82960400001)(26005)(6506007)(9686003)(5660300002)(41300700001)(7696005)(316002)(110136005)(478600001)(55016003)(21314003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?wxpqU1zwuIjLX1LCLKP0B5zcxuHiQhXJ7SmkOZgdMB1+8xAw1TnwRLgiPV3j?= =?us-ascii?Q?wMrQ0zueIhci6IRfbfidZWkrZZ9v6gwpQPjQoJdSEFT2qtvJI06HaD/UPKbT?= =?us-ascii?Q?ABGYYatarz79MrYIbZ7XMBr7/QH0mtYunMGubJOYSBLTeukIB7QwXc1SdGUw?= =?us-ascii?Q?xS8dOd+Lh4c1wEs8iLKV7MFki/PkkK4J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qX3yzpPJPWa7PcoxjjswtbBWaFrrAGLCn8YzsMJGzp3U8L3PICUpb?= =?us-ascii?Q?KPoxKDjSZUbyt8LF+pq7g537FL6MX2knQ7pNF+EF0GcrfPe0Yl/Wua1XReFX?= =?us-ascii?Q?1BBGo7bsUVIpp6BBq1UHm4z4HzFA/5HMS/X3n1+aOGDTRKv7ELKwndsXxPJ+?= =?us-ascii?Q?CfXzI+dqjIrT+uQKKM2blRTLlzV85kWVev/3iILOtivXdMWILFAO9EQB05ml?= =?us-ascii?Q?Ez5PM5I0tFFieO0XqaQ1c2O944SG+ISeZ3J4NHlVFSkLMUBTlR2x2VI3VXYK?= =?us-ascii?Q?X5mw6u4egSirMpdT6IiAlZqKQyzvQCtBsYNs/yHhvP9ixmwpbexUvT09ekOo?= =?us-ascii?Q?wiRHcV8aPFr+yb5AeW30Sr3uD982fBUldLz7XDf/S5SMSovDhVU79yefv2z2?= =?us-ascii?Q?eDDpBzXqlH5fvDMiVscCq2aZhwrC/6x/i6EhpwcNSnk6FCD9ZZpKM3jYQRQD?= =?us-ascii?Q?KO8yDptc/YD5dDncP7HKpfZ75qHKCzUtKGwSfZ1B?= 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: 9fc7585a-c1e3-4ec8-dde8-08da9d5db168 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Sep 2022 12:18:15.9680 (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: npHkBJKHADMFBQBjzQm/7JbCyvV/COdisJFl95vOpXNj9mGjG9tcs4FkBFLVERqVXHYVVIcXe7iLoo2PUoWaPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6356 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 > Subject: [PATCH v4 3/3] app/procinfo: support descriptor dump >=20 > From: "Min Hu (Connor)" >=20 > This patch support HW Rx/Tx descriptor dump >=20 > The command is like: > dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=3Dxxx -- -- --show-rx-descri= ptor > queue_id:num What is num here? You need to describe about this in commit message. Is num means number of descriptors? Better use the descriptor word here in = num >=20 > dpdk-proc-info -a xxxx:xx:xx.x --file-prefix=3Dxxx -- -- --show-tx-descri= ptor > queue_id:num Same here. > +/* Enable dump buffer descriptor. */ > +#define MAX_NB_ITEM 2 > +static uint16_t rx_nb_item; > +static uint16_t tx_nb_item; > +static uint16_t rx_item_opt[MAX_NB_ITEM]; static uint16_t Instead of using array to keep queid and number of descriptors info , bette= r have structure with 2 parameters one for queue and one for the number of = descriptors. And You can use the same structure to declare tx_item. > +tx_item_opt[MAX_NB_ITEM]; >=20 > + " --show-rx-descriptor queue_id:num: to display ports Rx > buffer description by queue id and num\n" > + " --show-tx-descriptor queue_id:num: to display ports Tx > buffer description by queue id and num\n" Here also use enough description what is num means or use the another name. >+ if (ret < MAX_NB_ITEM) { You can check ret < 0 no need to use MAX_NB_ITEM again. >+ printf("Rx descriptor param parse error.\n"); >+ return -1; >+ } Instead of saying parse error. You might need to give clear reason of failu= re. That is invalid queueid:num passed by user or user passed more than one pai= r. >+ int ret =3D parse_descriptor_param(optarg, >+ rx_item_opt, >+ MAX_NB_ITEM); Do we need to really pass the MAX_NB_ITEM> I don't think we need you can di= rectly use the macro in the called function. >+ if (ret < MAX_NB_ITEM) { You can check ret < 0 no need to use MAX_NB_ITEM again. >+ printf("Tx descriptor param parse error.\n"); >+ return -1; >+ } Same here. Thanks, Reshma