From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:60921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScdW7-00028v-6Z for qemu-devel@nongnu.org; Thu, 07 Jun 2012 10:16:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ScdW1-0004E2-2f for qemu-devel@nongnu.org; Thu, 07 Jun 2012 10:16:50 -0400 Received: from mail-pz0-f45.google.com ([209.85.210.45]:43842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ScdW0-0004Dn-QG for qemu-devel@nongnu.org; Thu, 07 Jun 2012 10:16:45 -0400 Received: by dadv2 with SMTP id v2so1042404dad.4 for ; Thu, 07 Jun 2012 07:16:42 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <4FD0B7C6.5090703@redhat.com> Date: Thu, 07 Jun 2012 16:16:38 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1338989183-28869-1-git-send-email-zwu.kernel@gmail.com> <20120607100825.GA5964@stefanha-thinkpad.localdomain> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4] net: add the support for -netdev socket, listen List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Zhi Yong Wu Cc: Zhi Yong Wu , Stefan Hajnoczi , qemu-devel@nongnu.org Il 07/06/2012 14:49, Zhi Yong Wu ha scritto: >> > Instead, drop the NetSocketListenState struct and add a listen_fd field >> > to NetSocketState. When a -netdev socket,listen= instance is created >> > there will be a NetSocketState with fd=-1 and a valid listen_fd. The > Have you considered the case where there're mulitple -net > socket,listen= instance in one vlan? Why should that matter? They will have different NetSocketState and different listen_fds. Each socket will discard incoming packets until the other side connects. Paolo