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 B0485A04FD; Mon, 23 May 2022 05:46:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5825040156; Mon, 23 May 2022 05:46:20 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D05134014F for ; Mon, 23 May 2022 05:46:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653277578; x=1684813578; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=xAFUUpfA9KdZAZkAHRd8EN5v1mQlNr5tvdmM649DLkE=; b=VKbcroLwZvakCHbNcyURrdpwIbBXhkr5WBVE55BYPrLiEQchnoFSQo37 xyQgzXs0KJMz+rUKg+4koCKCEMJ5DT2c6Ch5pshqcJ7Ji+Muwv5H73dvA PESHcys+bJynIKuh/fA54eYBT6CvxZdyHGCKAaOrfFpWZo/R3ARRVH795 IT3zPLX21gOsH8/+7L+a89g82FCVQHgEfA0VFXVCZEjAYyFseXP5Ks68c 5cJlhamf5a6UWuzu5iPyAsbQZZFxsBTcnyrPrCWDmgC+UlqQv3rsp6Oy0 5LNySwtnyZFAWHJQQydmTG/LT1FtHEbD3l8E+d8gk2/wGgZDguykkHQ8n w==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="271907851" X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="271907851" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2022 20:46:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="629158150" Received: from orsmsx604.amr.corp.intel.com ([10.22.229.17]) by fmsmga008.fm.intel.com with ESMTP; 22 May 2022 20:46:15 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX604.amr.corp.intel.com (10.22.229.17) 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 20:46:14 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX608.amr.corp.intel.com (10.22.229.21) 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 20:46:14 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx609.amr.corp.intel.com (10.22.229.22) 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 20:46:14 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) by edgegateway.intel.com (134.134.137.102) 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 20:46:14 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UdOpAMztr4un6hXc0FB1hnsfRsnB7aO/09W8I1rz1+m1y7VfD3qljWYh5M8VUwDWrbX5YEH/p1NCZZeMtbyd6l02VMxo8Noii5MZIaiant09icml7U/11MqAtk1hGRMUG3IMT9nRTQyRua46g36s9SsqSS4foqGkO3wx0hjAnkQrir5CbRfeIbIqATA6RWwEqtSN9UG03r3te0DHtJ0lRznIzLuHGwDilBRtmBJ7s/qY6CkG1drBpPXdtlbiqWtQCmwjkac152EaqRT8/T7uNG8VmnfqqGJGa5BTjbHYupiZooY52dM+L8uhRgQfNlM7789zHfAPPxlS9sQpSdKRqw== 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=PUFwPmPQgPjnpV2Owgueje7rMOPJzt9zZgRJxoSndyA=; b=N1HoaBC0Fv4pl4+HGw65QQXxXu3cbunHNrGc0H4puafE7OTyqCX4Nx3mLTEJT46GGbehR5Np/NN+/uGL3A03igb8jbXXfr5Tdf/4dSk2gUgPlmS/smvQJq7oSPWt5kSR9WkK/fUH7GEUiCG3l4g1TN7q/dhJLSslhyjvGxFE8dLF8qoPyA7ZFuoL0GznMiD3hwvl067s37EnRX4d9NlG58gcHOOocg4EVQJcH4poHru5oGRhYjH75uY9w7PYO9gT7DmETYJVGdWLaspl7ZVR7BzQku/lPc2w9VLS1mE1huCnoDzgNeGkfPA8h7+a9IPUBf2xRDdg6wYpovfvaRYhvw== 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 BY5PR11MB4006.namprd11.prod.outlook.com (2603:10b6:a03:188::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.15; Mon, 23 May 2022 03:46:06 +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 03:46:06 +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 02/13] vhost: add vDPA ops for blk device Thread-Topic: [PATCH v8 02/13] vhost: add vDPA ops for blk device Thread-Index: AQHYardRLu34CTPvw0Gg+Sow5IJOcK0r2V2w Date: Mon, 23 May 2022 03:46:06 +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-3-git-send-email-andy.pei@intel.com> In-Reply-To: <1652876035-70513-3-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: 7e83737f-9f56-435c-7e5c-08da3c6ec477 x-ms-traffictypediagnostic: BY5PR11MB4006: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: XIBSscVMrebOMBo+M5QCE6Evz6xjRcj01QELYG5b4xJ8gMPemmWnLY0QAHqlu42nfxBnnjnfTd7X4SVX1FS4PnH9ZKBfgjBUPG6UbImmR/f9uE8zTCI/Z803bjp2nJ1qpoqOy1LkMcK0YUWbgsCDP2Yvf2xQ4zmLjT+sQ3ap9PEIR3QqqV8V/gBbu2iCiBI2Bnial2/CfOHZLloWgSH4fk+ZE73tTVTRE+qwgOTGVwlQGNk88W8BLLWXMDVuYtoKX5vCetiX9c4rOdF6eJW6b4eZMRaNrCunXtYBIM8Y2FTS5AHa5sfKtJp6cGtLSwrBrbKJEZBHTVaS1Yo0t2gvXGKBV6n6Bkzd7q2YXO5Br11qGChjFL5ZBJLuclAL6SGrMya1HBXrEY0EP3a1X6LFUIA8OthfS99F7hqGwdr0mAnoN//RvppZXb+4OHLJDFtoAUMzfDquG4fNuTIlQfW1xIxCxFXLWsL44B4JhiSO8McX8JdiTTm9UcMkpXCp4uCBU2jWVTdvV9DRMu1TUO8t5HQIizPsiILY0tL6368lhysUCUDBmnJEwnJSUPP3HQxkZobqv6u8+yvk4sEyOFrShUJ6sIknPIQEJBRM9Id1cxUTbRKy/JHImIYDy031532XRzyKLClSkTmw7vY3K/GvR3LYm1Oam3mTArGn9r3gc4nZXzDYlBQTmxieQEueakOscP8Hww4RUWAx4tf4ozzBCg== 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)(4326008)(107886003)(9686003)(8676002)(83380400001)(53546011)(508600001)(71200400001)(110136005)(54906003)(316002)(186003)(26005)(6506007)(7696005)(64756008)(66476007)(66446008)(33656002)(66556008)(66946007)(76116006)(2906002)(38070700005)(38100700002)(52536014)(55016003)(86362001)(122000001)(8936002)(82960400001)(5660300002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?/6Qf7WwO5pTmzhP/nU6r+5kYxITBBBxgSnq3t32WkDU/LUFVUbUwxPMaCAMF?= =?us-ascii?Q?rDISCbGrw9/CN0iHU3MtoxAsKB5AjJ/qE9cEPN1GDfffQuOFGNij+cJ+Ek9a?= =?us-ascii?Q?NU+GIYLxHZdfaFpjcfpKrbdJ5orNksagjglDJ01xgzcCdPdzkcw5Z50CUIpM?= =?us-ascii?Q?heDXZW5xFe8nkN2STiu30X5Au9r2x9pj3VRF8K5SSdbKxJpePKgs4m0QKMTx?= =?us-ascii?Q?tsCz+LIWvDpM5irEEWj/VLRvVBIr88EsVJjQekm6FDbCmoR2rtxVFnzLx2q5?= =?us-ascii?Q?Lf6O7hCxOtqa6rVQfLXU7d8siMNpW4LOwClBClMbN2CjPLthO+hpwyU615sr?= =?us-ascii?Q?CQD5feEG6KEqDgqR8ZBjvEUpsSAMvl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Le3PQtkMsXwB3vErezmGJxGC91li8H46wMK3rAAaHW/GK7PAbak?= =?us-ascii?Q?OmR+xOmmV9p5ssn6fOLWzUYGXnqv647+nNns2NA6SM59XAzDXOcJglUFxAQK?= =?us-ascii?Q?8TaC+q3EmfKCY3DfeAVjMcCHvYl/E6/4AMpIp4v/69ATLcdMvbeVuBsqZ7h7?= =?us-ascii?Q?nDl5BmfmOMp8jV6WhAUItNpzNNq9NSOmPL+M09T5QGb5nq3Y1uEQ6Uayp9MK?= =?us-ascii?Q?K4OvaZY45PhNUfsBD4hdPwrKgZwul0oVWJZj6s99yQQeUZ2+3Tfxb7fwO1ip?= =?us-ascii?Q?MVu/wJTmER/bD+ha6Xk1WylhUn+yGuUQeThnDUm5huQfhf1IWBWQQBOcbl63?= =?us-ascii?Q?AcKPSPKAAdUaDNUWmqLrWnA8TbvE1Zry0NJ2otsR/IldBbw5B6bZtCvvLWiC?= =?us-ascii?Q?2++S6m3rE4jSIR3wTieKond4z89Rw+TdS4ERVAA+FplqriS7Y/cvDhs5lLPy?= =?us-ascii?Q?d38zPA69Ww=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: 7e83737f-9f56-435c-7e5c-08da3c6ec477 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 03:46:06.5956 (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: nAtpyYxVyu8//PuKc8+mVoqwlu3KABJ/SfnmEk0OuI7sthZp7xaSSOdmyKj4bZWuNQ/li5aJVsNwklnmE06zYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4006 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 02/13] vhost: add vDPA ops for blk device >=20 > Get_config and set_config are necessary ops for blk device. > Add get_config and set_config ops to vDPA ops. >=20 > Signed-off-by: Andy Pei > Reviewed-by: Maxime Coquelin > --- > lib/vhost/vdpa_driver.h | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) >=20 > diff --git a/lib/vhost/vdpa_driver.h b/lib/vhost/vdpa_driver.h > index 88138be..e59a834 100644 > --- a/lib/vhost/vdpa_driver.h > +++ b/lib/vhost/vdpa_driver.h > @@ -72,8 +72,12 @@ struct rte_vdpa_dev_ops { > /** Reset statistics of the queue */ > int (*reset_stats)(struct rte_vdpa_device *dev, int qid); >=20 > - /** Reserved for future extension */ > - void *reserved[2]; > + /** Get the device configuration space */ > + int (*get_config)(int vid, uint8_t *config, uint32_t len); One suggestion is renaming 'len' to 'size' to make it aligned to set_config= . With above fixed: Reviewed-by: Chenbo Xia > + > + /** Set the device configuration space */ > + int (*set_config)(int vid, uint8_t *config, uint32_t offset, > + uint32_t size, uint32_t flags); > }; >=20 > /** > -- > 1.8.3.1