Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp868199pxu; Wed, 2 Dec 2020 05:37:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJyEZWYhQW2tBnf5qgdzDKpWuIwTDZQX6hGyK2knCjp09UUDGeWH1nV/O6xssU8zjnILytJW X-Received: by 2002:a50:fd18:: with SMTP id i24mr2647576eds.146.1606916246157; Wed, 02 Dec 2020 05:37:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606916246; cv=none; d=google.com; s=arc-20160816; b=EjsMIbNQ+UZfF++VraKV6TKkgzlnttkEUSO6uy8g9NcacWKe63xgW6bbpmpW+0xBtC KW+FsEAZ3VtEKLgUb2HcUPxt79fQ9+lFowohs4B1huYpxMRZbcb7FoV8s/JldJjQOFIm H9rr+QCF/uFdH8O9qxizjBd4ENivPUThC27QcA9JyL51cfVLCNCst5fwiP72uwC0G1dx zJd2BwHRyFSgQt7GdvlX/RgmlV8klOhkVdeLO+teKxUx83S0vI/DDGLxvaAyCA9W/CFH +iN0kaAMCnGSydVFnqZ/7uRRZHn2a3Is5Ot9Y7CxBF6cyIiaTapYCRuUGuIXBF1mwrtY nS4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=gSBZVtHBrrEzEt57aw8UlqExfUejtXmcX5D0rAUeWo8=; b=ymCd2v1Gr2pPy7XfiSGgevl78BuU9IN0PqRdSwiopXKqJDGuRtEFr9VvyevepjErYG 9TzN9Y8LalqEZdsGyNnsHp307oEJtsjWMUvmz+fdU54ctD7nPNJbDGLyBJUHjmDNo3XS W18vhSI/ykOaeWtPKbiTIqNvWo0XZB242NE91sDPCHLp7ESpXg/zthBQHZLeXKI2rV16 guXf3V/yTtIcOfY7cKcOpQczgI64XdFV9q3C92nz4rOmKAQAdoiGFcNlzlKV2saAAx7F CFiQf/DW4R4XNSIkZcn6KWB4n3TzcBJ1kORSGcoh7Q1ltpqaR7CWE4MTba/i2ZtIljGp F8gQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=h6r47Fou; 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 i8si557159ejb.632.2020.12.02.05.37.02; Wed, 02 Dec 2020 05:37:26 -0800 (PST) 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=h6r47Fou; 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 S1729848AbgLBNe4 (ORCPT + 99 others); Wed, 2 Dec 2020 08:34:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:38861 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725965AbgLBNe4 (ORCPT ); Wed, 2 Dec 2020 08:34:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606916010; 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=gSBZVtHBrrEzEt57aw8UlqExfUejtXmcX5D0rAUeWo8=; b=h6r47FoupNLG3b98qs216wD5PcypOn+2a/ecXMRQJQ3GDfFN/oasn5YqG27CSi6znQYkV9 sw8cUPGakGqwR9xV/XnSz5ZzKYK0Ckbse8M3RIleVRdkyW+fXBuFYEBchO5pL+dEZWdRSn dlqckOt+7OB7OsmZKQtAQRyq+Hujtr8= 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-402-DL4pFo6gMe2-cWFTzMw1cw-1; Wed, 02 Dec 2020 08:33:27 -0500 X-MC-Unique: DL4pFo6gMe2-cWFTzMw1cw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 97E3F18C89E3; Wed, 2 Dec 2020 13:33:26 +0000 (UTC) Received: from [10.72.12.105] (ovpn-12-105.pek2.redhat.com [10.72.12.105]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85B4E5D9C6; Wed, 2 Dec 2020 13:33:21 +0000 (UTC) Subject: Re: [PATCH] vdpa/mlx5: Use random MAC for the vdpa net instance To: "Michael S. Tsirkin" Cc: Eli Cohen , Cindy Lu , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org References: <20201130043050-mutt-send-email-mst@kernel.org> <20201130103142-mutt-send-email-mst@kernel.org> <20201202055714.GA224423@mtl-vdi-166.wap.labs.mlnx> <20201202041518-mutt-send-email-mst@kernel.org> <20201202121241.GA228811@mtl-vdi-166.wap.labs.mlnx> <20201202071414-mutt-send-email-mst@kernel.org> <13d33e2c-ea99-6625-83fd-6cb223dd103b@redhat.com> <20201202080533-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: Date: Wed, 2 Dec 2020 21:33:19 +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: <20201202080533-mutt-send-email-mst@kernel.org> 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.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020/12/2 下午9:07, Michael S. Tsirkin wrote: >>>> Two questions here: >>>> 1. Now we don't have support for control virtqueue. Yet, we must filter >>>> packets based on MAC, what do you suggest to do here? >>> How about an ioctl to pass the mac to the device? >>> Maybe mirroring the control vq struct format ... >> I think we'd better avoid such ad-hoc ioctls to make vhost-vDPA type >> independent. > Fundamentally this is about handling some VQs in QEMU, right? > Maybe a generic ioctl along the lines of "CTRL_VQ" passing > vq number and a command buffer from guest? > Seems generic enough for you? > It looks to me you want to invent a synchronized API (or vDPA config ops) for submitting virtio descriptors. Several issues I can think for this: 1) control vq allows the request to be handled asynchronously 2) we still need a way to isolate the DMA if there's a hardware virtqueue for the device that use DMA 3) new vDPA config operations need to be invented, new uAPI for vhost-vDPA, new virtio config ops for virtio-vDPA It looks to me we can overcome 1) and 2) if we just stick to a virtqueue interface in vhost-vDPA as I proposed in [1]. For issue 3) it also requires much less work. Thanks [1] https://lkml.org/lkml/2020/9/23/1243