From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5981FC64E7B for ; Wed, 2 Dec 2020 13:35:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0D5402075A for ; Wed, 2 Dec 2020 13:35:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729910AbgLBNe4 (ORCPT ); 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