From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH] eal/x86: get hypervisor name Date: Thu, 30 Nov 2017 14:11:34 -0800 Message-ID: <20171130141134.52068e4f@xeon-e3> References: <20171130214720.30098-1-thomas@monjalon.net> <20171130135551.458330e2@xeon-e3> <2407814.uAEd4ZzsLf@xps> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org To: Thomas Monjalon Return-path: Received: from mail-pg0-f44.google.com (mail-pg0-f44.google.com [74.125.83.44]) by dpdk.org (Postfix) with ESMTP id 2D5E11B199 for ; Thu, 30 Nov 2017 23:11:42 +0100 (CET) Received: by mail-pg0-f44.google.com with SMTP id w7so3583228pgv.6 for ; Thu, 30 Nov 2017 14:11:42 -0800 (PST) In-Reply-To: <2407814.uAEd4ZzsLf@xps> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Thu, 30 Nov 2017 23:03:57 +0100 Thomas Monjalon wrote: > 30/11/2017 22:55, Stephen Hemminger: > > On Thu, 30 Nov 2017 22:47:20 +0100 > > Thomas Monjalon wrote: > > > > > + for (int reg = 1; reg < 4; reg++) > > > + memcpy(name + (reg - 1) * 4, ®s[reg], 4); > > > + name[12] = '\0'; > > > > C99 style declarations are not generally used in DPDK. > > True :) > It will be fixed in v2. > > I think I should add a log somewhere at initialization in order > to test this function. > Do you think it deserves a table of name strings in the .h? Same table is short-listed in util-linux (lscpu). You might also want to handle Xen, Xen PV, VirtualBox, Windows and WSL at some point.