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 2584DA0032; Thu, 12 May 2022 05:49:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C1105410EF; Thu, 12 May 2022 05:49:28 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 7288B40E64 for ; Thu, 12 May 2022 05:49:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652327367; x=1683863367; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=2WGRdHYA7jUTNqCDoapvUUIjqemhwDwfZyEPTjeW+0g=; b=D5nxgfQIu2Psktj9lVW0Vtn35HAGqg3DNm1N1T/Br7YwLF3qokhuKNxu AjQh7buePlmjHj5McCP/1i2UQn1KW7m4wMZPd9IxKX8oMqx7WExSga2ZD j2q7f2D3MJolmiMP6WGDIvrcZBilAoZ+EGVrNepV5eEPLuMyrJI9wPmlM j2PHd9C8tSXGGg7Q5dZPz2o7HMKv1Y5/JuQeS/RKVDF3XI2xalusQ7i1R 4HYjHXh3YA/Rgb6Ou9We273JEFiESqdEFEsWagWR04+MU0rjm+Fk7lwAK cj1YrT8MM8rhWiI+OhxDpzJKmTSxInXd2ezk8qXfih1zeKcYUrnt0P9kA g==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="267465843" X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="267465843" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 20:49:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,218,1647327600"; d="scan'208";a="572356885" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by fmsmga007.fm.intel.com with ESMTP; 11 May 2022 20:49:24 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Wed, 11 May 2022 20:49:23 -0700 Received: from orsmsx612.amr.corp.intel.com (10.22.229.25) 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; Wed, 11 May 2022 20:49:22 -0700 Received: from orsmsx612.amr.corp.intel.com ([10.22.229.25]) by ORSMSX612.amr.corp.intel.com ([10.22.229.25]) with mapi id 15.01.2308.027; Wed, 11 May 2022 20:49:22 -0700 From: "Pei, Andy" To: "Xia, Chenbo" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" Subject: RE: [PATCH v7 05/18] vdpa/ifc: add vDPA interrupt for blk device Thread-Topic: [PATCH v7 05/18] vdpa/ifc: add vDPA interrupt for blk device Thread-Index: AQHYWhd/ql/9DAApwEiAeSgaFJNSfK0Z0qrAgADfMeA= Date: Thu, 12 May 2022 03:49:22 +0000 Message-ID: <6cf988f47395413e979ef15b7191e9ff@intel.com> References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1651048206-282372-1-git-send-email-andy.pei@intel.com> <1651048206-282372-6-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, Thanks for your reply. Sure, I will use your commit log suggestion, and I will also change subject= to "vdpa/ifc: add vDPA interrupt relay for blk device" > -----Original Message----- > From: Xia, Chenbo > Sent: Wednesday, May 11, 2022 10:36 PM > To: Pei, Andy ; dev@dpdk.org > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > Changpeng > Subject: RE: [PATCH v7 05/18] vdpa/ifc: add vDPA interrupt for blk device >=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 05/18] vdpa/ifc: add vDPA interrupt for blk device > > > > For the block device type, we use one queue to transfer both read and > > write requests, so we have to relay commands >=20 > relay interrupt? >=20 > I suggest using this commit log: >=20 > For the net device type, only interrupt of rxq needed to be relayed. > But for block, since all the queues are used for both read and write requ= ests. > Interrupt of all queues needed to be relayed. >=20 > With this fixed: >=20 > Reviewed-by: Chenbo Xia >=20 > > on all queues. > > > > Signed-off-by: Andy Pei > > --- > > drivers/vdpa/ifc/ifcvf_vdpa.c | 9 ++++++++- > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c > > b/drivers/vdpa/ifc/ifcvf_vdpa.c index 8ee041f..07fc3ca 100644 > > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > > @@ -370,6 +370,7 @@ struct rte_vdpa_dev_info { > > irq_set->index =3D VFIO_PCI_MSIX_IRQ_INDEX; > > irq_set->start =3D 0; > > fd_ptr =3D (int *)&irq_set->data; > > + /* The first interrupt is for the configure space change > > notification */ > > fd_ptr[RTE_INTR_VEC_ZERO_OFFSET] =3D > > rte_intr_fd_get(internal->pdev->intr_handle); > > > > @@ -379,7 +380,13 @@ struct rte_vdpa_dev_info { > > for (i =3D 0; i < nr_vring; i++) { > > rte_vhost_get_vhost_vring(internal->vid, i, &vring); > > fd_ptr[RTE_INTR_VEC_RXTX_OFFSET + i] =3D vring.callfd; > > - if ((i & 1) =3D=3D 0 && m_rx =3D=3D true) { > > + if (m_rx =3D=3D true && > > + ((i & 1) =3D=3D 0 || internal->device_type =3D=3D IFCVF_BLK)) { > > + /* For the net we only need to relay rx queue, > > + * which will change the mem of VM. > > + * For the blk we need to relay all the read cmd > > + * of each queue > > + */ > > fd =3D eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); > > if (fd < 0) { > > DRV_LOG(ERR, "can't setup eventfd: %s", > > -- > > 1.8.3.1 >=20