From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNSF8-0003ut-0o for qemu-devel@nongnu.org; Fri, 20 May 2011 12:08:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QNSF6-0003q3-W7 for qemu-devel@nongnu.org; Fri, 20 May 2011 12:08:01 -0400 Received: from david.siemens.de ([192.35.17.14]:32744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QNSF6-0003pq-L8 for qemu-devel@nongnu.org; Fri, 20 May 2011 12:08:00 -0400 Message-ID: <4DD691DC.7080109@siemens.com> Date: Fri, 20 May 2011 18:07:56 +0200 From: Jan Kiszka MIME-Version: 1.0 References: <1305906601-25324-1-git-send-email-peter.maydell@linaro.org> <4DD68F06.7030204@siemens.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/3] net: reimplement -net nic diagnostic fix List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "patches@linaro.org" , "qemu-devel@nongnu.org" , Markus Armbruster On 2011-05-20 18:04, Peter Maydell wrote: > On 20 May 2011 16:55, Jan Kiszka wrote: >> On 2011-05-20 17:49, Peter Maydell wrote: >>> This patchset reverts commit f68b9d672, which was triggering >>> spuriously for NICs created via -device rather than -net nic. >>> It then reimplements the improved diagnostics with a different >>> approach which only applies to '-net nic'. (It's only -net nic >>> devices that can be ignored (ie not instantiated); -device >>> nic devices are always instantiated. Checking for -device user >>> errors like "this device wasn't plugged into any bus" is >>> a separate issue not addressed here.) >> >> But we still have the problem that qemu_new_nic does not call >> net_init_nic. That means e.g. that NICs instantiated via -device don't >> participate in automatic MAC assignment. Maybe fixing that makes this >> series obsolete. > > I think that avoiding MAC address clashes should be done by > having net_init_nic() call qemu_macaddr_default_if_unset() You mean qemu_new_nic? Otherwise it wouldn't help. Will have a look to move that over. > rather than doing its own MAC assignment. > > Having qemu_new_nic() call net_init_nic() is a bit tricky > because (a) as you said earlier you need to avoid doing > it for NICs which were created from nd_table entries in the > first place and (b) it imposes a new limit on the number > of NICs you can create via -device which wasn't there before > (because nd_table is fixed size). > > I think I agree with Paul Brook's comment on IRC that the > real long term solution is for nd_table[] to go away completely, > (ie not for the new qdev option code to add entries in nd_table[] > by calling net_init_nic().) I don't disagree that nd_table is better removed. Then let's address all those issues separately. Jan -- Siemens AG, Corporate Technology, CT T DE IT 1 Corporate Competence Center Embedded Linux