From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43095) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCn9Z-0003Sd-5w for qemu-devel@nongnu.org; Tue, 05 Mar 2013 03:23:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCn9U-0001xM-P9 for qemu-devel@nongnu.org; Tue, 05 Mar 2013 03:23:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:18611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCn9U-0001xD-H9 for qemu-devel@nongnu.org; Tue, 05 Mar 2013 03:23:12 -0500 Message-ID: <5135AB64.4080301@redhat.com> Date: Tue, 05 Mar 2013 09:23:00 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1362316883-7948-1-git-send-email-qemulist@gmail.com> <1362316883-7948-3-git-send-email-qemulist@gmail.com> <20130304144914.GD3981@stefanha-thinkpad.redhat.com> <5134B805.7000304@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/3] net: introduce lock to protect NetClientState's send_queue List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: liu ping fan Cc: mdroth , Stefan Hajnoczi , qemu-devel@nongnu.org, Anthony Liguori , "Michael S. Tsirkin" Il 05/03/2013 03:45, liu ping fan ha scritto: > > In fact, it's a bit strange to use nc->something_lock to lock something > > in nc->peer. Please add the lock to NetQueue and include/net/queue.h. > > The lock also servers as exclusion between NetClientState's sender and > remover. So if we apply lock on NetQueue, it can not achieve the > goal. Ok, but please document it. Paolo