Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp58773ybg; Mon, 27 Jul 2020 23:22:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz0S/ulhMFreo+K/MlSoN6s4o1s6rUYgl5Scf8gKiUaQP9dLtKVIO253jyjWvIASffFH8Dg X-Received: by 2002:a17:906:430b:: with SMTP id j11mr15191400ejm.270.1595917349409; Mon, 27 Jul 2020 23:22:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595917349; cv=none; d=google.com; s=arc-20160816; b=IL/6biyM0YJiy7KSVIZLif0utWfV2AktzMzokLyoaRkt6xsh9hv9QAD88e2FJeJ5Ey dipQFtciTClYTK9x6tHFE+IgO60NT7myjyMlHgGJ+3enPZFmlMVvQb3MZd0bXQRJvDLp P7rOQYt/dDcFdIXSIquDJ+Dahy90AOuILwWEZ/OodiXLmZZp5ESD16ImcpQmIoH6b8Ko /6sxIbxcMbCLutAJYbpFYhJ1ehFKxWbYJIGjMo6WoUJwKuyRwujZynNzRdRjMRJJagja Th1CvsyrhJS5D9Ifa7dwqbKb+nT63cX6xFwqTU8Da/MGsBxXH/0jn9OQXZt9ci4m+VPu 53bw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=L19gJxjlvbSfxrLYXKkArq/ADh0RRhZZZKs2hhgA8nw=; b=dchw2hKczO6y3gJnJyIRkgT0Wg69Q8SJQl7yjzknru5cm8wXS+SwKcQWM5FjzXFugN 3THkkxdMbro9IqifeiSu2rKVUeI9sfqTSxYWL8cimG+jdB1XxcWeWyHAlmfnm2TGydHk naiEzyK4Ut2is6MotLY0hU2jZwPCLNqP54b1xIvy/oeCIsiwKnZsLgHiJCmXaRobLwUh 7byVXuIXTXQESE+jxuxiFBFQAW9BGLbwIa0g3w36H8P+s1sdbTj8Vn2GRrKMMrAq/glJ M78Gd/59phrbphm/Q8Y608eAoqTMu9/CCPzViVpxfk86bQU4ziMz7eo9+4jenumnQMHf ymwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RoJ6MBEz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u24si6163332edb.159.2020.07.27.23.22.07; Mon, 27 Jul 2020 23:22:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=RoJ6MBEz; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726942AbgG1GTB (ORCPT + 99 others); Tue, 28 Jul 2020 02:19:01 -0400 Received: from us-smtp-1.mimecast.com ([205.139.110.61]:44243 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726407AbgG1GTA (ORCPT ); Tue, 28 Jul 2020 02:19:00 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1595917138; 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=L19gJxjlvbSfxrLYXKkArq/ADh0RRhZZZKs2hhgA8nw=; b=RoJ6MBEzpiOhGtgVHb3ggiPedPw2gd418EBxxQlx5mp19dKs0Pz/7ghE1tv4cOeCFeK1Wz CUdxg7tlE3mqwPkjMzKhFPwe7YYp+4e1rwsrceyYuWNzEHinzo52PErl/Wznek+4AVSCzO 59t0WdSUitlGKejvqks2WGd85CbjtFE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-440-PcCkU7-kMquVvQ8GCS5I4Q-1; Tue, 28 Jul 2020 02:18:54 -0400 X-MC-Unique: PcCkU7-kMquVvQ8GCS5I4Q-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B765C106B251; Tue, 28 Jul 2020 06:18:34 +0000 (UTC) Received: from [10.72.13.242] (ovpn-13-242.pek2.redhat.com [10.72.13.242]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3ABCD69719; Tue, 28 Jul 2020 06:18:17 +0000 (UTC) Subject: Re: [PATCH V3 vhost next 00/10] VDPA support for Mellanox ConnectX devices To: Eli Cohen , mst@redhat.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Cc: shahafs@mellanox.com, saeedm@mellanox.com, parav@mellanox.com References: <20200728060539.4163-1-eli@mellanox.com> From: Jason Wang Message-ID: <1dbac14a-5909-ff0a-8e90-534847f93d50@redhat.com> Date: Tue, 28 Jul 2020 14:18:16 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200728060539.4163-1-eli@mellanox.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/7/28 下午2:05, Eli Cohen wrote: > Hi Michael, > please note that this series depends on mlx5 core device driver patches > in mlx5-next branch in > git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git. > > git pull git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git mlx5-next > > They also depend Jason Wang's patches submitted a couple of weeks ago. > > vdpa_sim: use the batching API > vhost-vdpa: support batch updating Just notice that a new version is posted[1] (you were cced). Talked with Michael, and it's better for you to merge the new version in this series. Sorry for not spotting this before. [1] https://lkml.org/lkml/2020/7/1/301 Thanks > > > The following series of patches provide VDPA support for Mellanox > devices. The supported devices are ConnectX6 DX and newer. > > Currently, only a network driver is implemented; future patches will > introduce a block device driver. iperf performance on a single queue is > around 12 Gbps. Future patches will introduce multi queue support. > > The files are organized in such a way that code that can be used by > different VDPA implementations will be placed in a common are resides in > drivers/vdpa/mlx5/core. > > Only virtual functions are currently supported. Also, certain firmware > capabilities must be set to enable the driver. Physical functions (PFs) > are skipped by the driver. > > To make use of the VDPA net driver, one must load mlx5_vdpa. In such > case, VFs will be operated by the VDPA driver. Although one can see a > regular instance of a network driver on the VF, the VDPA driver takes > precedence over the NIC driver, steering-wize. > > Currently, the device/interface infrastructure in mlx5_core is used to > probe drivers. Future patches will introduce virtbus as a means to > register devices and drivers and VDPA will be adapted to it. > > The mlx5 mode of operation required to support VDPA is switchdev mode. > Once can use Linux or OVS bridge to take care of layer 2 switching. > > In order to provide virtio networking to a guest, an updated version of > qemu is required. This version has been tested by the following quemu > version: > > url: https://github.com/jasowang/qemu.git > branch: vdpa > Commit ID: 6f4e59b807db > > > V2->V3 > Fix makefile to use include path relative to the root of the kernel > > Eli Cohen (7): > net/vdpa: Use struct for set/get vq state > vhost: Fix documentation > vdpa: Modify get_vq_state() to return error code > vdpa/mlx5: Add hardware descriptive header file > vdpa/mlx5: Add support library for mlx5 VDPA implementation > vdpa/mlx5: Add shared memory registration code > vdpa/mlx5: Add VDPA driver for supported mlx5 devices > > Jason Wang (2): > vhost-vdpa: support batch updating > vdpa_sim: use the batching API > > Max Gurtovoy (1): > vdpa: remove hard coded virtq num > > drivers/vdpa/Kconfig | 18 + > drivers/vdpa/Makefile | 1 + > drivers/vdpa/ifcvf/ifcvf_base.c | 4 +- > drivers/vdpa/ifcvf/ifcvf_base.h | 4 +- > drivers/vdpa/ifcvf/ifcvf_main.c | 13 +- > drivers/vdpa/mlx5/Makefile | 4 + > drivers/vdpa/mlx5/core/mlx5_vdpa.h | 91 ++ > drivers/vdpa/mlx5/core/mlx5_vdpa_ifc.h | 168 ++ > drivers/vdpa/mlx5/core/mr.c | 473 ++++++ > drivers/vdpa/mlx5/core/resources.c | 284 ++++ > drivers/vdpa/mlx5/net/main.c | 76 + > drivers/vdpa/mlx5/net/mlx5_vnet.c | 1950 ++++++++++++++++++++++++ > drivers/vdpa/mlx5/net/mlx5_vnet.h | 24 + > drivers/vdpa/vdpa.c | 3 + > drivers/vdpa/vdpa_sim/vdpa_sim.c | 35 +- > drivers/vhost/iotlb.c | 4 +- > drivers/vhost/vdpa.c | 46 +- > include/linux/vdpa.h | 24 +- > include/uapi/linux/vhost_types.h | 2 + > 19 files changed, 3165 insertions(+), 59 deletions(-) > create mode 100644 drivers/vdpa/mlx5/Makefile > create mode 100644 drivers/vdpa/mlx5/core/mlx5_vdpa.h > create mode 100644 drivers/vdpa/mlx5/core/mlx5_vdpa_ifc.h > create mode 100644 drivers/vdpa/mlx5/core/mr.c > create mode 100644 drivers/vdpa/mlx5/core/resources.c > create mode 100644 drivers/vdpa/mlx5/net/main.c > create mode 100644 drivers/vdpa/mlx5/net/mlx5_vnet.c > create mode 100644 drivers/vdpa/mlx5/net/mlx5_vnet.h >