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 DB607A04FD; Mon, 23 May 2022 05:41:55 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C06DA40156; Mon, 23 May 2022 05:41:55 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 1EE424014F for ; Mon, 23 May 2022 05:41:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653277314; x=1684813314; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=RpL1+YYSx+Zju/LVEKSdke7LPkdDGAqR96/V2uRA1VM=; b=XhUDt85n3hUJqHFNOY7tr17ZZncyEn6nQmZPSvwDGBNZ40Ew3KW7aLe+ cmGjAN2awlwy9HJDAHeD55ySfdZfF70rfH1mtHKgB5LMREIyAVOJ3kgyc vVK9c7jdlgQck/upOjXH+PPo/qZi48cxBomsX3/lZayyzsCK4xbDfn3fm vt7wNjcdZZBfn+KpTU+ZKDBlOo99Cc6n865gvrtIQQK1RfzK42BCGLye5 NuKG5WyVxqHoEyHqMhEIPurbWWtvBb4DVLWVaufMP0Es/VfcRXv5iyeFP vsI5SiGCtEeufwu764wEbRcbOqAfvqsP3k8XvEEFXzQN33EZBNMMkHGjo Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10355"; a="271907306" X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="271907306" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2022 20:41:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,245,1647327600"; d="scan'208";a="558444383" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga002.jf.intel.com with ESMTP; 22 May 2022 20:41:52 -0700 Received: from fmsmsx606.amr.corp.intel.com (10.18.126.86) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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:41:51 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx606.amr.corp.intel.com (10.18.126.86) 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:41:51 -0700 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.109) 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 20:41:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hKskSJpyzwriI0jwdxn+BlURhy3le18OjFQr4R02UxzOspH1HoJFrRnl8+qMVqTzpgLrbUr5bXUspysX6zRQZrhaQ7p0JGkZolZbN2b8QqXoOPGbew/x0Rjxea7DFn0yINNDrM7jAZRTMJ5M5rDcIJ/nH6gbuaoSJMqamSbkgunecKYTIvtEJ1hS7gmDMwxtqyCZ6z09aZlItsnnmvNQmX7Gb5kRc33HUac/Ok8EF0Imo0XawLkdXjvPgg8oH9rZeZuYIOyZfWEJWM8J1VsOBdFBoH8Qr8C4yFvrVm+Y41UIHL4tANHu+39fy22L+bgFxNHlkD5E/LisjhbbAGzKfQ== 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=NvIKND4eLh8N+wJQQm+z2Gj9jtrqRW5lEs2NYKfM6/E=; b=oSyticBjad/8dAGk5RpjINK5jA0L4kRIhlftdJk/NfFx9ZjbmWn1nqEDN9OvtMR5L4dfFkBgQfmsFTbn5P1AbrakqDiCn1jHyhVeHdLy/JrfIZc4KYtfGyuNG17icWsWfAesJY/R1HcrPec6JFNFTE3blvbN8v6nZ+waeqigKiPYWzXGPhKM9+L9Ps4gkjTXoyIYp31i1TQx1K2qFm3h0cXui0EcvBX8zhVJyDb10Dr9JO9h4WkH4qdcTAt/CzgpAqAniS04zLldCBbxpBkdQOO4tC0AcVNNOVzUzYHRWUgt6tsl5MgPn5Ev1nrpwEgpfbK7Qr9UX9+jQxDzRtnQ/g== 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:41:49 +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:41:49 +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 01/13] vdpa/ifc: add support for virtio blk device Thread-Topic: [PATCH v8 01/13] vdpa/ifc: add support for virtio blk device Thread-Index: AQHYardRH/jdXeBNe0asLm3tRlKF760r1xiw Date: Mon, 23 May 2022 03:41:48 +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-2-git-send-email-andy.pei@intel.com> In-Reply-To: <1652876035-70513-2-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: e1b54bff-df29-4da1-0c55-08da3c6e2ae2 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: UFN4OxcpYRqkQufpsGN3mOAIeGo2T7LKENL0qc4Fn4d/6AtkSkiUGCPO8rRDzDGPXknhj2wmCgedqRjsYevY4M2dT2gSQpIfzrp2hEwmiBiELfynbzzeT6NLwXNuBanZBxOxSnaaDRIu9otR3hjHIzgJVTRrGiFeXbbxfj4uB/oJzZrfZhi6iJ24tYbeUWEfS/2iLqZ3HOfBbovC1EDx8wK8Pp2WgmZmf4VB8vLtngRMr8ql4yWfOLOeodLEB1S8SRB6OeIHPh0U1ohLvi1uhyFx36CmPJmWMQBi4wvBowM9zJF8aKQd1UUHaP9MfdM5TNPLhg5yO9pQDjqO1FCkeqdwf3lYVPCM9ez0IAlsodaLZSY5VWWCFnaELyOSb+fLTHQWdZr508o6Z2xOqOy5ztXMtebk57OZ26sqMa43U6attdYaPgOWI5s4jMP+WbyyNiOHX4EhjGqpSQWGd6V8zoJ874wn2mT8gdjZRXdgNYQI1qqCU9m9On+zglbat3mMrRxRFHbCNCfufIk192cejZshzhikvbuVN/6Wy4fSkD12KqLj2EKIcQ1XrTkio5S7ST3xxT5F8OqhqNKPx+dhqvzoheSaLokDfWkdJgv5PILPTrUW5Hxg/sEF7e+H8Xb7RtC1KmO5s1YPslWVzhXvdnQtwBrwKtZd1FOX8Z+DaIM3qNhAuGqC3b1Fndrg1BqyvgA66v8tSw+Ldde4WbD1uA== 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?rDhNTDIRYz9dkDQrurlIozHtK8fI8DOS8DH+W3qaru+LEZ9YiriGg0Wmslpy?= =?us-ascii?Q?dp0gH4q2bn2e+R+tAmmeaEwZlOXlxuicm3cDSysWKu4h9hPLWmFjY8cpip0H?= =?us-ascii?Q?3bn/M3pSGHKvkpfibxuhNZ8TWE//YfFnJm5LKP1mkxzZdcyK2+hD4K8SLAwN?= =?us-ascii?Q?I2TsiURm+9HzNnHiaXnnk/9MV3/RQT9U+/dmfOlEVa8ss8nbOEVUnZqY6QZf?= =?us-ascii?Q?aTq7QRRm2K+GF8KZNeRTsCHbdqNMQM1am3wTRnPLWzQKIvVwaPkUO1CE+fW1?= =?us-ascii?Q?YtRWOBUOaWE4fPooafaqLc9XUD6eP+EY9WNvRfzOhHhJEoA/s1U4dYarlV3l?= =?us-ascii?Q?CFamaJtrLhew3GH+sHRv414MDyuHAZMNcsO2ZCkMUPk6Mcrrlw6A4PY4at4L?= =?us-ascii?Q?1wlHONAISWPdXC/vhVbcV5KXIuaQWAqwopCv86vJlrbbdW5wZXmqB5qdoaaq?= =?us-ascii?Q?oasWF1QnExI1hYnkb7BgVdmcVMWdnJ8n9h0ZwlXIFiEAJxOX+0SMWgcsxY3J?= =?us-ascii?Q?OLikHK1EBrNbNeAuiGEY/ASj6scSEFBSuIw9AaV3xRPSOBB8p2UQIrgmYFOy?= =?us-ascii?Q?YMvnkQjJvwvdfo1Z6scJ3QA4iU0OWDNoVA0Hn0aB7t/o4P6uVhGGhPPxLCHd?= =?us-ascii?Q?qVsKs3+/Ql6U086ln8PrJDWURlv1FrYGE3MyYTZApGP7bGfNJPot7KHZmuBs?= =?us-ascii?Q?8fPB+XchkJZb2Rp515SsksoK5t8zj9WaxcMb/YASijM6bbPA484ym0U9rY6q?= =?us-ascii?Q?ZAVjPSMsgW8v9zq3XefsSXGeQ3PjIPKdam7pOBpjZOwHC+Nzli25PAiI3exN?= =?us-ascii?Q?3uhWChayzJ6i247HfGfUKk80crRLFTUppgcxlm34A2EiilB4ZOWUThxJWz2P?= =?us-ascii?Q?tw5ZE5GUS/4RFvKwpaFS+cSBsRKBanhzurghpHnK2yZCKKl3yQhuNpP0qxNF?= =?us-ascii?Q?5hVbpQ2fKqok1nj+C4YXH9dlQTgMCGK+kDODFKZxVJq+0dvWGlVf5aeXbfbC?= =?us-ascii?Q?Y4xzxnBn7UE/4X0pJt13kqenE/koR4U7mr69xDCA7jm3RywiAgkVWHcUCZY5?= =?us-ascii?Q?AxNNwe2iJ1PdOURBPTs1stA0bNlksh2NcyE5RERDHZE5UPW0CJhN6M+wJATc?= =?us-ascii?Q?sYUkN3AJLkz/fxTd9e/AOqdFc55YQ8i7lNcKbk5LEX1cY3imJia+MInEalH7?= =?us-ascii?Q?SqA5adk2BmhkryU0d9Lecj6ydN+gvtEcqcySr5jV6UY5x4RyiM36rDvQKiQt?= =?us-ascii?Q?1iNh6PVh2fO1zJA4HMDpugflWqBdup7F7a90MwTA9cUpy8v+y7waLC7tQpmh?= =?us-ascii?Q?g89fw7Ml49N5k//lnALH6WOPLcAEWWLAuVVgJ3/2okYF2eZ27s5siNOa9G/Q?= =?us-ascii?Q?CzY8CI3MZtkI2XJE9oMf1VAJl7yEC0Gq1Im02//kV7FqMV2rJ+sFRxaU3KJv?= =?us-ascii?Q?vQm6iOg0U+wYGW99PVZjbn9WXzA4rOZScbVN8UPUYdR//dZ73fOtN4EdW6al?= =?us-ascii?Q?pltA5cTuUaU1GqPgDjzFpNh493N0BZNLjQZBNBLkGXOmkmOhxN5oKx6v8IXq?= =?us-ascii?Q?NKWkXsvY3ykSjrQgaQwdB99/3RfzpOL+WspZhik7rzz/zHv6p0QV9+KSn7tD?= =?us-ascii?Q?T7tEO7/Pl4l0zOycmibJkpqocwlYnxpasI0/VBh5llEY/87mSSMu8wnch4co?= =?us-ascii?Q?4+nU+q1hchr4BHkYx2R9FayeAqY7nErwHHD5B38jtCzFw4SRttlRmlKbmBA7?= =?us-ascii?Q?A8LCYRNr4w=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: e1b54bff-df29-4da1-0c55-08da3c6e2ae2 X-MS-Exchange-CrossTenant-originalarrivaltime: 23 May 2022 03:41:48.9404 (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: sVbsGKmnipAzPaiFKw50G8Wr+BPy1fHINW2v1bIZqMLDEebvmFzqv17EznVkyaxVNhx4DW8uE7pVKRCAlZauQw== 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 Hi Andy, > -----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 01/13] vdpa/ifc: add support for virtio blk device >=20 > Re-use the vdpa/ifc code, distinguish blk and net device by pci_device_id= . > Blk and net device are implemented with proper feature and ops. >=20 > Signed-off-by: Andy Pei > --- > drivers/vdpa/ifc/base/ifcvf.h | 16 +++++++- > drivers/vdpa/ifc/ifcvf_vdpa.c | 91 > +++++++++++++++++++++++++++++++++++++++---- > 2 files changed, 98 insertions(+), 9 deletions(-) >=20 > diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.= h > index 573a35f..483d38b 100644 > --- a/drivers/vdpa/ifc/base/ifcvf.h > +++ b/drivers/vdpa/ifc/base/ifcvf.h > @@ -5,8 +5,17 @@ > #ifndef _IFCVF_H_ > #define _IFCVF_H_ >=20 > +#include > #include "ifcvf_osdep.h" >=20 > +#define IFCVF_NET 0 > +#define IFCVF_BLK 1 > + > +/* for BLK */ > +#define IFCVF_BLK_TRANSITIONAL_DEVICE_ID 0x1001 > +#define IFCVF_BLK_MODERN_DEVICE_ID 0x1042 > +#define IFCVF_BLK_DEVICE_ID 0x0002 > + > #define IFCVF_VENDOR_ID 0x1AF4 > #define IFCVF_DEVICE_ID 0x1041 > #define IFCVF_SUBSYS_VENDOR_ID 0x8086 Let's rename IFCVF_DEVICE_ID to IFCVF_NET_DEVICE_ID as it's only used for n= et now. > @@ -126,13 +135,18 @@ struct ifcvf_hw { > u8 notify_region; > u32 notify_off_multiplier; > struct ifcvf_pci_common_cfg *common_cfg; > - struct ifcvf_net_config *dev_cfg; > + union { > + struct ifcvf_net_config *net_cfg; > + struct virtio_blk_config *blk_cfg; > + void *dev_cfg; > + }; > u8 *isr; > u16 *notify_base; > u16 *notify_addr[IFCVF_MAX_QUEUES * 2]; > u8 *lm_cfg; > struct vring_info vring[IFCVF_MAX_QUEUES * 2]; > u8 nr_vring; > + int device_type; > struct ifcvf_pci_mem_resource mem_resource[IFCVF_PCI_MAX_RESOURCE]; > }; >=20 > diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.= c > index 9f05595..be0efd3 100644 > --- a/drivers/vdpa/ifc/ifcvf_vdpa.c > +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c > @@ -75,6 +75,12 @@ struct internal_list { > struct ifcvf_internal *internal; > }; >=20 > +/* vdpa device info includes device features and devcic operation. */ > +struct rte_vdpa_dev_info { > + uint64_t features; > + struct rte_vdpa_dev_ops *ops; > +}; > + > TAILQ_HEAD(internal_list_head, internal_list); > static struct internal_list_head internal_list =3D > TAILQ_HEAD_INITIALIZER(internal_list); > @@ -1167,6 +1173,48 @@ struct internal_list { > return 0; > } >=20 > +static int16_t > +ifcvf_pci_get_device_type(struct rte_pci_device *pci_dev) > +{ > + uint16_t pci_device_id =3D pci_dev->id.device_id; > + uint16_t device_id; > + > + if (pci_device_id < 0x1000 || pci_device_id > 0x107f) { > + DRV_LOG(ERR, "Probe device is not a virtio device\n"); > + return -1; > + } > + > + if (pci_device_id < 0x1040) { > + /* Transitional devices: use the PCI subsystem device id as > + * virtio device id, same as legacy driver always did. > + */ > + device_id =3D pci_dev->id.subsystem_device_id; > + } else { > + /* Modern devices: simply use PCI device id, > + * but start from 0x1040. > + */ > + device_id =3D pci_device_id - 0x1040; > + } > + > + return device_id; > +} > + > +struct rte_vdpa_dev_info dev_info[] =3D { > + { > + .features =3D (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | > + (1ULL << VIRTIO_NET_F_CTRL_VQ) | > + (1ULL << VIRTIO_NET_F_STATUS) | > + (1ULL << VHOST_USER_F_PROTOCOL_FEATURES) | > + (1ULL << VHOST_F_LOG_ALL), > + .ops =3D &ifcvf_ops, Rename ifcvf_ops -> ifcvf_net_ops Overall the patch LGTM. With above fixed: Reviewed-by: Chenbo Xia > + }, > + { > + .features =3D (1ULL << VHOST_USER_F_PROTOCOL_FEATURES) | > + (1ULL << VHOST_F_LOG_ALL), > + .ops =3D NULL, > + }, > +}; > + > static int > ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, > struct rte_pci_device *pci_dev) > @@ -1178,6 +1226,7 @@ struct internal_list { > int sw_fallback_lm =3D 0; > struct rte_kvargs *kvlist =3D NULL; > int ret =3D 0; > + int16_t device_id; >=20 > if (rte_eal_process_type() !=3D RTE_PROC_PRIMARY) > return 0; > @@ -1227,13 +1276,24 @@ struct internal_list { > internal->configured =3D 0; > internal->max_queues =3D IFCVF_MAX_QUEUES; > features =3D ifcvf_get_features(&internal->hw); > - internal->features =3D (features & > - ~(1ULL << VIRTIO_F_IOMMU_PLATFORM)) | > - (1ULL << VIRTIO_NET_F_GUEST_ANNOUNCE) | > - (1ULL << VIRTIO_NET_F_CTRL_VQ) | > - (1ULL << VIRTIO_NET_F_STATUS) | > - (1ULL << VHOST_USER_F_PROTOCOL_FEATURES) | > - (1ULL << VHOST_F_LOG_ALL); > + > + device_id =3D ifcvf_pci_get_device_type(pci_dev); > + if (device_id < 0) { > + DRV_LOG(ERR, "failed to get device %s type", pci_dev->name); > + goto error; > + } > + > + if (device_id =3D=3D VIRTIO_ID_NET) { > + internal->hw.device_type =3D IFCVF_NET; > + internal->features =3D features & > + ~(1ULL << VIRTIO_F_IOMMU_PLATFORM); > + internal->features |=3D dev_info[IFCVF_NET].features; > + } else if (device_id =3D=3D VIRTIO_ID_BLOCK) { > + internal->hw.device_type =3D IFCVF_BLK; > + internal->features =3D features & > + ~(1ULL << VIRTIO_F_IOMMU_PLATFORM); > + internal->features |=3D dev_info[IFCVF_BLK].features; > + } >=20 > list->internal =3D internal; >=20 > @@ -1245,7 +1305,8 @@ struct internal_list { > } > internal->sw_lm =3D sw_fallback_lm; >=20 > - internal->vdev =3D rte_vdpa_register_device(&pci_dev->device, > &ifcvf_ops); > + internal->vdev =3D rte_vdpa_register_device(&pci_dev->device, > + dev_info[internal->hw.device_type].ops); > if (internal->vdev =3D=3D NULL) { > DRV_LOG(ERR, "failed to register device %s", pci_dev->name); > goto error; > @@ -1313,6 +1374,20 @@ struct internal_list { > .subsystem_device_id =3D IFCVF_SUBSYS_DEVICE_ID, > }, >=20 > + { .class_id =3D RTE_CLASS_ANY_ID, > + .vendor_id =3D IFCVF_VENDOR_ID, > + .device_id =3D IFCVF_BLK_TRANSITIONAL_DEVICE_ID, > + .subsystem_vendor_id =3D IFCVF_SUBSYS_VENDOR_ID, > + .subsystem_device_id =3D IFCVF_BLK_DEVICE_ID, > + }, > + > + { .class_id =3D RTE_CLASS_ANY_ID, > + .vendor_id =3D IFCVF_VENDOR_ID, > + .device_id =3D IFCVF_BLK_MODERN_DEVICE_ID, > + .subsystem_vendor_id =3D IFCVF_SUBSYS_VENDOR_ID, > + .subsystem_device_id =3D IFCVF_BLK_DEVICE_ID, > + }, > + > { .vendor_id =3D 0, /* sentinel */ > }, > }; > -- > 1.8.3.1