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 92147A00C3; Thu, 12 May 2022 15:53:17 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7939140E64; Thu, 12 May 2022 15:53:17 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id A9D8940DDD for ; Thu, 12 May 2022 15:53:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652363595; x=1683899595; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=7KAQbqia8I070eU+qMomqgGjzKvSGAKupLrtopT4oOg=; b=OO4QcGKIIcfPnaWphdAG6TFe7eHt8jgD1ZL69mN/zw/Ea98V+Rqhoo3r j7sazHpEB6mr5zA0C0vruBj2QTE3Mf88YRgIENekE3Uki+AvM3XnQt/FK mbjyQbmOHC1yuwTM9vTCLtHqW1oujUOv3JNyYU44FLkqcjlW19B1cVaJF Si0Vp+1wLTAEBo0Cod47mVt1eMu8VD8JIs6RAh+OLoHlKMVeTvvrcKwKd qHkU+3oSEhWAtj3VziAkGmoHMBoECk/nYZZ/xyi3z+mFPiMKGsqrPeNLB 9OugoHOZfGcxuM72IVwcXxluCJbPNV+qOGIGJXjqmEN+DZACpeNQNBlpy w==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="270134918" X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="270134918" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2022 06:53:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,219,1647327600"; d="scan'208";a="594674098" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga008.jf.intel.com with ESMTP; 12 May 2022 06:53:14 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) 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.2308.27; Thu, 12 May 2022 06:53:14 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Thu, 12 May 2022 06:53:13 -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.2308.27 via Frontend Transport; Thu, 12 May 2022 06:53:13 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) 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.2308.27; Thu, 12 May 2022 06:53:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IlrnhouxaGeYkKVli5wBUohRXS0vvtZM2Fclm9gtst8eGonfrNhF8c7eI31bPMBGwOO1tL/rhKkDyC6cboEmOx95SFtJNodZbRS5hbCIo311lc8dvMAPJVOzmATBcguR9PX6dp3rMO+OP/px3pByOC1bPbmLvyPN3aGAvoRllPxLN2Gl3NaFObRbkJ4sDN2W1EyurC9qmHEVfHW7+AMdLMgov/SlhBVoNeOpHQPCZEfszdQBLDkqORFnl+5lMWXUs/XzL/zJoFvFNSxwlK1Q9AnmBjH/+X+CNP/D1EfXtBH60vHvMIZkp2/KZDYit62X+cCcwHhDdYmqfq1Kh9dIaQ== 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=EGZGr80ad3lL1A91WYoqYBIW7EsFRymRyHqddjsseIk=; b=UlPWtVbQTAJ+etbkgLX1oiWEbkKXpPsK+ZptmoMhvZuULBk1Y8/CZmWUMCdCXNEM3Ua3NyCsrZ4dyIPIolpQY+wh0gcHVzfELje4T98vv0+SpgugF38jYe5Xibeb4+PeGAcxHEUWG83lVKlTr1AIX86Pgr7pfTI4vwQqeKWttY2PohF6AArAjMURVRqDli4RfW9CSFTBLWrlNquyPuy4XLRtHMIVj51PXZ+exfw6K4ZTd7qgmsk7RfG7TD0nL9veutQm7Ow04gJBzikEKaYtAD7HwT0/x0pVWOVaySzq4xj3TGWl3PgIhTcyG7JRXjtKpOFFiw5eh3eVDDm/yxavPQ== 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 MWHPR11MB1935.namprd11.prod.outlook.com (2603:10b6:300:10c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5250.13; Thu, 12 May 2022 13:53:12 +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; Thu, 12 May 2022 13:53:12 +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/QkzTZq0bWhzw Date: Thu, 12 May 2022 13:53:12 +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> In-Reply-To: <1651048206-282372-13-git-send-email-andy.pei@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: 68a39862-fbd1-4404-b5fa-08da341ec141 x-ms-traffictypediagnostic: MWHPR11MB1935: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: XjgYsFaorgWBjwppT0pifV3kzrwqC8XkWYyD6/mYOw+B2BQY6x4jRAUn3KDuu2BCcHeUrFw2pw+/e42++HGb/g8GDdf6YimQ9amm1sZVDY+3pnO75gI1ot+gjTEnHfZo5Iao11lo4BYwETOHTAytt9/Y/MbGt4t8N7cD57cD4NIqUjFkwggzKYCaj7AmCENDhOfSxLGLfg4Pzrh5QKsNRvdYVrTTJB0v2wmGbB7opIceP9tW/jMZ/MCwqnqwWjkyxD/z/kFHf8Fd46vqxa5pPkugV4OykOXMMpkLmPVf9U4kJ7v/oTCGxutZHH8odhoxxQz3KkYsZqHyfoIIWYp9D39krlX4kUV+2n4TL20KxSeKLdBP9W94FloR5rhawu0j11p7FZ3NgMfKEJbVM/E+8kJf0awgTJmMmwFPGtWcrru0uG/VSfY7V+UvqzMoh49iGxrn+1xlAkQDILUv1rAOes8x+CQNPNzSSL4e/Ol7QI/rGu0Mfth93XNoT/Zx0dW9kaBh8HcGaZP4HBMuVp7JuZOGqwttvH+F9mXQc83FfAVC/lizEyIurSLSBLPInmw2NZoHZfGEekeQfjQs3HQLmZd7406HIm/McPkheXiNkDHmy2ymdUxn3WO47zuY6AMfVrxcD/vjO2DFDCsWTM/2/Zv5XjJCwmYdQdwm1Y6vFNA2GbzUlSWP8Gfzc/LmXhRWYXIUydk3aClEdIrwyxH+Rg== 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)(66476007)(66556008)(55016003)(64756008)(83380400001)(4326008)(7696005)(76116006)(71200400001)(508600001)(66946007)(38070700005)(6506007)(53546011)(8676002)(54906003)(107886003)(110136005)(186003)(9686003)(26005)(5660300002)(2906002)(316002)(122000001)(38100700002)(86362001)(8936002)(52536014)(66446008)(82960400001)(33656002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Umn2d761p3dTf4AJGHRHuCajzOEW9jT2SWuJ7SZNQwB9Rm6llJRahIskkjYm?= =?us-ascii?Q?hX61ZDvyrN9iNOEcdH9Pw6US1SWxxVS00yTBQR8Krid8tFxc+powmNJdPS1X?= =?us-ascii?Q?ksFH4/9u/iWsC9pj3+VoQ5iSpwNHMK12hizSd3TF6FcvI4DVW9X+AE23T3du?= =?us-ascii?Q?mw+5RgFtsnIV06RxFwuE9CjPfak5wW/F0Z7WMpbKmUzBfIThxPYss1CnfCPW?= =?us-ascii?Q?INllx5rDwf4m+Th4ms/MLqYTss0M6K1/Xuu/oGxWF98TW9yNUI+Vv0Gpaxzm?= =?us-ascii?Q?eqE8YKfWVxjSr+5lLjvm7IeuptMC9eSG4ia1Y0zzovp1Gymu0Qz8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tRJpilzohYpzpyBZJalTCA1mcfJBQFocSXCX?= =?us-ascii?Q?8uKsY5VKchs5vqgSQIe1+lilbR7pdXLNQTuARNHbrc9bO8Y46Ho79UojxcJu?= =?us-ascii?Q?Ry4zlyuSdEvcie70Zv3WTXnN6ngZO8UASw9ZF6hYoL0mRE5CLzy3OxvV2shB?= =?us-ascii?Q?PjPJ8RNuHp7uWBD9DYmAUgoDGoiHZY7FsJebws2eSHhYiQjKVQIoGBD+Wpgp?= =?us-ascii?Q?iAsDdIyY6dM6EeJbK5tplplPs/8nteWho9pWiugYqG7m4bCPRJpq0lZZ7DcT?= =?us-ascii?Q?jiY5V3xwwWdJNRK+j7qS6VKl7rj0ut0UvpD+XXBTXp1bxYhEPzwgonpRwm1t?= =?us-ascii?Q?l60/tH2oLt3zjnu9RQEmFv8qBaOmZ4eXdseOOtAd2evkV0C35Y8xv+hxAnwp?= =?us-ascii?Q?p0/XyqMM62+T7CuI6sS9bSFI0lCjipKOiEJE3c8n3Kbfcs9jIIVt9blL6sO/?= =?us-ascii?Q?mx1RTSEww9i9zblL9iYoemofaqp4Pt5ggrbYTu7JH+A9GZOhFJEnyMMrw7WK?= =?us-ascii?Q?at+bQPLD5g=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: 68a39862-fbd1-4404-b5fa-08da341ec141 X-MS-Exchange-CrossTenant-originalarrivaltime: 12 May 2022 13:53:12.1693 (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: 6XFHLLdPgKvZpaywd/DM1vrewhK7ztTaw56Vb/chSmc2cWaoRSk1zZDXibneuawWLbYfH02b58yCnpAiL5q6Dw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR11MB1935 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: 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 before > qemu connect Title can be: vdpa/ifc: add log for config space of virtio blk >=20 > Add some log of virtio blk device config space information > at VDPA launch before qemu connects. >=20 > Signed-off-by: Andy Pei > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 28 ++++++++++++++++++++++++++++ > 1 file changed, 28 insertions(+) >=20 > 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; >=20 > 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. And should these log all be debug log? 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); > } >=20 > list->internal =3D internal; > -- > 1.8.3.1