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 2A116A04A9; Tue, 25 Jan 2022 07:53:09 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A422D411B6; Tue, 25 Jan 2022 07:53:08 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 179FE4013F for ; Tue, 25 Jan 2022 07:53:06 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643093587; x=1674629587; h=from:to:cc:subject:date:message-id; bh=6aW5Lv9M64WdV6lgXgeLDdYNiycoTgYXtaoyDMBB+YE=; b=FCV6z8lsIv+M5xRw51lrQpwPcCVDvG04xehpNu/JObZ0zp4b22t30Jao BEZKJ1++VmW3TE8inIQ7VBGSEBDHv+s5vAB4QVbzOxPC7Usjn13/IRQOk 4noh1UqJ3D0I4A7NwS3LxxsMea1FVot+QkuWptZWa3Elahukcv1h+wsPN enyfd4crvkcaVw4VBKUmSKBPHtXmhFJBddaT+Pm3nw5t4lkjKU8WkAcJf N1rFbNmpwB7TA34bbljjo3XOwUS+4BJjsigbAXB3aW/+a+UMb6gTDzlSs JpglNwRjKmEBOIiJgo8c3Pj/Kw4mCr43zRKun9PnCDg4Dt3dlTq6eUf3T Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10237"; a="243835235" X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="243835235" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jan 2022 22:53:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,314,1635231600"; d="scan'208";a="695724218" Received: from dpdk-dipei.sh.intel.com ([10.67.111.91]) by orsmga005.jf.intel.com with ESMTP; 24 Jan 2022 22:53:04 -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 00/15] add virtio_blk device support to vdpa/ifc Date: Tue, 25 Jan 2022 14:47:23 +0800 Message-Id: <1643093258-47258-1-git-send-email-andy.pei@intel.com> X-Mailer: git-send-email 1.8.3.1 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. Andy Pei (15): vdpa/ifc: add support for virtio blk device vhost: add vdpa ops for blk device vdpa/ifc: add blk ops for ifc device vdpa/ifc: add vdpa interrupt for blk device vdpa/ifc: add blk dev sw live migration example/vdpa:add vdpa blk support in example usertools: add support for virtio blk device vdpa/ifc: set_vring_state op is mandatory, add set_vring_state for blk device vdpa/ifc: add some log at VDPA lauch before qemu connect vdpa/ifc: read virtio max_queues from hardware vdpa: add config space change interrupt register and handle for virtio_blk vdpa/ifc: add is_blk flag to ifcvf_hw, and init is_blk during probe vdpa/ifc/base: for blk device, live migration register is different from net device vdpa/ifc: make sure hardware last_avail_idx and last_used_idx is the same when blk device pause 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 | 534 ++++++++++++++++++++++++++++++++++++--- examples/vdpa/Makefile | 2 +- examples/vdpa/main.c | 8 + examples/vdpa/meson.build | 1 + examples/vdpa/vdpa_blk_compact.c | 152 +++++++++++ examples/vdpa/vdpa_blk_compact.h | 118 +++++++++ examples/vdpa/vhost_user.h | 190 ++++++++++++++ lib/vhost/vdpa_driver.h | 8 +- lib/vhost/vhost_user.c | 15 ++ usertools/dpdk-devbind.py | 8 + 12 files changed, 1053 insertions(+), 54 deletions(-) create mode 100644 examples/vdpa/vdpa_blk_compact.c create mode 100644 examples/vdpa/vdpa_blk_compact.h create mode 100644 examples/vdpa/vhost_user.h -- 1.8.3.1