From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCXve-0002v3-4b for qemu-devel@nongnu.org; Mon, 04 Mar 2013 11:07:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UCXvb-0004xn-3Y for qemu-devel@nongnu.org; Mon, 04 Mar 2013 11:07:54 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46299) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UCXva-0004xf-S1 for qemu-devel@nongnu.org; Mon, 04 Mar 2013 11:07:51 -0500 Message-ID: <5134B805.7000304@redhat.com> Date: Mon, 04 Mar 2013 16:04:37 +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> In-Reply-To: <20130304144914.GD3981@stefanha-thinkpad.redhat.com> 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: Stefan Hajnoczi Cc: mdroth , "Michael S. Tsirkin" , Liu Ping Fan , Anthony Liguori , qemu-devel@nongnu.org Il 04/03/2013 15:49, Stefan Hajnoczi ha scritto: > > Use nc->transfer_lock to protect the nc->peer->send_queue. All of the > > Please use consistent names: the lock protects ->send_queue so it's best > called send_queue_lock or send_lock. 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. nc->peer shouldn't need a lock. It is immutable, isn't it? Paolo