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 8A5DEA0093; Thu, 21 Apr 2022 11:20:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A3AE642821; Thu, 21 Apr 2022 11:20:07 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id B7470427FC for ; Thu, 21 Apr 2022 11:20:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650532806; x=1682068806; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=eaQlMgjF+aDec9c8mZzgZ9FO7eS3pQbzaaX8JgqYPuQ=; b=fWJRMEGN5nSJl3Mk20wwRquCSMFE+7c/lMNG6fXjeJlRSPl6zSSbS8Gk 9P7/3nXvgXTTJ5l+Su2iTsQxCXyFwoVp9GZnDJTFURlO1mCmPpU3UCF02 qfE6cpfdZL1bwandq+Zmo5CE1NfNFY02kOljQ1Fnv9s37Co5hem6iCaNx 6P8E+1d2sETx9IcXpZEF94WDJclkhbMLB1bxCKzFjIiYDAA9NWu4fx51j dBhzJa9rO/35peblBTOaZ1wdo3dzahvhsAFb/KFa/nk/bkHlYp2AgMqo7 de6ELjody8f4JsGlG1z26t3MH36hlyrOT4ps5UmtnJXN3+dzfSkOeT6su Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10323"; a="324734884" X-IronPort-AV: E=Sophos;i="5.90,278,1643702400"; d="scan'208";a="324734884" 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:20:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,278,1643702400"; d="scan'208";a="593568322" Received: from dpdk-dipei.sh.intel.com ([10.67.110.238]) by orsmga001.jf.intel.com with ESMTP; 21 Apr 2022 02:20:03 -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 13/16] vdpa/ifc: add is blk flag to ifcvf HW struct Date: Thu, 21 Apr 2022 16:33:51 +0800 Message-Id: <1650530034-59744-14-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 Add is_blk flag to ifcvf_hw, and init is_blk during probe. Signed-off-by: Andy Pei --- drivers/vdpa/ifc/base/ifcvf.h | 1 + drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/vdpa/ifc/base/ifcvf.h b/drivers/vdpa/ifc/base/ifcvf.h index 6dd7925..8e602af 100644 --- a/drivers/vdpa/ifc/base/ifcvf.h +++ b/drivers/vdpa/ifc/base/ifcvf.h @@ -149,6 +149,7 @@ struct ifcvf_hw { u8 *lm_cfg; struct vring_info vring[IFCVF_MAX_QUEUES * 2]; u8 nr_vring; + u8 is_blk; struct ifcvf_pci_mem_resource mem_resource[IFCVF_PCI_MAX_RESOURCE]; }; diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c index c02ae4d..f54beaf 100644 --- a/drivers/vdpa/ifc/ifcvf_vdpa.c +++ b/drivers/vdpa/ifc/ifcvf_vdpa.c @@ -1604,11 +1604,13 @@ struct rte_vdpa_dev_info dev_info[] = { if (device_id == VIRTIO_ID_NET) { internal->device_type = IFCVF_NET; + internal->hw.is_blk = IFCVF_NET; internal->features = features & ~(1ULL << VIRTIO_F_IOMMU_PLATFORM); internal->features |= dev_info[IFCVF_NET].features; } else if (device_id == VIRTIO_ID_BLOCK) { internal->device_type = IFCVF_BLK; + internal->hw.is_blk = IFCVF_BLK; internal->features = features & ~(1ULL << VIRTIO_F_IOMMU_PLATFORM); internal->features |= dev_info[IFCVF_BLK].features; -- 1.8.3.1