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 C88ECA00BE; Mon, 16 May 2022 03:03:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 701D240A79; Mon, 16 May 2022 03:03:46 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 47FB9406A2 for ; Mon, 16 May 2022 03:03:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652663024; x=1684199024; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=UDLjWfKqcQzMx/PBxoarPdMybkhfiL+WIY+cRnCH3QI=; b=majkiAbCu1+C8mNhf5tki8GZ/rRkLRhVUJwV6KvMQro4dZvBtJeUa1dC gvj0SVlQY5cqSx/fFTlm03OLwvTEzbT4o5IlPjNDPihsP0SAE0qxiG/cO c93986lEI/8AWDf15pe1iyGMKFf6uuiUh9MBzeWf+cUY6Um05fplRyVQ8 6EXNgCj7JRTuWiO/eEqKgCDunN1vl6TB7Mu/Yvd2OAcRE3piRxOvQvYur 5ygoOzv465XY72Mxx2CawCFctJhNqS+7uHWgkPida/4BwEyLHhl2RpBg9 KYfnK8uR2GCuMZSPuu9725huY6iCXDVhLJ7PI3fKY/4gHQ8OL/N+IkIVd g==; X-IronPort-AV: E=McAfee;i="6400,9594,10348"; a="252771218" X-IronPort-AV: E=Sophos;i="5.91,229,1647327600"; d="scan'208";a="252771218" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2022 18:03:39 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,229,1647327600"; d="scan'208";a="713157591" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga001.fm.intel.com with ESMTP; 15 May 2022 18:03:39 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) 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; Sun, 15 May 2022 18:03:38 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 15 May 2022 18:03:38 -0700 Received: from fmsmsx612.amr.corp.intel.com ([10.18.126.92]) by fmsmsx612.amr.corp.intel.com ([10.18.126.92]) with mapi id 15.01.2308.027; Sun, 15 May 2022 18:03:38 -0700 From: "Pei, Andy" To: Stephen Hemminger CC: "Xia, Chenbo" , "dev@dpdk.org" , "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/QkzTZq0bWhzwgAE3soCAAO4tgIADTR+A Date: Mon, 16 May 2022 01:03:38 +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> <20220513083753.456996a7@hermes.local> In-Reply-To: <20220513083753.456996a7@hermes.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.401.20 dlp-reaction: no-action x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 Hi Stephen, Thanks for your reply. I will change to DEBUG level log in next version. > -----Original Message----- > From: Stephen Hemminger > Sent: Friday, May 13, 2022 11:38 PM > To: Pei, Andy > Cc: Xia, Chenbo ; dev@dpdk.org; > 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 > On Fri, 13 May 2022 08:34:38 +0000 > "Pei, Andy" wrote: >=20 > > Hi Chenbo, > > > > Thanks for your reply. > > My reply is inline. > > > > > -----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 > > > > before 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. >=20 > Sounds like a debug not info message. > It is meant for developer not end user.