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 AF379A00C4; Sat, 29 Jan 2022 04:09:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C821D42797; Sat, 29 Jan 2022 04:09:39 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 5EA2740143 for ; Sat, 29 Jan 2022 04:09:36 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643425776; x=1674961776; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=8QP2LyrrdZj62eIBJqZfLk3qWwIGPSMqMJr/mc509yA=; b=lZIOeFADVrqYLzH7vrZB8BrOaJQYJR7CgbRnvGFFvGs3eCWp4c9W/eKQ PWeH5TbPyiLtRAKAqrGrgYHkiwkP/8GRPvnd5uSG7x5l/v3936UU+Um4R 7X6MjOrOBoc7aUrDyxR76tziz4t/KPu+ovmMCAj//0JBNjRlArLjBfm1u l1G1/gaZ3srJCjvLNzi+0uDb6t5dhvG6bKtq2yyeZqRo/VrmW6RmCsOYZ BgoJ+C9+6AMjGwE2i5Pc9mbARyyJKC2WqrrRtr83eMKsR3VuTYvgL2L4x Taf6cISLUNL52TD0fXe7jRx0o851GiRjuQMM4L1J1Xenf39gIdTU/KZ0y A==; X-IronPort-AV: E=McAfee;i="6200,9189,10241"; a="271699051" X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="271699051" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 19:09:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="582047764" Received: from dpdk-dipei.sh.intel.com ([10.67.111.91]) by fmsmga008.fm.intel.com with ESMTP; 28 Jan 2022 19:09:34 -0800 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 v3 02/15] vhost: add vdpa ops for blk device Date: Sat, 29 Jan 2022 11:03:24 +0800 Message-Id: <1643425417-215270-3-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1643425417-215270-1-git-send-email-andy.pei@intel.com> References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1643425417-215270-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 Get_config and set_config are necessary ops for blk device. Add get_config and set_config ops to vdpa ops. Signed-off-by: Andy Pei --- lib/vhost/vdpa_driver.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/vhost/vdpa_driver.h b/lib/vhost/vdpa_driver.h index fc2d6ac..9a23db9 100644 --- a/lib/vhost/vdpa_driver.h +++ b/lib/vhost/vdpa_driver.h @@ -65,8 +65,12 @@ struct rte_vdpa_dev_ops { /** Reset statistics of the queue */ int (*reset_stats)(struct rte_vdpa_device *dev, int qid); - /** Reserved for future extension */ - void *reserved[2]; + /** Get the device configuration space */ + int (*get_config)(int vid, uint8_t *config, uint32_t len); + + /** Set the device configuration space */ + int (*set_config)(int vid, uint8_t *config, uint32_t offset, + uint32_t size, uint32_t flags); }; /** -- 1.8.3.1