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 2871BA00BE; Mon, 16 May 2022 05:05:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 027B640A79; Mon, 16 May 2022 05:05:24 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 1199140A7D for ; Mon, 16 May 2022 05:05: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=1652670322; x=1684206322; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=XvfurUSnLUngP3sDl+0O7AqnIQ2UJbRRCJp2dglrL/w=; b=j+CGzLNQOOvpeb0dk+YXLh1K2XogjJZb3uRKHbtwKlY2uhCNmLgRZqlb +lglTnLGbvSt0ZhGaYsjbNXvwhkV1jcg2jaaE0Wl4tWc+9t93mD11owZD uR3vuNEd6+Telzi2lNBCjFygVDQzHVZvSkw9zTC7Nv7yYBWDv8P607UbU d+cRX8UGOb4YA2cpL87N3Wy0z04/bJbOcJA4U0zW2XKZe+nQEunv2VI6m VqpJEbBgZiXtQN4wDpVLK72WGgnE97kpAZV1tkDGsztK53VMM2E8YrFuE 03kfGo7L8c7CcigJekw1Bwa6qptCXGYkkJ9VQ0/JXsSP0j75HmycQdCf3 A==; X-IronPort-AV: E=McAfee;i="6400,9594,10348"; a="251226810" X-IronPort-AV: E=Sophos;i="5.91,229,1647327600"; d="scan'208";a="251226810" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 May 2022 20:05:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,229,1647327600"; d="scan'208";a="596296751" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 15 May 2022 20:05:19 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 20:05:19 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 20:05:18 -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 20:05:18 -0700 From: "Pei, Andy" To: "Xia, Chenbo" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" Subject: RE: [PATCH v7 15/18] vdpa/ifc: add is blk flag to ifcvf HW struct Thread-Topic: [PATCH v7 15/18] vdpa/ifc: add is blk flag to ifcvf HW struct Thread-Index: AQHYWheI1khHSJkxckaxc9MxRlDz+q0cNPvQgAS5xiA= Date: Mon, 16 May 2022 03:05:18 +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-16-git-send-email-andy.pei@intel.com> In-Reply-To: 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 Chenbo, > -----Original Message----- > From: Xia, Chenbo > Sent: Friday, May 13, 2022 10:55 AM > To: Pei, Andy ; dev@dpdk.org > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > Changpeng > Subject: RE: [PATCH v7 15/18] vdpa/ifc: add is blk flag to ifcvf HW struc= t >=20 > > -----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 15/18] vdpa/ifc: add is blk flag to ifcvf HW struct > > > > Add is_blk flag to ifcvf_hw, and init is_blk during probe. > > > > Signed-off-by: Andy Pei > > --- > > drivers/vdpa/ifc/base/ifcvf.h | 1 + > > drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++ > > 2 files changed, 3 insertions(+) > > > > diff --git a/drivers/vdpa/ifc/base/ifcvf.h > > b/drivers/vdpa/ifc/base/ifcvf.h index 769c603..8591ef1 100644 > > --- a/drivers/vdpa/ifc/base/ifcvf.h > > +++ b/drivers/vdpa/ifc/base/ifcvf.h > > @@ -149,6 +149,7 @@ struct ifcvf_hw { > > u8 *lm_cfg; > > struct vring_info vring[IFCVF_MAX_QUEUES * 2]; > > u8 nr_vring; > > + u8 is_blk; > > struct ifcvf_pci_mem_resource > mem_resource[IFCVF_PCI_MAX_RESOURCE]; > > }; > > > > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c > > b/drivers/vdpa/ifc/ifcvf_vdpa.c index 0e94e1f..4923bc1 100644 > > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > > @@ -1536,11 +1536,13 @@ struct rte_vdpa_dev_info dev_info[] =3D { > > > > if (device_id =3D=3D VIRTIO_ID_NET) { > > internal->device_type =3D IFCVF_NET; > > + internal->hw.is_blk =3D IFCVF_NET; >=20 > I believe it's enough to keep only device_type. Device type can be define= d in > internal or internal->hw. Choose the way you prefer. >=20 > Thanks, > Chenbo >=20 Yes, you are right. To keep API not changed, I think it is better to keep o= nly device_type in internal->hw. So I have to make some change to other patch in this patch set. > > internal->features =3D features & > > ~(1ULL << > VIRTIO_F_IOMMU_PLATFORM); > > internal->features |=3D dev_info[IFCVF_NET].features; > > } else if (device_id =3D=3D VIRTIO_ID_BLOCK) { > > internal->device_type =3D IFCVF_BLK; > > + internal->hw.is_blk =3D IFCVF_BLK; > > internal->features =3D features & > > ~(1ULL << > VIRTIO_F_IOMMU_PLATFORM); > > internal->features |=3D dev_info[IFCVF_BLK].features; > > -- > > 1.8.3.1 >=20