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 514B2A04FF; Tue, 24 May 2022 04:58:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF06E40A87; Tue, 24 May 2022 04:58:20 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id A8A4340A84 for ; Tue, 24 May 2022 04:58:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653361100; x=1684897100; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=6wE36STCjGUmaO+HDiGjOBIAK9R2CmimFWfFz9e8IGk=; b=aidyes3BRfZk+yMd2vrIFPosw7xCF6hgoZwyxplbYlJZCWB7E4wd2bjy IrrVwUBjdDHzN1M9MR9U24bq6cdLDWBUxAId4q830kHj5XyTSx3xd7oFY w8TU12c3hNelZnARk4QUmb1ptb7fFQR1i+A/BLzO/EFAe5uS10c9YiU8s +3JOdk+yUdzCbKla9tDBj3EZylZy6yxvRWTmVQk/n/0E1ine7RtSqTvdt e07mtrc6GhhFkyHm+pGQ4y0jVdxB+vWMQTwzRmMtioovXW0na63gn+WGc PLUZokppP01q9gTzmLW8l2f8lMX69PeDBxadm0bjm1n2Qrz9nF4x2fO+H Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10356"; a="298729376" X-IronPort-AV: E=Sophos;i="5.91,247,1647327600"; d="scan'208";a="298729376" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 May 2022 19:58:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,247,1647327600"; d="scan'208";a="745036432" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga005.jf.intel.com with ESMTP; 23 May 2022 19:58:18 -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; Mon, 23 May 2022 19:58:18 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) 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; Mon, 23 May 2022 19:58:17 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) 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 via Frontend Transport; Mon, 23 May 2022 19:58:17 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.175) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 23 May 2022 19:58:17 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IHTY6J7mNGNlHn1KuXnPWhXASgAAl1Oi5tXaILHfzGsI/Gympjc+I0W5GnayNZVIsfupecatfY4Pm00btM6FP1cJsgTAknUXlroK8uOOxB7oH7dmwBf9d7OhE2CawXs9xaXSSi9kMh16XgAFCAhssA9j2lBtzWmwbEGdrQa6/Ymby2SwbpNxKFcylikJoVYChWp15hdIimXG5z9Ty8VxZPweo1CurcUYZE/3FGHZLJ7H5Je+UJRgHJsBSuX9qlJLiEyQWzFa66YvlwSWHbDBTu2QyJ9OWO5vrR32b7PrXq1JVPvJyL/jOl3E3zONaFGZGOXS6F8KAst+HOjeF3xvZA== 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=ryeNVOHamA0aLkC6L9h1xj+Z7XGlN2Sah1AOMGPok+M=; b=jz2P9DF4VbEadeG4vZ3wLTq1AgS94bYpnKvoYhGb97CBJev2YUKIG1fwTuiE7vwKyBj6FjJue+lbU8iP05bi5Up3vlZIWE7UAxdTtg3X5n3/qCrkvOSrAQaNHCXxIwRQ+7BxCGgXEwuMvcOlBVbEeotKV69gvrkIr84G7sZ+liYtqzu0xE6M0laL3kaBeuzB33xdHibhPG+oYJyP5iTIyPAVrWXJT8kTDI4jnKNAtNwYhJBTfm3HI25XcpE5aKeGBSNqRgws778KBFafTyk+8R5RSDErtnS1AOF9dCKeBZwJtFCjFCEVehIro591s/gfcDW/ZOjcnb4Zvv5fhgS25A== 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 BY5PR11MB4039.namprd11.prod.outlook.com (2603:10b6:a03:18b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.17; Tue, 24 May 2022 02:58:16 +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.023; Tue, 24 May 2022 02:58:16 +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 v9 05/13] vdpa/ifc: add vDPA interrupt relay for blk device Thread-Topic: [PATCH v9 05/13] vdpa/ifc: add vDPA interrupt relay for blk device Thread-Index: AQHYbo8PpxLDgz2d50eMYiwGTX8Inq0tVsrQ Date: Tue, 24 May 2022 02:58:15 +0000 Message-ID: References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1653298524-232138-1-git-send-email-andy.pei@intel.com> <1653298524-232138-6-git-send-email-andy.pei@intel.com> In-Reply-To: <1653298524-232138-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: 82b02b7f-70c6-4d2e-e61a-08da3d313fd3 x-ms-traffictypediagnostic: BY5PR11MB4039: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: z9949TKzdJ4Grgj8O3Uo34MLXONrGFI8MR/JUXuHocL7NI/AxwfFfU0OuGsao4yvYvqQND1O3aA2qJh7A62rgP/qRSMrp1YRIujwrN1lTb7dEzc9viflYzKdfMmNXMjwuRx1GT6uvKZK9FMUi5xTcc4bHiBY3CM/8NKEIj5BKaUUjMD/pqMt6mrU9u6TPit/xTxcYi+piZt59C9pAiA1wI19eF6YLKr6JHxm+D+W/fLDlkoBwOExFHxHYaa6SVD9fBjWUZaOrBXuW1rCUtxDoBA0V7A+/VqUx9ebyfF/kwrdEMMzA7Y08Xvc8XYPyeKnTuJGjjfVzIwNiW5meqXlIrm5PmPQmZQK6OhLdH5URZ7y/77qjMsVMvRfKf9z64TwCg0QdgLY4MdXlI1UNrYPHJKkTYlA8niTYUqsmcVPULmA8qOKy1vEGl7k3j0Nyi+zoYih3NwzkpcNalvjkPbMfNn+5zYpY4fZfoBv9oteDtqsEX/OSqscfGF4+vXJn1+5k32BL/ojaOgJsMFFOKvpuGHVYfccQz7FGTHdH1gJLzXTIY+m9ASL/NOz+LvWc/89q6e5lcLc62HonmljCXodU9twzdVGYzkliuIAxYqseqmDSjZ/3P59mL+65r7khuBqTUxaQ+CFMGuopmxw1B53CjsIKkI4KSnMkAla8/XaVTn3Mec75fnnzf4vEpU/ZTt0kdgEGAG6Z/TYulDuRfnqhg== 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)(8936002)(66476007)(52536014)(66556008)(66946007)(2906002)(53546011)(110136005)(316002)(54906003)(64756008)(76116006)(71200400001)(5660300002)(4326008)(33656002)(66446008)(8676002)(7696005)(508600001)(55016003)(6506007)(83380400001)(122000001)(26005)(38070700005)(9686003)(86362001)(38100700002)(82960400001)(186003)(107886003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?m8YHZqT2YMz/xj5buRXUuBDQ7L6sI1gAmlx6nauHx6azMa1dmNHX5vaYsjLc?= =?us-ascii?Q?hj6aEFIXceL0qtNOzptNogBGR+9fpXczLO2WAJcTsEIIZw8wG29KGJKBlIPl?= =?us-ascii?Q?G1Ej0TpI1XD1GTw2qI2sq2Tjh4rlJ5v/PkpMuOgIBJHvopeXvWZtkly/eVuz?= =?us-ascii?Q?5+syhXl6gNifTgAnKM5J/41X9Aesw2DBFKI0Qwz1agXmrfGERZankcDb3K/3?= =?us-ascii?Q?LRfQu4mpKV6HPs+nP6h2xawXnzpGntAA8ATcdK6MeQPnTA+DTrkhX+dUey7v?= =?us-ascii?Q?SdHmryafVl2vy0K0ppWd5OSYYb+WE7CSa45Z0puZo58ueRQ0X/y0lmkFC69r?= =?us-ascii?Q?/p3KP9E8np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Qj3rE9sN1mehHTuBOX?= =?us-ascii?Q?dgaBY5zuGyRfvRuD9bpaMip3xlPDQ9mFM1Ik81zFJ6oDOAv7U/lPq9PMOLRr?= =?us-ascii?Q?HcYQiFqdhE4el+510i5LbGeEJK3zu42m/B6CMIfkYsF4I+8WWgqkjYhry71f?= =?us-ascii?Q?GXnEWQ48EFKRhWHpc/BaVOAZquM1FGybxf6ULD1YLtq63pdoGSb/YpTYDg0Y?= =?us-ascii?Q?DBWZgKkd9E/MhJVOzxqKli56T/ZPe2fF7B9Ev8cpCYjZ7CB6g3C/TO9WAAei?= =?us-ascii?Q?3RuezdEw/5T2RpbH8aani0f4aolAQ/umbMmmntBEWnekpSY1i3oBVmhgtYmr?= =?us-ascii?Q?iziRZLvVtrihpXTWzs6PWw/d7O9mNOFrTdPsMLWWBtRuJO2VX9WfTE1hdAk5?= =?us-ascii?Q?JAFtpONtifsZyoDVk8wY3J1wU+I0+3mhOB9S/Uw3YMgKUkPzBkKGbClG+V62?= =?us-ascii?Q?y/uAsBiUQ/kFk3DhVQTA7kypep28JZmT3Wg6v5P756edxDrxwudCg8X0G+gv?= =?us-ascii?Q?EYqYfmBzeA=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: 82b02b7f-70c6-4d2e-e61a-08da3d313fd3 X-MS-Exchange-CrossTenant-originalarrivaltime: 24 May 2022 02:58:15.9733 (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: FI1IlTRKhZD7BTzbELBYrYLZVVi3Pvln/uSsXNhSmLgvCCkJEi6yhZZcBC0Sin1zWgMVx97fLqbIr5u7w2DUfQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4039 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: Monday, May 23, 2022 5:35 PM > To: dev@dpdk.org > Cc: Xia, Chenbo ; maxime.coquelin@redhat.com; Cao, > Gang ; Liu, Changpeng ; Xu, > Rosen ; Xiao, QimaiX > Subject: [PATCH v9 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 c1fc1d7..1d05529 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 Btw: add my R-by in next version as I see in this version, they are missed.