test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] nics/system_info:adapt some environment memory echo unit is GB
@ 2021-03-24  3:08 Zhou Jun
  2021-03-24  3:13 ` Zhou, JunX W
  0 siblings, 1 reply; 3+ messages in thread
From: Zhou Jun @ 2021-03-24  3:08 UTC (permalink / raw)
  To: dts; +Cc: Zhou Jun

The previous environment memory information unit is MB. 
At present, some new system memory information units are GB,
 and DTS needs to be modified for adaptation.

Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
---
 nics/system_info.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/nics/system_info.py b/nics/system_info.py
index da73b9f..70fdbf6 100644
--- a/nics/system_info.py
+++ b/nics/system_info.py
@@ -77,6 +77,7 @@ class SystemInfo(object):
         Size: 8192 MB Locator: DIMM_A1 Speed: 2133 MHz
         """
         s_regex = r"(\s+)Size: (\d+) MB"
+        s1_regex = r"(\s+)Size: (\d+) GB"
         l_regex= r"(\s+)Locator: .*_(\w+)"
         speed_regex = r"(\s+)Speed: (.*)"
         size = ""
@@ -88,8 +89,11 @@ class SystemInfo(object):
         total_size = 0
         for line in lines:
             m = re.match(s_regex, line)
+            m1 = re.match(s1_regex, line)
             if m:
                 size = m.group(2)
+            if m1:
+                size = int(m1.group(2)) * 1024
             l_m = re.match(l_regex, line)
             if l_m:
                 locate = l_m.group(2)
-- 
1.8.3.1


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

* Re: [dts] [PATCH V1] nics/system_info:adapt some environment memory echo unit is GB
  2021-03-24  3:08 [dts] [PATCH V1] nics/system_info:adapt some environment memory echo unit is GB Zhou Jun
@ 2021-03-24  3:13 ` Zhou, JunX W
  2021-03-25  6:00   ` Tu, Lijuan
  0 siblings, 1 reply; 3+ messages in thread
From: Zhou, JunX W @ 2021-03-24  3:13 UTC (permalink / raw)
  To: dts

>-----Original Message-----
>From: Zhou, JunX W 
>Sent: Wednesday, March 24, 2021 11:09 AM
>To: dts@dpdk.org
>Cc: Zhou, JunX W <junx.w.zhou@intel.com>
>Subject: [dts][PATCH V1] nics/system_info:adapt some environment memory echo unit is GB
>
>The previous environment memory information unit is MB. 
>At present, some new system memory information units are GB,  and DTS needs to be modified for adaptation.
>
>Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>

Tested-by: Zhou, Jun <junx.w.zhou@intel.com>


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

* Re: [dts] [PATCH V1] nics/system_info:adapt some environment memory echo unit is GB
  2021-03-24  3:13 ` Zhou, JunX W
@ 2021-03-25  6:00   ` Tu, Lijuan
  0 siblings, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2021-03-25  6:00 UTC (permalink / raw)
  To: Zhou, JunX W, dts


> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Zhou, JunX W
> Sent: 2021年3月24日 11:14
> To: dts@dpdk.org
> Subject: Re: [dts] [PATCH V1] nics/system_info:adapt some environment
> memory echo unit is GB
> 
> >-----Original Message-----
> >From: Zhou, JunX W
> >Sent: Wednesday, March 24, 2021 11:09 AM
> >To: dts@dpdk.org
> >Cc: Zhou, JunX W <junx.w.zhou@intel.com>
> >Subject: [dts][PATCH V1] nics/system_info:adapt some environment memory
> echo unit is GB
> >
> >The previous environment memory information unit is MB.
> >At present, some new system memory information units are GB,  and DTS
> needs to be modified for adaptation.
> >
> >Signed-off-by: Zhou Jun <junx.w.zhou@intel.com>
> 
> Tested-by: Zhou, Jun <junx.w.zhou@intel.com>

Applied, thaks


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

end of thread, other threads:[~2021-03-25  6:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24  3:08 [dts] [PATCH V1] nics/system_info:adapt some environment memory echo unit is GB Zhou Jun
2021-03-24  3:13 ` Zhou, JunX W
2021-03-25  6:00   ` Tu, Lijuan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).