Received: by 10.192.165.148 with SMTP id m20csp351009imm; Thu, 26 Apr 2018 23:20:06 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKooPSX86babPDXd6swoQyqgwvbe1mFyE9+UC3PRTpyHHX2Tbiabs0l3OvehNe2iIUGEP3 X-Received: by 2002:a17:902:bd03:: with SMTP id p3-v6mr1115125pls.236.1524810006565; Thu, 26 Apr 2018 23:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524810006; cv=none; d=google.com; s=arc-20160816; b=SVgQmHf1Fd/euAgSx0+xUU6OVcs2PS73HK1WbtvJTohNV6NgxO1OFTKuJKtsSI/59x 6BTjt+wMAx1KSW3bqh7AjtsuRidAElXvpXeZ62NY7Z/5W6GlgI1Y4QVVjATjT9qlP0cv kXaTs1rc5wnjjgP6ddWuNTn83tEleXhGVEFHR99Q2AzJokRteMSbuIwDDLw1adGp4L7/ dqrXMm1eBjPQpJ2rJuTYyZES5+QavrGHJ1+cpbh8OJ/HqiGdON9oXXqsYJ3JM7WwaV3x R2wyj42BgpSXiHykoIoB16BOWiQP4hrT4ZI3Elc/5/6fRhtgAO8zv1TQN6bzdzTjZWZT KCSA== 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:arc-authentication-results; bh=sKaMeHsD79MhYwgS5BOHm8tSiifaRL6uYnU+j+FDEuQ=; b=r/gX4D14lFLrnnvElGhLy0fSFVL3SOzOocc8ExXcwbw67VAGUp1yVRLpUf2qnSHRYu jiCXGpr5HzwXeRSRQD+zweIK3dI003uUZn7NIXPtzbdgkjcwK/XKJkw5c6kbc+8AOys6 Qaw+4H162xVMqHl5j7UnMzbLH/99TL/3ajDISaGUKBwY6gtdVqkveOSAjQ0RUt5/4Us0 8dmM0fmYrYhJGbw5+OaJloHYeahYjtymap37Ovy8u4YKddzM4Z7Yhw+X+TvMsohcHNwf AxQGE4DFgdLXVA0iXQTqI09UnNn4/6CZx/PFEqIlki2QUfHLl++nF666hhvhio+PytmD 4LYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h8-v6si664465pln.54.2018.04.26.23.19.51; Thu, 26 Apr 2018 23:20:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757402AbeD0GSE (ORCPT + 99 others); Fri, 27 Apr 2018 02:18:04 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43994 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757286AbeD0GSD (ORCPT ); Fri, 27 Apr 2018 02:18:03 -0400 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 mx1.redhat.com (Postfix) with ESMTPS id 9B702EB71C; Fri, 27 Apr 2018 06:18:02 +0000 (UTC) Received: from [10.72.12.41] (ovpn-12-41.pek2.redhat.com [10.72.12.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 454D3112C247; Fri, 27 Apr 2018 06:17:54 +0000 (UTC) Subject: Re: [RFC v3 0/5] virtio: support packed ring To: "Michael S. Tsirkin" Cc: Tiwei Bie , virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, wexu@redhat.com, jfreimann@redhat.com References: <20180425051550.24342-1-tiwei.bie@intel.com> <5ad1ca01-1e5c-7105-f303-7e8d42f6a068@redhat.com> <20180427071725-mutt-send-email-mst@kernel.org> From: Jason Wang Message-ID: <5c712aa2-f00e-b472-cdfc-48175aea790d@redhat.com> Date: Fri, 27 Apr 2018 14:17:51 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180427071725-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.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 27 Apr 2018 06:18:02 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 27 Apr 2018 06:18:02 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jasowang@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018年04月27日 12:18, Michael S. Tsirkin wrote: > On Fri, Apr 27, 2018 at 11:56:05AM +0800, Jason Wang wrote: >> On 2018年04月25日 13:15, Tiwei Bie wrote: >>> Hello everyone, >>> >>> This RFC implements packed ring support in virtio driver. >>> >>> Some simple functional tests have been done with Jason's >>> packed ring implementation in vhost: >>> >>> https://lkml.org/lkml/2018/4/23/12 >>> >>> Both of ping and netperf worked as expected (with EVENT_IDX >>> disabled). But there are below known issues: >>> >>> 1. Reloading the guest driver will break the Tx/Rx; >> Will have a look at this issue. >> >>> 2. Zeroing the flags when detaching a used desc will >>> break the guest -> host path. >> I still think zeroing flags is unnecessary or even a bug. At host, I track >> last observed avail wrap counter and detect avail like (what is suggested in >> the example code in the spec): >> >> static bool desc_is_avail(struct vhost_virtqueue *vq, __virtio16 flags) >> { >>        bool avail = flags & cpu_to_vhost16(vq, DESC_AVAIL); >> >>        return avail == vq->avail_wrap_counter; >> } >> >> So zeroing wrap can not work with this obviously. >> >> Thanks > I agree. I think what one should do is flip the available bit. > But is this flipping a must? Thanks