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 F12F0A0093; Thu, 21 Apr 2022 11:20:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D73484067E; Thu, 21 Apr 2022 11:19:56 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id C1AB042816 for ; Thu, 21 Apr 2022 11:19:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650532795; x=1682068795; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=tGqQaGE7ujc+i727tdvptPKP7KnwFtXojfXJ77HgxoA=; b=N0peMfMJpEr7ldKpZH+DZY0QsXl5Lqs/MvACJWjqqppfhn6wJ731XqDd bqf9mqILlfEkDzDpp25FtzFW1y8iPmgv2QQosdAetMzi7nha7qCqU72so UuDozLR2E3J0i9qttfLNZKJxbUoUa3YD7ni5Zo+qS17pzHPM6oB2Ryn9n 1kp9CH2OAHvx8QvNyUR0sPMUJ8HGNiaYW1+4Hgsz8HdjrSDDTzlxxYnmy disjq9mhFkhV7EYMBwgkSpoYVW9NAOMh7C1A4LEHvgJbo46p9Dp5rWHpY CeeYkutpNeT/15fu8YQ4HFZCw/7XTdviaehxZfJSyZL3W3UYXy1Uo3Zpg w==; X-IronPort-AV: E=McAfee;i="6400,9594,10323"; a="324734838" X-IronPort-AV: E=Sophos;i="5.90,278,1643702400"; d="scan'208";a="324734838" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Apr 2022 02:19:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,278,1643702400"; d="scan'208";a="593568249" Received: from dpdk-dipei.sh.intel.com ([10.67.110.238]) by orsmga001.jf.intel.com with ESMTP; 21 Apr 2022 02:19:53 -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 v6 09/16] vdpa/ifc: add set vring state for blk device Date: Thu, 21 Apr 2022 16:33:47 +0800 Message-Id: <1650530034-59744-10-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1650530034-59744-1-git-send-email-andy.pei@intel.com> References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1650530034-59744-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 a23dc2d..28191e4 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -1368,6 +1368,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) { @@ -1385,7 +1395,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