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 E0D18A0032; Wed, 11 May 2022 16:35:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83B9240DDD; Wed, 11 May 2022 16:35:48 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 0064B406B4 for ; Wed, 11 May 2022 16:35:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652279747; x=1683815747; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=9yGiRK6sv6LGVvukjORIhcG6cygb8dtMabimATMPU/8=; b=WscjGb5WDEWcmPEUUSgLCCrU7dYEAH3f4X1fZnff3b+cdbfbiuXiNt4T Mstr7nO5SEOdfet++7ox0VG2pGlw4RFHoQJ0OUh5+8BJ0qywJqQ6Y5kMa 9gmscOU2dD4agFB7U/QQpiwYJtVZeYoTc2aYA680GpK62TpOtYclKRHW6 nsW4pU4Z16g1VJwgNAz5wjvaC5ikvPXufo/NECfh2NdyRQ+p0Gp6W9k/n Cy2/yUIt4x5ap6TF/35kFixTpQxl0BnlX3ku4dHLKqyfKRXsNDO4g11d1 BnS0d1kGu+LbzomIbz0/PpajYNgcF7dwlizFiNFuE6SFPOCoijeFGWJiC g==; X-IronPort-AV: E=McAfee;i="6400,9594,10344"; a="269650437" X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="269650437" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 May 2022 07:35:42 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,217,1647327600"; d="scan'208";a="658183401" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by FMSMGA003.fm.intel.com with ESMTP; 11 May 2022 07:35:42 -0700 Received: from orsmsx611.amr.corp.intel.com (10.22.229.24) by ORSMSX605.amr.corp.intel.com (10.22.229.18) 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 07:35:41 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx611.amr.corp.intel.com (10.22.229.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Wed, 11 May 2022 07:35:41 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.176) 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; Wed, 11 May 2022 07:35:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CE+wTXlFbZudFI6eQGiDhZIuJbGeDuAbdcU1iLGNeLfVqcS/wHv7zouPvhkUSstXDSzsse9Z49lTGQDI5uqgrctZ8zNALWWeA8C8H75KleyEJYXOj442P6gKmo3IJZ70vkrXOgQWmEe/IpuRYqF6/135kVT9TDjG6IPm8fIZQUDRDVvlnIPIEviRxFuoH7tg8RhQ4iUpOt/TJMOVoOMmuJoH8pHvlaWOnBIQqWB9XH6D/USBHAQ9aPE3MM5ebETIC4RRgZCXfdpqk0cb4amG17l1QUtpCwnyCmKlaZN8WqKqreeItS5eZ6G5ZiXc4ekSMl+YktcTc8dgcF7wAolwmQ== 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=BlZY8k81jqsVEhoGdZj6z9bSqvb2ko3tFJ1nTAZ87ek=; b=WnfA891LvXtqIOEOwwgQ+nUOeL57Bu/lZP3OQh4C4uzZeVCRskvdGbXmASHQyZefg9Uho3wluR6qmo1+SpFZ92Pj9atupXEnA0t7Kv5muCNH2Q0pLCqBFymSrpUeFI+AAarSsiYOSX5x8iIZNAKyITAJhwlATOJNC0x+jjzP8Z45qg9rUxB9pq+nvUUme7WATONevYBTokzJFbnHxTl8Qk0wBNDgIUNQ03aFVjLC7EsRYsSODo5eK0QyRs25JNP15cJC7MMp7zoxd2b/qmIOdS4kQZt0TWg1OnQd+8NhmqYsNrWzQhtD91w9nSML60W48klGG7CweLoxUHQNWKE01g== 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 BN6PR1101MB2292.namprd11.prod.outlook.com (2603:10b6:405:4d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.23; Wed, 11 May 2022 14:35:34 +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; Wed, 11 May 2022 14:35:34 +0000 From: "Xia, Chenbo" 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 Thread-Topic: [PATCH v7 05/18] vdpa/ifc: add vDPA interrupt for blk device Thread-Index: AQHYWhd/ql/9DAApwEiAeSgaFJNSfK0Z0qrA Date: Wed, 11 May 2022 14:35:34 +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-6-git-send-email-andy.pei@intel.com> In-Reply-To: <1651048206-282372-6-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: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.401.20 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: a218a599-773d-4457-1185-08da335b821b x-ms-traffictypediagnostic: BN6PR1101MB2292: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: PHzC8dDUXjUsYglSdzAOT1WbJKuSLB4aatgbqtNqpUZVHxWBE9MH0fTyCca71nfKZtmNcPr65R2IlKF0j/vHQocJokrQvvpGXeaIFhmPaLzBB/pDs448jaCslTzyd2YBrrGZfj1zrqmb5DzSwcka23h4NYMTLzRfkDh+j2zOAMZhkbHy11Ay8ALqJOhnvSK/G7EyMWG6ckJNzbexUeAeI/i3YVOtU2rzYapG+xD3mWeI3Ky+JoXdHOZdWqsXZKUmnlevC4EP/n/gIQC3uu55jkg0S2jbPcrWIMJkjYDHRYjF/XLWBw3ZLzRBhfHEpz3vYuuwIprMGpqFTiTb1aDbbcBmY3F+YrlPjfDqYY6Aav0eMU63rB762IqcDsZLLN5aXM4SIZ6vtOosEfyejHXG+4fooNrJG6TtrsqaC8GLPHveq5EdH9BKK3bS2Nz3VbWaSd1tX2KPYmG5M1npI4nZm6eCCZBpcRyaa/CxJnffgpqOqt82WloG0OjUb/71tL6AAeK9od9DKdaaT44E6L+tt9hLxAXWbIZHmu1yIbk6kqvU5J44oH9GHWcjeWgQlvXJ8PZ9s9rr/03KS+lNlyybImHOfA4+mUcNtJ7cIeBWbAOy4gbEp+eRrlVQubO0itkVhHTYwfEqOOw17bv167khLrWGAmOlmDDVAhLgDbLEOs1u8GnpusYyD0Ee/UM2wxrKClCfY6aJzBXiRx96PQxQOw== 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)(82960400001)(38100700002)(71200400001)(86362001)(5660300002)(122000001)(8936002)(38070700005)(52536014)(53546011)(6506007)(316002)(110136005)(66476007)(64756008)(66556008)(76116006)(66446008)(54906003)(66946007)(4326008)(8676002)(9686003)(83380400001)(7696005)(33656002)(186003)(55016003)(26005)(2906002)(107886003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?+fUFY+xZpiLcG2DnMZmPXGMIvy1q+3CQaJFNAxVVk4Cl/OrGPbqnth59rPBx?= =?us-ascii?Q?O2CBE0oUx1M6ZXiHBSjC5JXQdgoDrl3v7u/clz+xN/gINTFgxxPT1L4Pz3oE?= =?us-ascii?Q?+bXsWBXfAHWNgsXvC12tK+pjYdYN1HWx/hHuQVE44ce4sCIZjIBuXL+E+0TP?= =?us-ascii?Q?PlMtyZSXRyuDCZNXco22aksvuJqoLW33ow1LvjLGDcsGPeGUvxX+awtKmNE8?= =?us-ascii?Q?MaLOCulhwkegkDBOLLPIepcYnOjYerdguMHarKkm4ZYVVgrCCKYA6ixnkA+a?= =?us-ascii?Q?HpuPuTwmRrFbAEnZuY/s0/6QMIntwejkD0AyY/G7Yjajtl4ayptxR9pExqt2?= =?us-ascii?Q?+2LAt7XsLm7eMV4DyvDiBPAPEghA68AIJQ1GjKokVAiso+TMx8Nuk+iRyAC9?= =?us-ascii?Q?g7tb3aUm9FWg7w1CThrzUkRvf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ii?Q?2ZAyakp6mJ44UYTBvzO5iI4nHc0ldyoVXNwzpSaPfaE32sZx85Qj+xowERnh?= =?us-ascii?Q?cdP2R3+WJi8C8j3l2dtf92QvZfn3Jrwv/Bn7tf7FCDxQVE0M1ninF96oxZhb?= =?us-ascii?Q?GN3tRQYBJ7wH0WlIDg4y2wA4eqSE8DDYLN0srir4IhfjWQVjJLYVh6CBVsAy?= =?us-ascii?Q?KaKgvlKwkO+rCRMKkqkWmSqbgGYz/QjSqCc9PYrF/7l8B/Y+dhWIuNBX7W2B?= =?us-ascii?Q?S5+OVfTS010WB0pPqbGkDieQWy8ZzrYJ35YX//I3wkoK/GezEM3L40SjDNgM?= =?us-ascii?Q?jh4hRtunxf0wq7mpo1+xFoVYxdND/zagDLbrI9wgjKHoXLFdg9Fw88XxMFRv?= =?us-ascii?Q?zan86tDnbo2yh0dz558BbxqGXTWMLXDgU2ywG7YqN8AmvdZmcLP0WsddDc2d?= =?us-ascii?Q?v3d2ruYULQ=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: a218a599-773d-4457-1185-08da335b821b X-MS-Exchange-CrossTenant-originalarrivaltime: 11 May 2022 14:35:34.3730 (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: qGqpSa/hIB8Jif0vgjQ2tU2k6YpaYKwCnopVtYRkeiVfN4+L3OwYHYP1eFAi23PjASVLRzVrWfhTWGuLDP7fCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2292 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 05/18] vdpa/ifc: add vDPA interrupt for blk device >=20 > For the block device type, we use one queue to transfer > both read and write requests, so we have to relay commands relay interrupt? I suggest using this commit log: 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 requests. Interrupt of all queues needed to be relayed. With this fixed: Reviewed-by: Chenbo Xia > on all queues. >=20 > Signed-off-by: Andy Pei > --- > drivers/vdpa/ifc/ifcvf_vdpa.c | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) >=20 > 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); >=20 > @@ -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