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 87C86A00C4; Sat, 29 Jan 2022 04:10:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 51E6A42853; Sat, 29 Jan 2022 04:09:57 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id D45B3427DC for ; Sat, 29 Jan 2022 04:09:55 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643425796; x=1674961796; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=bYxWLeAm+dqMzQdYLg5yoMMhddqGA0gRNZ00kQeIZH0=; b=VSSG7QZwGmQUKAaGEJJ3edyMLdRlS2J9XPVOnBQSEf/YIxwGTX2oLbWB RnOQhT4bqFwnnb8wZL8PwTixyzn2Nm+V4zfMiK+2yVMvbHz5PP811m/NR 5oa881Xi3AhOK3w7A1Adh2/HLIjsMpocTfGgmGHSQbEYwZxcIR3Tb+/cX 3dTN3WmHaftr7fHoxFH814ksXHYLpPLk/VauBDFES/IAVFoDI1Z339ptQ yOhXkgFHCSHpFJgMclQp5SZ0QkcFc6owhaO1pmk3jdPBngin0nF2qbT4D 5MqteF4awLHDVIK59DTtADn+aWLXbMlLXd5jQGyKNdF3BfQUTUDy5/yV/ Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10241"; a="246076627" X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="246076627" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2022 19:09:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,325,1635231600"; d="scan'208";a="582047837" Received: from dpdk-dipei.sh.intel.com ([10.67.111.91]) by fmsmga008.fm.intel.com with ESMTP; 28 Jan 2022 19:09:53 -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 08/15] vdpa/ifc: set_vring_state op is mandatory, add set_vring_state for blk device Date: Sat, 29 Jan 2022 11:03:30 +0800 Message-Id: <1643425417-215270-9-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 Set_vring_state op is mandatory, add set_vring_state for blk device. Currently set_vring_state for blk device is not implemented. Signed-off-by: Andy Pei --- drivers/vdpa/ifc/ifcvf_vdpa.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c index a930825..24ae27b 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -1373,6 +1373,16 @@ struct rte_vdpa_dev_info { } static int +ifcvf_blk_set_vring_state(int vid, int vring, int state) +{ + RTE_SET_USED(vid); + RTE_SET_USED(vring); + RTE_SET_USED(state); + + return 0; +} + +static int ifcvf_blk_get_protocol_features(struct rte_vdpa_device *vdev, uint64_t *features) { @@ -1390,7 +1400,7 @@ struct rte_vdpa_dev_info { .get_protocol_features = ifcvf_blk_get_protocol_features, .dev_conf = ifcvf_dev_config, .dev_close = ifcvf_dev_close, - .set_vring_state = NULL, + .set_vring_state = ifcvf_blk_set_vring_state, .migration_done = NULL, .get_vfio_group_fd = ifcvf_get_vfio_group_fd, .get_vfio_device_fd = ifcvf_get_vfio_device_fd, -- 1.8.3.1