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 29681A0507; Wed, 27 Apr 2022 11:17:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ECB9F4281A; Wed, 27 Apr 2022 11:16:52 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 60E5F42803 for ; Wed, 27 Apr 2022 11:16:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651051008; x=1682587008; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=c+t775mbY3VJIc948L5SIbpJ2hBbs/9fOuwGRCIZ/d4=; b=GXF/jZEGXo4wQeNlfi9RkmYNBAHOsl6FLU1fXA4WytnCE6IanBHXcks0 7nU/PVg804QdDd4FhtQZnimqlaHr6oEzUpuRIT5eSRtLyKKrP8KzbsySH yhG2ZrJ0Vj4aT9wsiZosBAw092cOUiV+OUoqqTTzB0W7inXC1aOm7C/Ur 1O2ctYaxe3pW2GRYhqS71+chj4SX/LLQJKtvT8cKtdL4EjcsjxBepzNqL fAEqkDqXkWZFQQlAgc2lKpxaWobia8IR993sPzoObwKJ4IWLQDpr7QV4E Y8WUzZ8Xvmot9al1sEQPSw+3Ou7cMQKXaxhd1OCZ4nTAqBzqF+1aVeYcA g==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="352308296" X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="352308296" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Apr 2022 02:16:38 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="580488725" Received: from dpdk-dipei.sh.intel.com ([10.67.110.238]) by orsmga008.jf.intel.com with ESMTP; 27 Apr 2022 02:16:36 -0700 From: Andy Pei To: dev@dpdk.org Cc: chenbo.xia@intel.com, maxime.coquelin@redhat.com, gang.cao@intel.com, changpeng.liu@intel.com Subject: [PATCH v7 08/18] vdpa/ifc: add get device type ops to ifc driver Date: Wed, 27 Apr 2022 16:29:56 +0800 Message-Id: <1651048206-282372-9-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1651048206-282372-1-git-send-email-andy.pei@intel.com> References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1651048206-282372-1-git-send-email-andy.pei@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 Add get device type ops to ifc driver. Signed-off-by: Andy Pei --- drivers/vdpa/ifc/ifcvf_vdpa.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c index 8a260b7..99a6ab0 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -1300,6 +1300,15 @@ struct rte_vdpa_dev_info { return 0; } +static int +ifcvf_blk_get_device_type(struct rte_vdpa_device *vdev, + uint32_t *type) +{ + RTE_SET_USED(vdev); + *type = VDPA_DEVICE_TYPE_BLK; + return 0; +} + static struct rte_vdpa_dev_ops ifcvf_blk_ops = { .get_queue_num = ifcvf_get_queue_num, .get_features = ifcvf_get_vdpa_features, @@ -1313,6 +1322,7 @@ struct rte_vdpa_dev_info { .get_vfio_device_fd = ifcvf_get_vfio_device_fd, .get_notify_area = ifcvf_get_notify_area, .get_config = ifcvf_blk_get_config, + .get_dev_type = ifcvf_blk_get_device_type, }; struct rte_vdpa_dev_info dev_info[] = { -- 1.8.3.1