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=-9.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,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 94E07C2B9F4 for ; Mon, 28 Jun 2021 04:40:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6EA98619AD for ; Mon, 28 Jun 2021 04:40:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232042AbhF1Emx (ORCPT ); Mon, 28 Jun 2021 00:42:53 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:47039 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229578AbhF1Emw (ORCPT ); Mon, 28 Jun 2021 00:42:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1624855227; 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=AHA+LCiynBinIcwBex84PZFjkFyKiA5ldfw47X4q5zo=; b=XEmpiDo0AGOPA8jMZyl0Pxe8y6IEpHAzegq/jALcVN4tqeidsHKJgXqK7GmYbeYDpZGR0a DekUa1GgA4AImOtWhtdcysWpKzCyKY7hARoEuiuk5y8k+no66nT6gPwMRdG/rXngA+j+xj ZWZ14iv+68EEarUOHhoLg8e+MhwR2yw= Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-40-1j9JrJ3bMCCamFF4Bc9W0Q-1; Mon, 28 Jun 2021 00:40:24 -0400 X-MC-Unique: 1j9JrJ3bMCCamFF4Bc9W0Q-1 Received: by mail-pf1-f198.google.com with SMTP id f65-20020a6251440000b02902fe9dc6c80aso8601655pfb.2 for ; Sun, 27 Jun 2021 21:40:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=AHA+LCiynBinIcwBex84PZFjkFyKiA5ldfw47X4q5zo=; b=r0x7uzDwm/wSTuQ5pzANbJb89r/blsbsl9+WAN1gz8QCdcf4NfALWzkTHzki/snokG b5sy92/sadIuUaFa1A75zRJih0mCxskktXkHJ8A1kCX+9dG2i0U/Y8d06YkigkTsLdp2 Rlwab0oLu6w170mL8ViivjhwuyOD0I03HA3E35YqgDwu2P/1xqW5TPEPL0FH3tKdryD2 dWBOZ1BAIO+KKQSq6vtC+kC1c3O+cSEOo2nLy2lbqm+tC4bsn3iM5TzuWTfI+03LTmq4 kpCwpjwZ6iyq9ZIhIOJyvfI+m0EiWBR4PCrCZ1s/+b01lQhHTXCaSwuqPQDAbXuNro4w XyOQ== X-Gm-Message-State: AOAM531ndR4TdErQCvxAwOcPwMHUL3w/5QbgnV2TN/1WKDL5kdzi6lQa EQcMbZ6qRi1luBf2w1pklEhdzklu3EXRnaX7MTPUb814HJj8/tessxXXO+XpfK1CGwZ7fAQj7TI 3A0G5u4n8TvVRxJKb X-Received: by 2002:a17:90a:73ca:: with SMTP id n10mr35061275pjk.16.1624855223791; Sun, 27 Jun 2021 21:40:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwo0o1s5KBYLlDLTqUhWl2FmmtFdw3BbxmCq5oGFB7ob0lz6rjRGdc+HVA7kjdSm4QccHUIRQ== X-Received: by 2002:a17:90a:73ca:: with SMTP id n10mr35061255pjk.16.1624855223625; Sun, 27 Jun 2021 21:40:23 -0700 (PDT) Received: from wangxiaodeMacBook-Air.local ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id x143sm12654203pfc.6.2021.06.27.21.40.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 27 Jun 2021 21:40:23 -0700 (PDT) Subject: Re: [PATCH v8 09/10] vduse: Introduce VDUSE - vDPA Device in Userspace To: Yongji Xie Cc: "Michael S. Tsirkin" , Stefan Hajnoczi , Stefano Garzarella , Parav Pandit , Christoph Hellwig , Christian Brauner , Randy Dunlap , Matthew Wilcox , Al Viro , Jens Axboe , bcrl@kvack.org, Jonathan Corbet , =?UTF-8?Q?Mika_Penttil=c3=a4?= , Dan Carpenter , joro@8bytes.org, Greg KH , songmuchun@bytedance.com, virtualization , netdev@vger.kernel.org, kvm , linux-fsdevel@vger.kernel.org, iommu@lists.linux-foundation.org, linux-kernel References: <20210615141331.407-1-xieyongji@bytedance.com> <20210615141331.407-10-xieyongji@bytedance.com> <1bba439f-ffc8-c20e-e8a4-ac73e890c592@redhat.com> <0aeb7cb7-58e5-1a95-d830-68edd7e8ec2e@redhat.com> <48cab125-093b-2299-ff9c-3de8c7c5ed3d@redhat.com> From: Jason Wang Message-ID: Date: Mon, 28 Jun 2021 12:40:14 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org 在 2021/6/25 下午12:19, Yongji Xie 写道: >> 2b) for set_status(): simply relay the message to userspace, reply is no >> needed. Userspace will use a command to update the status when the >> datapath is stop. The the status could be fetched via get_stats(). >> >> 2b looks more spec complaint. >> > Looks good to me. And I think we can use the reply of the message to > update the status instead of introducing a new command. > Just notice this part in virtio_finalize_features():         virtio_add_status(dev, VIRTIO_CONFIG_S_FEATURES_OK);         status = dev->config->get_status(dev);         if (!(status & VIRTIO_CONFIG_S_FEATURES_OK)) { So we no reply doesn't work for FEATURES_OK. So my understanding is: 1) We must not use noreply for set_status() 2) We can use noreply for get_status(), but it requires a new ioctl to update the status. So it looks to me we need synchronize for both get_status() and set_status(). Thanks