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 94114A00C3; Fri, 13 May 2022 10:40:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7C47040E64; Fri, 13 May 2022 10:40:37 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 63DB540DDE for ; Fri, 13 May 2022 10:40:35 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652431235; x=1683967235; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=VOPgBqlzu4Ba6hBBi9bOxUFoItmTm2BLb424sEs+jjc=; b=JezAXnNC3G/OQSOqnrBO4CNP1wfCy66OHaq4h5NmWQJk1jmENNN6dcz/ G7erDi8n3umPtoFxvDbrmOkWw8G4wIFiYyofXP48N9te4daDcYWEA7WUL nPG9djIzPCNecvSN9acRkE5pB2N3Nzoq9UmltmPk1ANDBPFsMELUZRYh7 LxAGxrP2p92kaYan09dmyPg4/du0F+y80skbok2FW4aTzxt6C21UphtbB wuQ/WJqoWpFT9LII+CWbE3UDOZTtA/e7n1xpXwyqLByeUcoQab2lgx96K U8Fh9ykW+C9kg40X0PsW7qvvdTmXtiR+JQO7lRPf6tuDA0HH9QnCrvwha A==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="330852764" X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="330852764" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 01:40:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="595119971" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 13 May 2022 01:40:34 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 13 May 2022 01:40:33 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Fri, 13 May 2022 01:40:33 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.46) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Fri, 13 May 2022 01:40:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GqNBSM1KhXi7XTqKrTSfNTPJ9nQ4z67eCWkJLDRMrMGQia0Yyf+EX7mhTRP3Uud/oCkfnWIdKUehEJEAVDDranIAkbutFp8mhvudOv7m13XbiSt2p1sAkgZJjivEIdGV07i1HFlBG7pGzoZCE1KWdSaWWJ63iA4wL7azyzXikOJWET5in99oQuJXRQ/3uZYarwRxFTB6Ykej0JqTPQNO4bzyprCQ1rhgrCrG/tYk93kzAc0ehYlrrCH3L+0+DILVfnRDOamfRX03yXZ4vSEaSKidqWAtHuycprWRy5gbVHD+JP+0RVXlizR0MOIJhlkAwcdO+XWN3gkXp23NaenxpQ== 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=BLe9SVnm8hps1KaX6eMRbOQzdeBt41KDTxdG2+e5o8A=; b=aW5dHem2xfkPL2dY2ImMekadTUZd8uFmzUXr9sTctRBKC30iH4d7H0/2yW7gYomxTNl4GC+30DKK0Tz1nSMgskaCyquQ3C7FeCjoPnpdNcsdlSSPtNp4mPwDQiYXDqlcVVOuvdbUVXOSJW8Ta3RDNiM8kzU3Ygl7VSebepmbtR00PSFqLcmmC4maZfBVfwGD1u3DR/vCLKODbmnGmZ4Sh7XiT03lfXm94744b7hX95MyR+WeGVuIRzXNyKQsUxhaMsg/GUMmqXFOHvbUxP+SSVz+COIqI/KG9HFvItRip5NX4OYb6Lc2WrX8dsc7CFn2OCaqtXRtaeyJxsh0hVrjFg== 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 SN6PR11MB3504.namprd11.prod.outlook.com (2603:10b6:805:d0::17) by DM5PR1101MB2266.namprd11.prod.outlook.com (2603:10b6:4:57::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.14; Fri, 13 May 2022 08:40:27 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::2c8f:42df:ed85:99e5]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::2c8f:42df:ed85:99e5%4]) with mapi id 15.20.5227.023; Fri, 13 May 2022 08:40:27 +0000 From: "Xia, Chenbo" To: "Pei, Andy" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" Subject: RE: [PATCH v7 12/18] vdpa/ifc: add some log at vDPA launch before qemu connect Thread-Topic: [PATCH v7 12/18] vdpa/ifc: add some log at vDPA launch before qemu connect Thread-Index: AQHYWheGH1gzokP+yUOZBQI/QkzTZq0bWhzwgAE3soCAAAQA4A== Date: Fri, 13 May 2022 08:40:27 +0000 Message-ID: References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1651048206-282372-1-git-send-email-andy.pei@intel.com> <1651048206-282372-13-git-send-email-andy.pei@intel.com> <6a12484f659347bc853d337b8358a61e@intel.com> In-Reply-To: <6a12484f659347bc853d337b8358a61e@intel.com> Accept-Language: en-US, zh-CN 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-office365-filtering-correlation-id: 132cfe25-2a6f-48eb-3c35-08da34bc3aeb x-ms-traffictypediagnostic: DM5PR1101MB2266:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: vI6TR3S/HrYmqTKx44sUu3+qU8JN8w2u77z144LrZi8ZUJvepDbD3E9rAtbNJFo3ZAgwcWbPeKU8t50ICF5Thbk468QTErfFttf+crQtNfKAFbaIR3Ch/+OOYckLwhRUTWJDU6jsDluZ/WTU/L5jRPbQdgiChfca+2d0NY1nKGpFkZwJNvDOEDAHFImU/U2QNjchEH/hRsEPmpa7CwrovBvjVpR6txIwwDr5MQU9Lbzea/MYmckGkBLNWuc3qOc1aEEJpDOewyMCMIUd4huN91zm44zq15pz079GXtEl7fx3PcEYW94yLJdwWWeQZ/mM/TkDhRFgVfCrjN/QVSBVZtlazTHmYy6ztf2K00gbeI62KCM5K8DY8muCuNsHl415j50y59reiQ7YfQmGA0sxC3CSAg7T0DaC+ez4jMd8Lj1tlN5oCBCdy2sWA0BFbiurgax+bIRIyflnktTobgrnHw0CdvLrnjUU7QAfeQdaVPEHI24Oj6+dv+3dDt0p8q8A1jgRB6aNzCGj3o+5nVyITl/R37SSmFouMKs9fzVNhj+cr3FVap5XI/PP5fC5qx3kHaPuCsz05G7qzaiUAWrMY+/4Q3xcU1trEmean1dE5jDEuyYUvUOxUddS3Tc+kAc062nTR0iOyCk8P3uodS2biXAh/LBQvkiqdC9mrpXXKQipIBZcmT8qqLVx30B7ipOFu1ap8mQ3iDpf97n9GbW41A== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SN6PR11MB3504.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(508600001)(76116006)(107886003)(186003)(9686003)(7696005)(2906002)(33656002)(55016003)(86362001)(71200400001)(53546011)(52536014)(5660300002)(316002)(8936002)(110136005)(54906003)(122000001)(38070700005)(38100700002)(6506007)(83380400001)(26005)(66556008)(66446008)(4326008)(82960400001)(66476007)(64756008)(8676002)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/xU3KVKyJtMsjIAbuCsEqOTzn7kb2OjnSO5qf6UMGBBhPBMclDREEZs/lOV8?= =?us-ascii?Q?csuendCV68482osyHnlCUsl+cS4WVKW0wugA4Z4ReTblh7xthNELSG7BxYox?= =?us-ascii?Q?aTLWeFwjaMMmSfsP1NFkf9ANUZGWXR56vQQ/5yaXGIkIDHwcKAyKbnqr087m?= =?us-ascii?Q?t6N4lTBlHPLi3mp5heTBO+dh4AVKnb6TpmMvyoeD5B6i7ZeCcoSH4JxvnLYb?= =?us-ascii?Q?pgGRsQu4icRzi22tVcFOdiWWprPllbrhTHUQkr0AN/V9JsXw83EiIvxCQwBB?= =?us-ascii?Q?16oFiqUSTThA+kSA5p6fcBKJIux4ICcWYQ7ZhAFSqma7hq9aO8y44/z5whjh?= =?us-ascii?Q?POOzfJPuE60hccfGQ3PJiJ9Pj/H1s/8dRzVsTkvD3DeOvS1esxogph4oaMhZ?= =?us-ascii?Q?xvf/d0h7pVUAoJBb70NaVD9wI+vjNZu8QhWFOEUn/r4u2l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GJ109mAQfKhszzn3iytS+D7idQANCDmFSgSuAgMZ7fVufM?= =?us-ascii?Q?7ibAlUCRARmfkqwFCbpgeUe5c5RQ3/VPESg8N1NmODQNmtj/vW6Rsk+aaVdO?= =?us-ascii?Q?kCob3/WO02x2z6ypXtP69aWjMc94Lh6vnQMyIM4DRZWJfMBjW9gbgEz1qNiQ?= =?us-ascii?Q?8CWf67l2PU7wqD1ati12nBWTYcr/h7HMKY8+cq61aKsfC5L5sIbYYx90d6DA?= =?us-ascii?Q?LCyvxHaJUDtEG1c3Dkky4iAwxbYqEj6l/ADwjRY2Wl0uvK4HJL/JG/4ZTtRy?= =?us-ascii?Q?VFxPCd+ZOscgXST/J5JP51h6MJCEHEABzlE6ugX987G3IMi8EA+Fo+HLwxjT?= =?us-ascii?Q?6G9Czr50Bv/2z3nmekhBfU/QAO05k7moezv08yAArb7rtQlfBurw8vICEuqm?= =?us-ascii?Q?UBIEcBamsA=3D=3D?= 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: SN6PR11MB3504.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 132cfe25-2a6f-48eb-3c35-08da34bc3aeb X-MS-Exchange-CrossTenant-originalarrivaltime: 13 May 2022 08:40:27.2868 (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: x0co1+lerGIdmUYK2h0k+DFbjOhwg+qhCwb5w9i/VW3J/GxWuTacmbrP6+UjyUNEu1pO1YaHf6yetJ66rYINzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR1101MB2266 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: Pei, Andy > Sent: Friday, May 13, 2022 4:35 PM > To: Xia, Chenbo ; dev@dpdk.org > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > Changpeng > Subject: RE: [PATCH v7 12/18] vdpa/ifc: add some log at vDPA launch befor= e > qemu connect >=20 > Hi Chenbo, >=20 > Thanks for your reply. > My reply is inline. >=20 > > -----Original Message----- > > From: Xia, Chenbo > > Sent: Thursday, May 12, 2022 9:53 PM > > To: Pei, Andy ; dev@dpdk.org > > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > > Changpeng > > Subject: RE: [PATCH v7 12/18] vdpa/ifc: add some log at vDPA launch > before > > qemu connect > > > > > -----Original Message----- > > > From: Pei, Andy > > > Sent: Wednesday, April 27, 2022 4:30 PM > > > To: dev@dpdk.org > > > Cc: Xia, Chenbo ; maxime.coquelin@redhat.com; > > > Cao, Gang ; Liu, Changpeng > > > > > > Subject: [PATCH v7 12/18] vdpa/ifc: add some log at vDPA launch befor= e > > > qemu connect > > > > Title can be: > > > > vdpa/ifc: add log for config space of virtio blk > > > Sure. > > > > > > Add some log of virtio blk device config space information at VDPA > > > launch before qemu connects. > > > > > > Signed-off-by: Andy Pei > > > --- > > > drivers/vdpa/ifc/ifcvf_vdpa.c | 28 ++++++++++++++++++++++++++++ > > > 1 file changed, 28 insertions(+) > > > > > > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c > > > b/drivers/vdpa/ifc/ifcvf_vdpa.c index ca49bc3..4060a44 100644 > > > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > > > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > > > @@ -1363,6 +1363,9 @@ struct rte_vdpa_dev_info dev_info[] =3D { > > > struct rte_kvargs *kvlist =3D NULL; > > > int ret =3D 0; > > > int16_t device_id; > > > +uint64_t capacity =3D 0; > > > +uint8_t *byte; > > > +uint32_t i; > > > > > > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > > > return 0; > > > @@ -1429,6 +1432,31 @@ struct rte_vdpa_dev_info dev_info[] =3D { > > > internal->features =3D features & > > > ~(1ULL << > > VIRTIO_F_IOMMU_PLATFORM); > > > internal->features |=3D dev_info[IFCVF_BLK].features; > > > + > > > +/* cannot read 64-bit register in one attempt, > > > + * so read byte by byte. > > > + */ > > > +for (i =3D 0; i < sizeof(internal->hw.blk_cfg->capacity); i++) { > > > +byte =3D (uint8_t *)&internal->hw.blk_cfg->capacity + i; > > > +capacity |=3D (uint64_t)*byte << (i * 8); > > > +} > > > +DRV_LOG(INFO, "capacity : %"PRIu64"G", capacity >> 21); > > > > I believe this '21' should be calculated rather than hard-code. > > > /* The capacity (in 512-byte sectors). */ > So right shift 1 we gwt in K. Another right shift 10 we get in M, right > shift 10 more bits, we get in G. > 10 + 10 + 1 =3D 21. > I think add some comments in code is fine, what do you think? Ok. Work for me. Thanks, Chenbo >=20 > > And should these log all be debug log? > > > These information is hardware ability. I think INFO is fine. >=20 > > Thanks, > > Chenbo > > > > > + > > > +DRV_LOG(INFO, "size_max : 0x%08x", > > > +internal->hw.blk_cfg->size_max); > > > +DRV_LOG(INFO, "seg_max : 0x%08x", > > > +internal->hw.blk_cfg->seg_max); > > > +DRV_LOG(INFO, "blk_size : 0x%08x", > > > +internal->hw.blk_cfg->blk_size); > > > +DRV_LOG(INFO, "geometry"); > > > +DRV_LOG(INFO, " cylinders: %u", > > > +internal->hw.blk_cfg->geometry.cylinders); > > > +DRV_LOG(INFO, " heads : %u", > > > +internal->hw.blk_cfg->geometry.heads); > > > +DRV_LOG(INFO, " sectors : %u", > > > +internal->hw.blk_cfg->geometry.sectors); > > > +DRV_LOG(INFO, "num_queues: 0x%08x", > > > +internal->hw.blk_cfg->num_queues); > > > } > > > > > > list->internal =3D internal; > > > -- > > > 1.8.3.1 > > >=20