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 0B1F0A04A7; Tue, 25 Jan 2022 10:42:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7675D42889; Tue, 25 Jan 2022 10:42:46 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id C306242869 for ; Tue, 25 Jan 2022 10:42:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643103765; x=1674639765; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=8QP2LyrrdZj62eIBJqZfLk3qWwIGPSMqMJr/mc509yA=; b=A49QGqkwfUhiyBH4LQ5g9gVV42jEwadF7ykBZkMqO33tpOFVYr13zept fT9zpPZhgsy4C5q+4SJBxqinsGPtInZ94ynNBNP7OVK2B4j2zrwFL0KkU I8K/iI7r/lFOHDp9uVagg3urlQkK25hQq2QvD2wwq1qagLQMbxb+Nl1E6 akExvLpF5QDfQF1BT3PAFroOn3CziYiq9cO1k9nDfagfnSRekm1D1EKhL 8gV0kSBoB2hcP5DOQh71p311mZDef+LBcSZdfZyBVq63lFO9R/F+FE9XG +EesIDdBZbimW4z9o5U88CIyo+rSyhA2FLQBtfbipJgZSe9ow6TR7ekeq g==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="229840357" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="229840357" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jan 2022 01:42:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="534656723" Received: from dpdk-dipei.sh.intel.com ([10.67.111.91]) by orsmga008.jf.intel.com with ESMTP; 25 Jan 2022 01:42:44 -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 v2 02/15] vhost: add vdpa ops for blk device Date: Tue, 25 Jan 2022 17:37:04 +0800 Message-Id: <1643103437-118618-3-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1643103437-118618-1-git-send-email-andy.pei@intel.com> References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1643103437-118618-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