All of lore.kernel.org
 help / color / mirror / Atom feed
* Get the socket id
@ 2013-08-07  6:14 dvr
       [not found] ` <77584a69.d001.1405769661d.Coremail.jinxiu.1006-9Onoh4P/yGk@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: dvr @ 2013-08-07  6:14 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

[-- Attachment #1: Type: text/plain, Size: 737 bytes --]

hi,
   all
   I'm confused with the following code(Eal_memory.c in lib\librte_eal\linuxapp\eal directory, LINE 373):
 
   nodestr = strstr(buf," N");
   if(nodestr == NULL) {...}
   nodestr += 2;
   end = strstr(nodestr,"=");
   if(end == NULL) {...}
   // here nodestr = "0=1"
   end[0] = '\0';
   end = NULL;
  // here nodestr = "0"
   socket_id = strtoul(nodestr,&end,0);
 
   Through "printf", I know that:
   buf = "00200000 default file=/mnt/dpdk/huge/rtemap_1 huge dirty=1 N0=1"
   And finally socket_id=0
   My question is :why we get the socket_id before "=" instead of after "=" ?
   and if we want to get the character after "N", isn't this code too complex?
 
   I will be very appreciate for any help.
   Regards!
 
Maria
  

[-- Attachment #2: Type: text/html, Size: 1560 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-08-07 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-07  6:14 Get the socket id dvr
     [not found] ` <77584a69.d001.1405769661d.Coremail.jinxiu.1006-9Onoh4P/yGk@public.gmane.org>
2013-08-07 15:52   ` Stephen Hemminger
     [not found]     ` <20130807085241.684ed79a-We1ePj4FEcvRI77zikRAJc56i+j3xesD0e7PPNI6Mm0@public.gmane.org>
2013-08-07 15:56       ` Damien Millescamps
     [not found]         ` <52026E47.6090402-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2013-08-07 16:11           ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.