From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USmyB-0006iI-SN for qemu-devel@nongnu.org; Thu, 18 Apr 2013 07:25:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1USmy8-0007Iq-Ml for qemu-devel@nongnu.org; Thu, 18 Apr 2013 07:25:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1USmy8-0007Ii-Ev for qemu-devel@nongnu.org; Thu, 18 Apr 2013 07:25:36 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3IBPZ88022534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Apr 2013 07:25:36 -0400 Date: Thu, 18 Apr 2013 13:25:34 +0200 From: Stefan Hajnoczi Message-ID: <20130418112534.GA21375@stefanha-thinkpad.redhat.com> References: <1365681519-4614-1-git-send-email-akong@redhat.com> <1366023319-9484-1-git-send-email-akong@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1366023319-9484-1-git-send-email-akong@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] net: make network client name unique List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amos Kong Cc: qemu-devel@nongnu.org On Mon, Apr 15, 2013 at 06:55:19PM +0800, Amos Kong wrote: > assign_name() creates a name MODEL.NUM, where MODEL is the client's model, > and NUM is the number of MODELs that already exist. > > Markus added NIC naming for non-VLAN clients in commit 53e51d85. > commit d33d93b2 incorrectly added a judgement of net-hub. It caused > net clients created with -netdev get same names. > > eg: > # qemu-upstream -device virtio-net-pci,netdev=h1 -netdev tap,id=h1 \ > -device virtio-net-pci,netdev=h2 -netdev tap,id=h2 .. > (qemu) info network > virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56 > \ h1: index=0,type=tap,ifname=tap0,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown > virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:57 > \ h2: index=0,type=tap,ifname=tap1,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown > > This patch removed the check of nic-hub, and created unique names for > all net clients that have same model. > > v2: update commitlog & comments > > Signed-off-by: Amos Kong > --- > net/net.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) Thanks, applied to my net tree: https://github.com/stefanha/qemu/commits/net Stefan