From: Gianni Tedesco Subject: Re: [PATCH] xl: improve vif2 parsing Date: Fri, 20 Aug 2010 15:30:27 +0100 Message-ID: <1282314627.3731.57.camel@qabil.uk.xensource.com> References: <4C6E6E84.5020704@amd.com> <4C6E7BE4.6090605@amd.com> <1282311269.3731.55.camel@qabil.uk.xensource.com> <201008201628.08694.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <201008201628.08694.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger Cc: "Przywara, Andre" , "xen-devel@lists.xensource.com" , Keir Fraser , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Fri, 2010-08-20 at 15:28 +0100, Christoph Egger wrote: > On Friday 20 August 2010 15:34:29 Gianni Tedesco wrote: > > On Fri, 2010-08-20 at 13:58 +0100, Andre Przywara wrote: > > > Gianni Tedesco wrote: > > > > On Fri, 2010-08-20 at 13:03 +0100, Andre Przywara wrote: > > > >> Andre Przywara wrote: > > > >>> Hi, > > > >>> > > > >>> vif2 parsing relies on counted strncmp() statements. Replace this > > > >>> with a more robust automatic version. > > > >> > > > >> No, I didn't want to leave this as an exercise to the reader, I am > > > >> just spoiled by git send-email, so forgot to attach the patch. Sorry! > > > >> > > > >>> Signed-off-by: Andre Przywara > > > > > > > > Both patches look good to me. > > > > > > > >>> Regards, > > > >>> Andre. > > > >>> > > > >>> P.S. If you like this, I have seen at least two more instances of the > > > >>> same issue that could be improved this way. > > > > > > > > Can you say where? > > > > > > In main_networkattach() and main_network2attach(). > > > > You should absolutely sort this out. So I had already done a cleanup for > > similar problem with PCI BDF's. > > Yes and OS-dependent code still needs to be sorted out. Indeed, the other changes I mentioned (plus correct safety checks) may change the structure of the code so much that the OS-specific interfaces will change substantially. For that reason it's at the bottom of the list right now. Gianni