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 1D0A3A0548; Wed, 1 Jun 2022 12:10:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DF1740689; Wed, 1 Jun 2022 12:10:39 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 0394E4003F for ; Wed, 1 Jun 2022 12:10:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1654078236; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=d8/DBg4RQa13LFPyGgVE2d9y0sfBwvDFewWJScj3pYM=; b=hutqbuSxbNppGrdATr0PI58GdLN16ydxoxkQM2qrmB/p8Jnhqky9jS3MrLev5Yr7+hr0ZN WmpzGQl4cCjet42eot9esHTNyflclYGoFAA1hLcq4yi3W4Q6GygLysIEbhU0fQ6fLD7Jdz ZUz8aWk2Ohx0uM/J0VBZlzhceoWvtPk= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-422-vdUiwaJePz6cNCXyLiRBhQ-1; Wed, 01 Jun 2022 06:10:33 -0400 X-MC-Unique: vdUiwaJePz6cNCXyLiRBhQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 0EA8E101A54E; Wed, 1 Jun 2022 10:10:33 +0000 (UTC) Received: from [10.39.208.26] (unknown [10.39.208.26]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A61C71121315; Wed, 1 Jun 2022 10:10:31 +0000 (UTC) Message-ID: <28bbf7b4-bf4f-67b4-f0fc-e17d6ae0f8e7@redhat.com> Date: Wed, 1 Jun 2022 12:10:30 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.0 Subject: Re: [PATCH v10 00/13] add virtio_blk device support to vdpa/ifc To: Andy Pei , dev@dpdk.org Cc: chenbo.xia@intel.com, gang.cao@intel.com, changpeng.liu@intel.com, rosen.xu@intel.com, qimaix.xiao@intel.com References: <1643093258-47258-2-git-send-email-andy.pei@intel.com> <1653360497-18080-1-git-send-email-andy.pei@intel.com> From: Maxime Coquelin In-Reply-To: <1653360497-18080-1-git-send-email-andy.pei@intel.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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 On 5/24/22 04:48, Andy Pei wrote: > 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. > > > v10: > fix typo. > add more NULL pointer check. > fix a error handler. > > v9: > fix some naming issue. > add more NULL pointer check. > close open file when errors occur. > > v8: > delete some redundant code. > fix some commit log. > > v7: > Check on expected fd num in new vhost msg handler. > Sanity check on vhost msg size. > Fix typo. > Add commit log to help understand code. > Remove duplicated code. > Add new API to get vDPA device type. > > 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 (13): > vdpa/ifc: add support for virtio blk device > vhost: add vDPA ops for blk device > vhost: add vhost msg support for get/set config > vdpa/ifc: add blk ops for ifc device > vdpa/ifc: add vDPA interrupt relay for blk device > vdpa/ifc: add block device SW live-migration > vhost: add API to get vDPA device type > vdpa/ifc: add get device type ops to ifc driver > examples/vdpa: add virtio blk support > usertools: add support for virtio blk device > vdpa/ifc: add log for config space of virtio blk > vdpa/ifc: add interrupt handling for config space > vdpa/ifc/base: access correct register for blk device > > doc/guides/prog_guide/vhost_lib.rst | 5 + > doc/guides/rel_notes/release_22_07.rst | 4 + > drivers/vdpa/ifc/base/ifcvf.c | 34 ++- > drivers/vdpa/ifc/base/ifcvf.h | 27 ++- > drivers/vdpa/ifc/ifcvf_vdpa.c | 420 +++++++++++++++++++++++++++++++-- > examples/vdpa/main.c | 56 +++++ > examples/vdpa/vdpa_blk_compact.h | 50 ++++ > lib/vhost/rte_vhost.h | 17 ++ > lib/vhost/socket.c | 44 ++++ > lib/vhost/vdpa_driver.h | 11 +- > lib/vhost/version.map | 1 + > lib/vhost/vhost_user.c | 85 +++++++ > lib/vhost/vhost_user.h | 13 + > usertools/dpdk-devbind.py | 5 +- > 14 files changed, 741 insertions(+), 31 deletions(-) > create mode 100644 examples/vdpa/vdpa_blk_compact.h > Applied to dpdk-next-virtio/main. Thanks, Maxime