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 8ACBEA04FD; Mon, 23 May 2022 07:04:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3327240156; Mon, 23 May 2022 07:04:59 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 60C6A4014F for ; Mon, 23 May 2022 07:04:56 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653282297; x=1684818297; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=TD0vjbwt5bxbeDk66xL3N0yk7uBx505xca/IFux+Bv8=; b=YVlNbctmkE0iWh2iKFbnrdXddx1iqG8di9TIwjeTHTBRNe4OdV3qyk3y 6IyzjX7AxWY14FX/QopEtJVOx5UOUNR/fGcNO/6wXOtjE77vWKrXU1JTE GTs+8ANGyvMUgXqDzIuFTc+X6DgN5MMLWDIwEn045lIF6+yWO4lJkAq7M JC4YcF6fwMXVRe+um1HKx5Q+fdZBbK82gnOGmhm+jw3LdHlzRYQnQlNiU ndhz5sP9diTga2ZxRNE3CqIqyHnaDp8an9PUcmcatXP/VpjuKVOnb7rcy k2GJbzna5pHei7Q+5hpCdEPUTCFFiuClxRt67cTY26ClBlmMBNxd07OqS A==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="271919671" X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="271919671" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2022 22:04:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="641282605" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga004.fm.intel.com with ESMTP; 22 May 2022 22:04:54 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) 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 22:04:53 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx612.amr.corp.intel.com (10.18.126.92) 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 22:04:53 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx609.amr.corp.intel.com (10.18.126.89) 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 22:04:53 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.171) by edgegateway.intel.com (192.55.55.70) 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 22:04:53 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L9WfsHS6tAXIwlBU+GI/ADSOxyj1ph6zjii5Tnf51PQ90tzmRAYzgXIF5+kcSAy+daotlm/GVZNGw2NkkDfQPX8JgDvXW5FyM+xMZi5afShqSGeceLmUEQ9DTnOH/q7kbJO3Q87JAFQ8MV1DM65U+0o7A6834g4YjK4uig+lRjRrXP5HK43u02BlBltda1AcLPB0MJZ5sgYJB8yN3aqZstDavBHAT2vrCzl48Ot2gAsicD43iHXMLSI1zik5EdBJiolp8ihptuFM3EUVsyy+dotefkCNbDFhwmLaU0LMdzoabYxojtwzsgiBesCphVQsFm8NgR4A2lYVMnhpw3j6tQ== 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=lKz2HQ0pu3BSspLb2K1dV1RHtmPrUQzwNYzMzwI+9p0=; b=D75ciYRWNkNgJPN2AloVVmacgkd9TKmjUL5KDoiBi3M4w8ALpylAZj5vCoOSPT4BesZFgCUWLQKeMXF42H97rqm7BZWBmAkHxAAo0mOwBFUMRf4xysvDO9whJmkMarFHrzsr3qgI3iElyxLh88/hcV6/DT4/7/2J56g+ffFSRRQeUBkykuDnKMzYHMHRDNw5RR5DuwU0FZ38Pz7abSCUUrSu3pY3V4SH/1EyHsQcW3IS4acSGL5Dq3XDj9xTorSnPfVxb5F4OvLTZJi5DXq2gGiX6ShK08aCHd7GRpH1ANqqO6i8xX/jZg+2qrKWna1ehfE/JvYEYTLeXJlMZ/B60Q== 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 DM5PR11MB1739.namprd11.prod.outlook.com (2603:10b6:3:111::22) by DM4PR11MB6310.namprd11.prod.outlook.com (2603:10b6:8:a7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5273.14; Mon, 23 May 2022 05:04:52 +0000 Received: from DM5PR11MB1739.namprd11.prod.outlook.com ([fe80::8c3b:8a54:d186:b555]) by DM5PR11MB1739.namprd11.prod.outlook.com ([fe80::8c3b:8a54:d186:b555%11]) with mapi id 15.20.5273.022; Mon, 23 May 2022 05:04:52 +0000 From: "Pei, Andy" To: "Xia, Chenbo" , "dev@dpdk.org" CC: "maxime.coquelin@redhat.com" , "Cao, Gang" , "Liu, Changpeng" , "Xu, Rosen" , "Xiao, QimaiX" Subject: RE: [PATCH v8 04/13] vdpa/ifc: add blk ops for ifc device Thread-Topic: [PATCH v8 04/13] vdpa/ifc: add blk ops for ifc device Thread-Index: AQHYardUR+EHgr2hvkqPhtZ2Emet4K0r3hpwgAAPPUA= Date: Mon, 23 May 2022 05:04:52 +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-5-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 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: d3242057-475c-4282-2d04-08da3c79c50c x-ms-traffictypediagnostic: DM4PR11MB6310: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: YT9AdJZ0BnvbuI6HfSPMCi9q879Qos5udGTSAOLKfkKW2okrThwD/YEIon0Zx7nrjiYvZT4GjmOci3QA5HfO7hvRfOQhfheWZFVvOMf8YrD/MbovOkHRuMVWHet4U6fco4iZJGTpBtSqr2EtTvuWJCKN+bDBJZXr4GT19HNZM8qOFMKGN+YYezsCB1VvtrT3GCzwlUi7hsWQSOoOtApBUbbZ/bydpMuhVhvXpvsA3Mgt3IP7hcBrQk30CpkRYysCn/ZKDBQGmyPuf6web6SvxE5TPEWj8si/5qNgr7PTERzdI3dwgKthN62AyDudcfC+Aq3KVX745u0/UEgOM2T2UslqG/W4O6j8zDnQsECIag4CmIT+rLp9ed4UzLyJHnpylBhpFpqTjg9S0W+ty59xEphWK/qRffUDj7DzT57iMxdJh3LIEmJATF3Nn8mCNo4EjLz8Wya/GbEplK6/uYxYSE+YiAxF5TSWzVyWSKLvcBzL6+9JqD7TMa8e2PP9nXJ4vl/zFDmCx+I3S91mTXSvrUOCeEuRcpbGggIV3CW8p5CO4S+1Cl6Om2s3s3E8gykoy1ReIGwy8OwnBb0GWo+PfDsrIGJSEY911RoLfdAwB9ES/6WiQlZv1lAnlHy31HgQH8eqycb3Gp6RET98zlr4w13AShTQ0rpMZpWgP6JeD+q8J4XsH697bQFOHcRHQTsQPH/uDGuGmonONuBkGRliKw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR11MB1739.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(53546011)(2906002)(5660300002)(6506007)(82960400001)(55016003)(8936002)(52536014)(71200400001)(9686003)(26005)(122000001)(7696005)(107886003)(86362001)(38070700005)(186003)(83380400001)(33656002)(66476007)(66556008)(64756008)(66946007)(508600001)(76116006)(4326008)(66446008)(38100700002)(8676002)(110136005)(54906003)(316002); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?0wE8O3rdrQ7cFrCy5WLzokOELp2kFMbW5h21doXvg61GLuZ8cQwPrHy+Lph4?= =?us-ascii?Q?6Awrz+ca+PIZtIWN7CH9LgqdIzPMZ0iwQY46wO+G0XtY7WUypFnKcx0M0lFC?= =?us-ascii?Q?SgVbwPBS3QDyshrMpyNCciDmtFTB2IgdPjp5fBWbKJFVSTUVXo1LGFGjh5ZC?= =?us-ascii?Q?wq75lktr308/a1sI1voX4zgcyZf833D1LPNPYQL3RSrkRzZtu8bdTE2TENvk?= =?us-ascii?Q?yD+UJcqLXXgokHBD2kpc3VF0GrlX//VYW1hV2rIa2ewuaYI7Cn7aPZC1DzBf?= =?us-ascii?Q?OTNwry6zEuUOD6HS/xoYedxhVIbLMRvzGgfRb+i1M5k8W/xZff/GeoCWc7VO?= =?us-ascii?Q?9+cwWbCD+WjsSrOXlVWMt7tkLAXCpigv9R3BR9fdsEb+QVSsxI1687jSsGRB?= =?us-ascii?Q?sn0NdTLr9bP0yy3jGOjJ6UfpiSKjP5+Id4ViJtAlFurxdAW5lzODgOaChGOe?= =?us-ascii?Q?EdfAdd5qTk8FZN0Noa/hhTXvahzZVBY9tCxOZ15kHvSlOuliO5TDVkjH908A?= =?us-ascii?Q?a1RKoDFkeCztWJ16y4Udg+tDO8Z6t3wLZQ/ZnYhEro27VEps83b+WR4g1KRS?= =?us-ascii?Q?kcI+N61BtKARE3oDogbCWkKNXve2NQL9/9e6BfYwtU6xGAQKO9scUm5fEHc0?= =?us-ascii?Q?wAoW7G25Oqa5ifXdHKM69Rs4QZ0u/qKEhs9MF7+pnYEpFkCkzlruRv216tKl?= =?us-ascii?Q?4YBrg+yrmaVlhrgVY812sm1uYKfodZ8sO7xl28u9uXb9kuerMlrrWfwVZJyl?= =?us-ascii?Q?zZhK1aydJGusRnGHzSOjHooMt9JYcvk2tDPBVz8MdB9ABTK8PYe2JM/3fZAR?= =?us-ascii?Q?uE9KhVznqO7yhjUH5Yw2Lr8OwHOpLIEZ73R0UR+2x1ZHNdNStp0frCyScgKO?= =?us-ascii?Q?kmvNNz/qFqU0EIJOAs0uWvzuxvd30VnYvvlhBaX3pAMrFy7yfWWb1rqEN84T?= =?us-ascii?Q?9U+4kZi+RhHQsuuRe+vpMlqPeYgVfh4uUfQN0QdPoYrpObVekL6x3DIRT60a?= =?us-ascii?Q?utn+fuywruqnVifmI9v6XSw/Znp1u6V97+x9N2AeQaoK/KQr8GyvFUOkRAke?= =?us-ascii?Q?BNqvHJuTxN4Qo824/kACfOr77bDetqGjW9FiDQUqWGffjICQ2qmABXxawtIP?= =?us-ascii?Q?wkrnglNmRjjVU/V5tIINBn8JItqV0NtNH/zT+Z3OYT+nbQU2IWRPM9uYegsq?= =?us-ascii?Q?82jMJIgUnSGN9hgGJWT4NMkL6KEX64Rm5VmUbngXVcZ0lVhYMm+dtS35gJfz?= =?us-ascii?Q?PmfGWWw3NNbTvJvcnp+CWVlHmG56mJ3q9snZWOERu2TA7HKeDLhMxesxmNkx?= =?us-ascii?Q?pXmIadNPqBNqCZetSsjC3kw1lH85NgDMwKqTeqAVBlPxm5Ww6BtKItiyndC1?= =?us-ascii?Q?iEyYDaapG4jUfIKdTSQ4FBpcMTp2qEyQRVzBrj3/JUvCJHHVxyECJkAxQtfW?= =?us-ascii?Q?9kWeoVVd+aPf5P7VO4SchH13YP7PV3DO4HvuGdG6Gyr5RtddBwo0RpfF/51q?= =?us-ascii?Q?dVzh+w3KaeXrG3shdmoH8e7nmQvV2tEjxw5ms4AkVFg2oZ1yfjM32GKLGKzn?= =?us-ascii?Q?bB2IlDNE9Jth2Vr1dbz/wGjvW6qBXWIXH2FerLMko6FdGsGFgAHeda2Y7VJw?= =?us-ascii?Q?WfT61ut6sPJIo7vMJ1wHCIaldHqUYPOGRkjwmBJdatHH4WZtS1CMY5zFep/0?= =?us-ascii?Q?Y6L2u84asXKucJeqIfdVHU8MFCNCNbVTfdLLK0z8+9sbrBKMX30AYETnpNjD?= =?us-ascii?Q?itmm/BqD0A=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: DM5PR11MB1739.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d3242057-475c-4282-2d04-08da3c79c50c X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 05:04:52.0496 (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: XF1wsOzFqnxOsAwdVdpJto0Xg+q+h2FQuiSVLLV8OOga6NOqr9PeRK2PLhRWPJracF7jG7J221h0U3QH0s0tFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6310 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 HI Chenbo, Thanks for your reply, my reply is inline. > -----Original Message----- > From: Xia, Chenbo > Sent: Monday, May 23, 2022 12:08 PM > To: Pei, Andy ; dev@dpdk.org > Cc: maxime.coquelin@redhat.com; Cao, Gang ; Liu, > Changpeng ; Xu, Rosen ; > Xiao, QimaiX > Subject: RE: [PATCH v8 04/13] vdpa/ifc: add blk ops for ifc device >=20 > > -----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 04/13] vdpa/ifc: add blk ops for ifc device > > > > For virtio blk device, re-use part of ifc driver ops. > > Implement ifcvf_blk_get_config for virtio blk device. > > Support VHOST_USER_PROTOCOL_F_CONFIG feature for virtio blk device. > > > > Signed-off-by: Andy Pei > > --- > > drivers/vdpa/ifc/base/ifcvf.h | 4 ++ drivers/vdpa/ifc/ifcvf_vdpa.c > > | 91 > > ++++++++++++++++++++++++++++++++++++++++++- > > 2 files changed, 94 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/vdpa/ifc/base/ifcvf.h > > b/drivers/vdpa/ifc/base/ifcvf.h index 483d38b..244de46 100644 > > --- a/drivers/vdpa/ifc/base/ifcvf.h > > +++ b/drivers/vdpa/ifc/base/ifcvf.h > > @@ -67,6 +67,10 @@ > > #define IFCVF_32_BIT_MASK 0xffffffff > > > > > > +#ifndef VHOST_USER_PROTOCOL_F_CONFIG > > +#define VHOST_USER_PROTOCOL_F_CONFIG 9 > > +#endif > > + > > struct ifcvf_pci_cap { > > u8 cap_vndr; /* Generic PCI field: PCI_CAP_ID_VNDR */ > > u8 cap_next; /* Generic PCI field: next ptr. */ > > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c > > b/drivers/vdpa/ifc/ifcvf_vdpa.c index be0efd3..350214a 100644 > > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > > @@ -1087,6 +1087,10 @@ struct rte_vdpa_dev_info { > > 1ULL << VHOST_USER_PROTOCOL_F_HOST_NOTIFIER | \ > > 1ULL << VHOST_USER_PROTOCOL_F_LOG_SHMFD | \ > > 1ULL << VHOST_USER_PROTOCOL_F_STATUS) > > + > > +#define VDPA_BLK_PROTOCOL_FEATURES \ > > + (1ULL << VHOST_USER_PROTOCOL_F_CONFIG) > > + > > static int > > ifcvf_get_protocol_features(struct rte_vdpa_device *vdev, uint64_t > > *features) > > { > > @@ -1199,6 +1203,91 @@ struct rte_vdpa_dev_info { > > return device_id; > > } > > > > +static int > > +ifcvf_blk_get_config(int vid, uint8_t *config, uint32_t len) { > > + struct virtio_blk_config *dev_cfg; > > + struct ifcvf_internal *internal; > > + struct rte_vdpa_device *vdev; > > + struct internal_list *list; > > + uint32_t i; > > + uint64_t capacity =3D 0; > > + uint8_t *byte; > > + > > + if (len < sizeof(struct virtio_blk_config)) { > > + DRV_LOG(ERR, "Invalid len: %u, required: %u", > > + len, (uint32_t)sizeof(struct virtio_blk_config)); > > + return -1; > > + } >=20 > I believe it should not be > sizeof(struct virtio_blk_config) too? >=20 I think I can make it if (len !=3D sizeof(struct virtio_blk_config)) > And one question is should we limit only reading the whole blk config. > I guess we are having this check because of current usage of QEMU? > Although this is fine as it's vendor-specific logic, just wondering if we= should > have this limit for blk device. >=20 I think if user want to read any part of the config space, The args should be (int vid, uint8_t *config, uint32_t offset, uint32_t len= ). offset mean the offset of struct virtio_blk_config to be the start of user = needed data, the len means the data size user need to read. That will change the message between vhost and QEMU( or other software). I thinks that is another story. > Thanks, > Chenbo >=20 > > + > > + vdev =3D rte_vhost_get_vdpa_device(vid); > > + list =3D find_internal_resource_by_vdev(vdev); > > + if (list =3D=3D NULL) { > > + DRV_LOG(ERR, "Invalid vDPA device: %p", vdev); > > + return -1; > > + } > > + > > + internal =3D list->internal; > > + > > + for (i =3D 0; i < sizeof(struct virtio_blk_config); i++) > > + config[i] =3D *((u8 *)internal->hw.blk_cfg + i); > > + > > + dev_cfg =3D (struct virtio_blk_config *)internal->hw.blk_cfg; > > + > > + /* cannot read 64-bit register in one attempt, so read byte by byte. > > */ > > + for (i =3D 0; i < sizeof(internal->hw.blk_cfg->capacity); i++) { > > + byte =3D (uint8_t *)&internal->hw.blk_cfg->capacity + i; > > + capacity |=3D (uint64_t)*byte << (i * 8); > > + } > > + /* The capacity is number of sectors in 512-byte. > > + * So right shift 1 bit we get in K, > > + * another right shift 10 bits we get in M, > > + * right shift 10 more bits, we get in G. > > + * To show capacity in G, we right shift 21 bits in total. > > + */ > > + DRV_LOG(DEBUG, "capacity : %"PRIu64"G", capacity >> 21); > > + > > + DRV_LOG(DEBUG, "size_max : 0x%08x", dev_cfg->size_max); > > + DRV_LOG(DEBUG, "seg_max : 0x%08x", dev_cfg->seg_max); > > + DRV_LOG(DEBUG, "blk_size : 0x%08x", dev_cfg->blk_size); > > + DRV_LOG(DEBUG, "geometry"); > > + DRV_LOG(DEBUG, " cylinders: %u", dev_cfg->geometry.cylinders); > > + DRV_LOG(DEBUG, " heads : %u", dev_cfg->geometry.heads); > > + DRV_LOG(DEBUG, " sectors : %u", dev_cfg->geometry.sectors); > > + DRV_LOG(DEBUG, "num_queues: 0x%08x", dev_cfg->num_queues); > > + > > + DRV_LOG(DEBUG, "config: [%x] [%x] [%x] [%x] [%x] [%x] [%x] [%x]\n", > > + config[0], config[1], config[2], config[3], config[4], > > + config[5], config[6], config[7]); > > + return 0; > > +} > > + > > +static int > > +ifcvf_blk_get_protocol_features(struct rte_vdpa_device *vdev, > > + uint64_t *features) > > +{ > > + RTE_SET_USED(vdev); > > + > > + *features =3D VDPA_SUPPORTED_PROTOCOL_FEATURES; > > + *features |=3D VDPA_BLK_PROTOCOL_FEATURES; > > + return 0; > > +} > > + > > +static struct rte_vdpa_dev_ops ifcvf_blk_ops =3D { > > + .get_queue_num =3D ifcvf_get_queue_num, > > + .get_features =3D ifcvf_get_vdpa_features, > > + .set_features =3D ifcvf_set_features, > > + .get_protocol_features =3D ifcvf_blk_get_protocol_features, > > + .dev_conf =3D ifcvf_dev_config, > > + .dev_close =3D ifcvf_dev_close, > > + .set_vring_state =3D ifcvf_set_vring_state, > > + .migration_done =3D NULL, > > + .get_vfio_group_fd =3D ifcvf_get_vfio_group_fd, > > + .get_vfio_device_fd =3D ifcvf_get_vfio_device_fd, > > + .get_notify_area =3D ifcvf_get_notify_area, > > + .get_config =3D ifcvf_blk_get_config, > > +}; > > + > > struct rte_vdpa_dev_info dev_info[] =3D { > > { > > .features =3D (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | > @@ -1211,7 > > +1300,7 @@ struct rte_vdpa_dev_info dev_info[] =3D { > > { > > .features =3D (1ULL << VHOST_USER_F_PROTOCOL_FEATURES) > | > > (1ULL << VHOST_F_LOG_ALL), > > - .ops =3D NULL, > > + .ops =3D &ifcvf_blk_ops, > > }, > > }; > > > > -- > > 1.8.3.1