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 753A7A04FD; Mon, 23 May 2022 06:10:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B2FB40156; Mon, 23 May 2022 06:10:26 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6A7464014F for ; Mon, 23 May 2022 06:10:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653279024; x=1684815024; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=bhwxbbwHpBGxEGxh9Wb62Iw8EfhY8WUoCO2AjC78J8Q=; b=kuhwc4m1IcobNk3qhmKFCZWju4CGM9gfPIReZTDXUK75D8R/alPZe98f k3CLbcjd/3Rt2dAV4PXFAER49KrONpsOuP69/I0W5syMIM3R1T6BcyhQr yRaN4Ai+w6j9zbgtkfLPlchlOVEy11O93BC2IEl+HjtPrLJ/DX0kko13K s14fBNuCKLtyzPkGu8a3Kmrc3g8Pcq2nQ0mv3kYncJYUjPJXYnmtv4usw NeTTirxF7t3eFNiPP+UELtZha38E6TgfGD6KGMROJIX9bBIXZzz6E8hi+ l8tCy2CZdpYWjeiNC6nuVL4TFn3PWi4sI3JR86Vm656YfBl7mDrCTmxEz Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="260699015" X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="260699015" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2022 21:10:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="608005674" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga001.jf.intel.com with ESMTP; 22 May 2022 21:10:23 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 22 May 2022 21:10:22 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) 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, 22 May 2022 21:10:22 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sun, 22 May 2022 21:10:22 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sun, 22 May 2022 21:10:21 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jLAqwSs0Zt6qGx6Br9pyr5Q1V97xiUBvnGTOJgFE1BIfrf9bbF5936oGhDNfd08Q3dgPaU4asf5IxbiKi/Ul/7soimkubpSl8pwwzw5kA8Lzf/dVlY48kyk4PKLciFaAlcaAZKzNNg7QgQ6p5IBM10x+r6Ch5SXRwkXyDP/S0v4bCDEd4t752om3kX7vE/19yKjaWJRI/677Xvhf5ePwUnkwbOxUKFPGzaudNbYcAK/idGk1DXw//1vYqGgXBm2nbIx9akPchjSG0ElzxaQofEmTySU+g0D7MpT8ufHWzhKpzOPo1SCcovuV4xn5GIBufk4uReylTmbp2PRftAkMBg== 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=nWiAtSe0c8pfjaKyTp6ygQgrO66vqSx+2cSZGhJs2to=; b=cww2hLOJgvOXtfQn70QoVjYwUDqefWasTFHFamssMzYXh0XbIxrIizEt2kBh90uw+BPpzOtOoq5GxYWmVNcBkq9Osl1mmxMgPHbbIWLNHuDLvzZFZ0lnl9Zo4TBE6oP2iQxzrKep6bQk5QUZViX7vv6FvF39gXYdUbwy6dSFO/v0z17qBLG13DJjYWct2biI7d8PY+SKG0zzGddXtNLFiHuWAADIDo85Lg/ZqRpZT0mH3R2a4r+Ie6L+OrmWxYPxw13AM/hTePmjSZgQpb+H2vllmANmwpB6Zso2JYhPsYDcbnE22wUQ/2XneZltVkaSyb9+xzrEbLyB5RyZbJ/Ptw== 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 CY4PR11MB1639.namprd11.prod.outlook.com (2603:10b6:910:f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.17; Mon, 23 May 2022 04:10:15 +0000 Received: from SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::54e1:e802:17c8:93f]) by SN6PR11MB3504.namprd11.prod.outlook.com ([fe80::54e1:e802:17c8:93f%7]) with mapi id 15.20.5273.022; Mon, 23 May 2022 04:10:14 +0000 From: "Xia, Chenbo" To: "Pei, Andy" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" , "Xu, Rosen" , "Xiao, QimaiX" Subject: RE: [PATCH v8 05/13] vdpa/ifc: add vDPA interrupt relay for blk device Thread-Topic: [PATCH v8 05/13] vdpa/ifc: add vDPA interrupt relay for blk device Thread-Index: AQHYardbfketelYZBUaWXEkfUWJRza0r4H+Q Date: Mon, 23 May 2022 04:10:14 +0000 Message-ID: References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1652876035-70513-1-git-send-email-andy.pei@intel.com> <1652876035-70513-6-git-send-email-andy.pei@intel.com> In-Reply-To: <1652876035-70513-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: 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: 14c195e2-3f19-44e1-4193-08da3c7223a0 x-ms-traffictypediagnostic: CY4PR11MB1639:EE_ 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: cZ3Kso86dOhFT1/IGheparlMardcbVNFwxE8x8JZtAfK2B7q5nNB535EjhGW4FExhboDu7LJ+Ugtf3LBq+omPmQP0mzfM/8j6wCWjD69+FVQPQZfiNhdRUO55vkDbiVAz502zM1WIgh3FLDRZGtEjKgQQ75cHtW2T4Z+821TMhQeriW6uzRyeyvW8+sQ5uamF+Rtvh4sutyfVB1eBWkCDCH5La2uxNHps6Ne/DgiZR0fkp3PietY6J4Og6Q3QmaIjZObmIpZA5kVcHay7HOvGGodsI0FOL0orZkwuCZyIfFWBsr/WmwKEWJTGIDtrMuv9Tb7jlH+YcPa+wtJ1mNAtQdRF/zez3cxjpNCwUexJog5XZQfd8N9wkbPkUgkHHWCg9edQb8YIKKBpUByFwEUFpCTZE9ue5eNn0To4UM+wmVV6R/VMCaxpRV0O9Lsbmb5aRFVlXJzAYV3Pb1DoJ2CuJMrGVB3zD9+qMtwaddz+dxp/5OSmXLGsZzS9mWn9DHd09fKep/zeRJvjkMs93MxOAQgLfLmFz6mB7uq8mno+4sKZ9O8MVoa+QX6BzUYDUuPO1u+8p6RCPpuAEdeMeAm9HzzeqQhWKyEZ1+SaRcvjDSirsaHZvUf2djY0KRY4+NLMwClxlY6oz7Bswvkt6/Ao9jRtVkWd1j8UU7EJGNS8KmbJTRSmqKwc2yGr+VSUmBOf0jlKmRUGgRrc9h9pitQkw== 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)(5660300002)(55016003)(83380400001)(107886003)(186003)(82960400001)(8936002)(2906002)(38100700002)(38070700005)(52536014)(122000001)(76116006)(54906003)(33656002)(9686003)(7696005)(6506007)(4326008)(86362001)(53546011)(316002)(110136005)(8676002)(66446008)(64756008)(66556008)(508600001)(71200400001)(26005)(66476007)(66946007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?m0Guqat29PTXAS+xQSuq1slvBl7wauB7u7Y/z+50mt/eVE1lv4G444g4G0bX?= =?us-ascii?Q?+3MqFBp5BTBLM/0U+S/oUyuQslOb1e3bOiqdOL9HnBxCWT3C5XUwxPIX+tMx?= =?us-ascii?Q?bCGpvyMg5TUKDZRANzpJ4CPASfSPuLLyKhFwiv2Jp0gtMcswHE4V4VXougS6?= =?us-ascii?Q?Sz4ujr7fAC8OaFyZqyHGAQcFCjFxwkg1Hwn/XTx95/jmTuvpTQY3bkHOuKgW?= =?us-ascii?Q?e3Pwfop2KeW5gRaf8XJRsuNVvOGkOpzc8lCq0tybQVBBG95e/80A3uHnTSSv?= =?us-ascii?Q?sdsQvqzUYtehjS6W43lfpHwQ6H+sFYmkcQrz/IstSEJGcTnpdJPOg9iIbNvK?= =?us-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Blz8DJJKFubJ2dpn4?= =?us-ascii?Q?0KrXQc1kYKWHBcJBp4P/TENo8OTgBFNlWnAdeOP/BceO5WoEVEvwN6Mi12nt?= =?us-ascii?Q?fyXqKy450f5BWfK5QDSlrGF+omylqsee18nRyKJiKCjupuMYakFCR4/GuDds?= =?us-ascii?Q?MFxLMDih6DUt8R/slIBfDKwH1MpvAzfKbNyUPWnHuZAwpdcr++lI69q3Dib8?= =?us-ascii?Q?QJ9UtxMXe55aLUHlH/Mzq1mEM4LUv1z4veY4B15vZWSJiGIsjbCnXCCLFVdS?= =?us-ascii?Q?/4AgdBvSyOb2ucbYlpEWsKtSzd7aOwU9yHA+jkTWRWmjCIudRWs/c5CyGEuJ?= =?us-ascii?Q?xG7fHjOHdOrzlX8alAYF5Uh17kTcyoX7Ar62PfgGvESTqFnGOrEZFQPXuwOX?= =?us-ascii?Q?btIoPxbl7BUQvgGOwI2QrFoSf9kH5WAYbW0dIYSOoHAxwamkrhNVzqQ/+IA5?= =?us-ascii?Q?htv/KEq6EHIgImqW4VoLOQ1lrS32+c0buPuve3AJBvHnIEDADOVDrYlstJJ3?= =?us-ascii?Q?IwaaNp2/VQ=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: 14c195e2-3f19-44e1-4193-08da3c7223a0 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 04:10:14.7833 (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: aoqPyXHo+hRx+RiJ6k1JkFflZgy5VPDd3CjLY2+v4e9kfjPlojmOECElHZzaBeyuYepJey3AhGA472NyuLLeUQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR11MB1639 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, May 18, 2022 8:14 PM > To: dev@dpdk.org > Cc: Xia, Chenbo ; maxime.coquelin@redhat.com; Cao, > Gang ; Liu, Changpeng ; Xu, > Rosen ; Xiao, QimaiX > Subject: [PATCH v8 05/13] vdpa/ifc: add vDPA interrupt relay for blk > device >=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 > requests. Interrupt of all queues needed to be relayed. >=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 350214a..509a1ed 100644 > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > @@ -369,6 +369,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 > @@ -378,7 +379,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->hw.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 Reviewed-by: Chenbo Xia