From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wg0-f43.google.com (mail-wg0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 7DA5E5AA0 for ; Wed, 10 Jun 2015 10:30:01 +0200 (CEST) Received: by wgbgq6 with SMTP id gq6so29898471wgb.3 for ; Wed, 10 Jun 2015 01:30:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=oFqAN/jENSFtnlEqRoQ4eZLL05Ju/DTcCtT2nvW0PPc=; b=gfPjWfJ1WsKbqzdhYvpvfcyhwU1mDMAGJKB0OXM+q3UPiVK0AUlV1dTLqJIZKRj+Rt BZxktEA5u7Z4+1zubvmeRvWZYYAhtcb7FJdrlOgcqGF9TsT23JJGlOzi+wpa1swNIIg8 JsTHwrZWdXcN5RjPN0biAB09NuuMcVr1MNS1vh9psWjfiJTZZ89tYbJcpFQ6+XCO5h+X 0QGndztMPPENQ2+IMzbTD0Y2FgaQCSf7oRY2UbCNe5/K4aWGPN8DlFBv/ny2IeNvTv9B pvu3JnaEA2UO241KkDVkLCTimuuPnsHFg6f4o5XbHAj21qAeE8CwmB3i1VSvH3lAgAoV pa4w== MIME-Version: 1.0 X-Received: by 10.180.105.74 with SMTP id gk10mr16673966wib.29.1433925001358; Wed, 10 Jun 2015 01:30:01 -0700 (PDT) Sender: lukego@gmail.com Received: by 10.27.134.198 with HTTP; Wed, 10 Jun 2015 01:30:01 -0700 (PDT) In-Reply-To: <20150609084613.GA18121@redhat.com> References: <1429720392-25345-1-git-send-email-huawei.xie@intel.com> <553995DB.4000801@huawei.com> <55768FE2.5060505@huawei.com> <20150609084613.GA18121@redhat.com> Date: Wed, 10 Jun 2015 10:30:01 +0200 X-Google-Sender-Auth: S4csdiU1Tww-r_6YoptJbdw7tio Message-ID: From: Luke Gorrie To: "Michael S. Tsirkin" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH] vhost: flush used->idx update before reading avail->flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Jun 2015 08:30:01 -0000 On 9 June 2015 at 10:46, Michael S. Tsirkin wrote: > By the way, similarly, host side must re-check avail idx after writing > used flags. I don't see where snabbswitch does it - is that a bug > in snabbswitch? Good question. Snabb Switch does not use interrupts from the guest. We always set VRING_F_NO_NOTIFY to tell the guest that it need not interrupt us. Then we run in poll mode and in practice check the avail ring for new descriptors every 20us or so. So the argument for not needing this check in both Snabb Switch and DPDK is that we are running poll mode and don't notice whether interrupts are being sent or not. Is that a solid argument or do I misunderstand what the race condition is? Cheers, -Luke