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 55AADA0093; Thu, 21 Apr 2022 11:19:35 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47758410E1; Thu, 21 Apr 2022 11:19:35 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 40C184067C for ; Thu, 21 Apr 2022 11:19:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650532773; x=1682068773; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=LyqYfbhgBgxW0QwEPfvOUA5ytb2f2GVyyY4Zy7eFbhA=; b=Jcbe7/t8zOo+AzAhQ/IvXnNs7sbSQqK9arCu/lnTKI0yXwW1tPagoS8I ZfkNckV1KJXiCBjQTr4oLfHdX0fZ2CTOBPzsbMdrSM+/o04FKekYQCahK /rtoY065HhcPpXceezXI2wD+7ezjCXkCVWyKjQI0xxweL18pdSFSFgInf vfNNBpPbdKUDoTAFBEezvUv9K+tHJlf4bg1zOXsAIZRFQfE8OucESj1ON im83JpMTuScwD6/Jz9dAnEWgF9HcsTCw1a5cndL1qfPnY4mM/XPKP/ulB 8tbzSNscer7yzMbS5vJrCNDLxIepOBcR7mtYaH8BuIgLdD9EjpVtFItXl w==; X-IronPort-AV: E=McAfee;i="6400,9594,10323"; a="324734783" X-IronPort-AV: E=Sophos;i="5.90,278,1643702400"; d="scan'208";a="324734783" 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:32 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.90,278,1643702400"; d="scan'208";a="593568133" Received: from dpdk-dipei.sh.intel.com ([10.67.110.238]) by orsmga001.jf.intel.com with ESMTP; 21 Apr 2022 02:19:30 -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 00/16] add virtio_blk device support to vdpa/ifc Date: Thu, 21 Apr 2022 16:33:38 +0800 Message-Id: <1650530034-59744-1-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1643093258-47258-2-git-send-email-andy.pei@intel.com> References: <1643093258-47258-2-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 This patch set add virtio_blk device support to vdpa/ifc driver. With a lot of similarities, I re-use part of vdpa/ifc driver. Distinguish the virtio net and blk device by device id, and implement specific features and ops. Add example to vdpa to support virtio_blk device. To support blk device live migration, some modification to vhost lib. Perform dev_conf op only under VHOST_USER_SET_VRING_CALL msg. v6: fix some commit log. add vhost socket in log output to make it more user-friendly. when driver ops fail, just output some log, do not break message handler. check vhost msg size in msg handler. v5: fix some coding style issues. v4: add args "isblk" to vdpa example to specify a block device, fix some issue in example. Make sure code specify for block device does not affect net device. v3: Fix some compile issues. v2: Fix some coding style issues. Andy Pei (16): vdpa/ifc: add support for virtio blk device vhost: add vDPA ops for blk device vhost: add vhost msg support vdpa/ifc: add blk ops for ifc device vdpa/ifc: add vDPA interrupt for blk device vdpa/ifc: add block device SW live-migration examples/vdpa: add vDPA blk support in example usertools: add support for virtio blk device vdpa/ifc: add set vring state for blk device vdpa/ifc: add some log at vDPA launch before qemu connect vdpa/ifc: read virtio max queues from hardware vdpa/ifc: add interrupt and handle for virtio blk vdpa/ifc: add is blk flag to ifcvf HW struct vdpa/ifc/base: access correct register for blk device vdpa/ifc: blk device pause without no inflight IO vhost: make sure each queue callfd is configured drivers/vdpa/ifc/base/ifcvf.c | 42 +++- drivers/vdpa/ifc/base/ifcvf.h | 29 ++- drivers/vdpa/ifc/ifcvf_vdpa.c | 521 ++++++++++++++++++++++++++++++++++++--- examples/vdpa/main.c | 61 ++++- examples/vdpa/vdpa_blk_compact.h | 72 ++++++ examples/vdpa/vhost_user.h | 169 +++++++++++++ lib/vhost/vdpa_driver.h | 8 +- lib/vhost/vhost_user.c | 83 +++++++ lib/vhost/vhost_user.h | 13 + usertools/dpdk-devbind.py | 8 + 10 files changed, 951 insertions(+), 55 deletions(-) create mode 100644 examples/vdpa/vdpa_blk_compact.h create mode 100644 examples/vdpa/vhost_user.h -- 1.8.3.1