[dpdk-dev] [PATCH] eal/x86: get hypervisor name

Stephen Hemminger stephen at networkplumber.org
Thu Nov 30 23:11:34 CET 2017


On Thu, 30 Nov 2017 23:03:57 +0100
Thomas Monjalon <thomas at monjalon.net> wrote:

> 30/11/2017 22:55, Stephen Hemminger:
> > On Thu, 30 Nov 2017 22:47:20 +0100
> > Thomas Monjalon <thomas at monjalon.net> wrote:
> >   
> > > +	for (int reg = 1; reg < 4; reg++)
> > > +		memcpy(name + (reg - 1) * 4, &regs[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.


More information about the dev mailing list