test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] nics/system_info: _strip_memory adapt new output
@ 2020-04-24  3:32 Jiang, YuX
  2020-04-24  4:05 ` Jiang, YuX
  2020-04-24  6:41 ` Tu, Lijuan
  0 siblings, 2 replies; 5+ messages in thread
From: Jiang, YuX @ 2020-04-24  3:32 UTC (permalink / raw)
  To: dts; +Cc: Jiang,yu

From: "Jiang,yu" <yux.jiang@intel.com>

adapt the new output of memory info

Signed-off-by: Jiang,yu <yux.jiang@intel.com>
---
 nics/system_info.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/nics/system_info.py b/nics/system_info.py
index da73b9f..5f796be 100644
--- a/nics/system_info.py
+++ b/nics/system_info.py
@@ -75,9 +75,12 @@ class SystemInfo(object):
     def _strip_memory(self, memories):
         """
         Size: 8192 MB Locator: DIMM_A1 Speed: 2133 MHz
+        Size: 32 GB Locator: DIMMB1 Speed: 2400 MT/s
         """
         s_regex = r"(\s+)Size: (\d+) MB"
+        s_regex_gb = r"(\s+)Size: (\d+) GB"
         l_regex= r"(\s+)Locator: .*_(\w+)"
+        l_regex_x= r"(\s+)Locator:.*DIMM(\w+)"
         speed_regex = r"(\s+)Speed: (.*)"
         size = ""
         locate = ""
@@ -88,11 +91,17 @@ class SystemInfo(object):
         total_size = 0
         for line in lines:
             m = re.match(s_regex, line)
+            m_gb = re.match(s_regex_gb, line)
             if m:
                 size = m.group(2)
+            elif m_gb:
+                size = m_gb.group(2)*1024
             l_m = re.match(l_regex, line)
+            l_mx = re.match(l_regex_x, line)
             if l_m:
                 locate = l_m.group(2)
+            elif l_mx:
+                locate = l_mx.group(2)
             s_m = re.match(speed_regex, line)
             if s_m:
                 speed = s_m.group(2)
-- 
2.17.2


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

* Re: [dts] [PATCH V1] nics/system_info: _strip_memory adapt new output
  2020-04-24  3:32 [dts] [PATCH V1] nics/system_info: _strip_memory adapt new output Jiang, YuX
@ 2020-04-24  4:05 ` Jiang, YuX
       [not found]   ` <60652C6914E08D41B9AA1580751B3CA9015EF9BE@SHSMSX103.ccr.corp.intel.com>
  2020-04-24  6:41 ` Tu, Lijuan
  1 sibling, 1 reply; 5+ messages in thread
From: Jiang, YuX @ 2020-04-24  4:05 UTC (permalink / raw)
  To: dts

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

Tested-by: "Jiang,yu" <yux.jiang@intel.com>

-----Original Message-----
From: Jiang, YuX 
Sent: Friday, April 24, 2020 11:32 AM
To: dts@dpdk.org
Cc: Jiang, YuX <yux.jiang@intel.com>
Subject: [dts][PATCH V1] nics/system_info: _strip_memory adapt new output

From: "Jiang,yu" <yux.jiang@intel.com>

adapt the new output of memory info

Signed-off-by: Jiang,yu <yux.jiang@intel.com>
---
 nics/system_info.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/nics/system_info.py b/nics/system_info.py index da73b9f..5f796be 100644
--- a/nics/system_info.py
+++ b/nics/system_info.py
@@ -75,9 +75,12 @@ class SystemInfo(object):
     def _strip_memory(self, memories):
         """
         Size: 8192 MB Locator: DIMM_A1 Speed: 2133 MHz
+        Size: 32 GB Locator: DIMMB1 Speed: 2400 MT/s
         """
         s_regex = r"(\s+)Size: (\d+) MB"
+        s_regex_gb = r"(\s+)Size: (\d+) GB"
         l_regex= r"(\s+)Locator: .*_(\w+)"
+        l_regex_x= r"(\s+)Locator:.*DIMM(\w+)"
         speed_regex = r"(\s+)Speed: (.*)"
         size = ""
         locate = ""
@@ -88,11 +91,17 @@ class SystemInfo(object):
         total_size = 0
         for line in lines:
             m = re.match(s_regex, line)
+            m_gb = re.match(s_regex_gb, line)
             if m:
                 size = m.group(2)
+            elif m_gb:
+                size = m_gb.group(2)*1024
             l_m = re.match(l_regex, line)
+            l_mx = re.match(l_regex_x, line)
             if l_m:
                 locate = l_m.group(2)
+            elif l_mx:
+                locate = l_mx.group(2)
             s_m = re.match(speed_regex, line)
             if s_m:
                 speed = s_m.group(2)
--
2.17.2


[-- Attachment #2: TestPmd.log --]
[-- Type: application/octet-stream, Size: 158045 bytes --]

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

* Re: [dts] [PATCH V1] nics/system_info: _strip_memory adapt new output
       [not found]   ` <60652C6914E08D41B9AA1580751B3CA9015EF9BE@SHSMSX103.ccr.corp.intel.com>
@ 2020-04-24  5:34     ` Jiang, MaoX
  2020-04-24  5:54     ` Jiang, MaoX
  1 sibling, 0 replies; 5+ messages in thread
From: Jiang, MaoX @ 2020-04-24  5:34 UTC (permalink / raw)
  To: dts

Tested-by: "Jiang,mao" <maox.jiang@intel.com>

> > -----Original Message-----
> > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jiang, YuX
> > Sent: Friday, April 24, 2020 12:05 PM
> > To: dts@dpdk.org
> > Subject: Re: [dts] [PATCH V1] nics/system_info: _strip_memory adapt
> > new output
> >
> > Tested-by: "Jiang,yu" <yux.jiang@intel.com>
> >
> > -----Original Message-----
> > From: Jiang, YuX
> > Sent: Friday, April 24, 2020 11:32 AM
> > To: dts@dpdk.org
> > Cc: Jiang, YuX <yux.jiang@intel.com>
> > Subject: [dts][PATCH V1] nics/system_info: _strip_memory adapt new
> > output
> >
> > From: "Jiang,yu" <yux.jiang@intel.com>
> >
> > adapt the new output of memory info
> >
> > Signed-off-by: Jiang,yu <yux.jiang@intel.com>
> > ---
> >  nics/system_info.py | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/nics/system_info.py b/nics/system_info.py index
> > da73b9f..5f796be 100644
> > --- a/nics/system_info.py
> > +++ b/nics/system_info.py
> > @@ -75,9 +75,12 @@ class SystemInfo(object):
> >      def _strip_memory(self, memories):
> >          """
> >          Size: 8192 MB Locator: DIMM_A1 Speed: 2133 MHz
> > +        Size: 32 GB Locator: DIMMB1 Speed: 2400 MT/s
> >          """
> >          s_regex = r"(\s+)Size: (\d+) MB"
> > +        s_regex_gb = r"(\s+)Size: (\d+) GB"
> >          l_regex= r"(\s+)Locator: .*_(\w+)"
> > +        l_regex_x= r"(\s+)Locator:.*DIMM(\w+)"
> >          speed_regex = r"(\s+)Speed: (.*)"
> >          size = ""
> >          locate = ""
> > @@ -88,11 +91,17 @@ class SystemInfo(object):
> >          total_size = 0
> >          for line in lines:
> >              m = re.match(s_regex, line)
> > +            m_gb = re.match(s_regex_gb, line)
> >              if m:
> >                  size = m.group(2)
> > +            elif m_gb:
> > +                size = m_gb.group(2)*1024
> >              l_m = re.match(l_regex, line)
> > +            l_mx = re.match(l_regex_x, line)
> >              if l_m:
> >                  locate = l_m.group(2)
> > +            elif l_mx:
> > +                locate = l_mx.group(2)
> >              s_m = re.match(speed_regex, line)
> >              if s_m:
> >                  speed = s_m.group(2)
> > --
> > 2.17.2


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

* Re: [dts] [PATCH V1] nics/system_info: _strip_memory adapt new output
       [not found]   ` <60652C6914E08D41B9AA1580751B3CA9015EF9BE@SHSMSX103.ccr.corp.intel.com>
  2020-04-24  5:34     ` Jiang, MaoX
@ 2020-04-24  5:54     ` Jiang, MaoX
  1 sibling, 0 replies; 5+ messages in thread
From: Jiang, MaoX @ 2020-04-24  5:54 UTC (permalink / raw)
  To: dts

Tested-by: "Jiang,mao" <maox.jiang@intel.com>

> > -----Original Message-----
> > From: Jiang, YuX
> > Sent: Friday, April 24, 2020 11:32 AM
> > To: dts@dpdk.org
> > Cc: Jiang, YuX <yux.jiang@intel.com>
> > Subject: [dts][PATCH V1] nics/system_info: _strip_memory adapt new
> > output
> >
> > From: "Jiang,yu" <yux.jiang@intel.com>
> >
> > adapt the new output of memory info
> >
> > Signed-off-by: Jiang,yu <yux.jiang@intel.com>
> > ---
> >  nics/system_info.py | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/nics/system_info.py b/nics/system_info.py index
> > da73b9f..5f796be 100644
> > --- a/nics/system_info.py
> > +++ b/nics/system_info.py
> > @@ -75,9 +75,12 @@ class SystemInfo(object):
> >      def _strip_memory(self, memories):
> >          """
> >          Size: 8192 MB Locator: DIMM_A1 Speed: 2133 MHz
> > +        Size: 32 GB Locator: DIMMB1 Speed: 2400 MT/s
> >          """
> >          s_regex = r"(\s+)Size: (\d+) MB"
> > +        s_regex_gb = r"(\s+)Size: (\d+) GB"
> >          l_regex= r"(\s+)Locator: .*_(\w+)"
> > +        l_regex_x= r"(\s+)Locator:.*DIMM(\w+)"
> >          speed_regex = r"(\s+)Speed: (.*)"
> >          size = ""
> >          locate = ""
> > @@ -88,11 +91,17 @@ class SystemInfo(object):
> >          total_size = 0
> >          for line in lines:
> >              m = re.match(s_regex, line)
> > +            m_gb = re.match(s_regex_gb, line)
> >              if m:
> >                  size = m.group(2)
> > +            elif m_gb:
> > +                size = m_gb.group(2)*1024
> >              l_m = re.match(l_regex, line)
> > +            l_mx = re.match(l_regex_x, line)
> >              if l_m:
> >                  locate = l_m.group(2)
> > +            elif l_mx:
> > +                locate = l_mx.group(2)
> >              s_m = re.match(speed_regex, line)
> >              if s_m:
> >                  speed = s_m.group(2)
> > --
> > 2.17.2


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

* Re: [dts] [PATCH V1] nics/system_info: _strip_memory adapt new output
  2020-04-24  3:32 [dts] [PATCH V1] nics/system_info: _strip_memory adapt new output Jiang, YuX
  2020-04-24  4:05 ` Jiang, YuX
@ 2020-04-24  6:41 ` Tu, Lijuan
  1 sibling, 0 replies; 5+ messages in thread
From: Tu, Lijuan @ 2020-04-24  6:41 UTC (permalink / raw)
  To: Jiang, YuX, dts; +Cc: Jiang, YuX

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Jiang, YuX
> Sent: Friday, April 24, 2020 11:32 AM
> To: dts@dpdk.org
> Cc: Jiang, YuX <yux.jiang@intel.com>
> Subject: [dts] [PATCH V1] nics/system_info: _strip_memory adapt new
> output
> 
> From: "Jiang,yu" <yux.jiang@intel.com>
> 
> adapt the new output of memory info
> 
> Signed-off-by: Jiang,yu <yux.jiang@intel.com>
> ---
>  nics/system_info.py | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/nics/system_info.py b/nics/system_info.py index
> da73b9f..5f796be 100644
> --- a/nics/system_info.py
> +++ b/nics/system_info.py
> @@ -75,9 +75,12 @@ class SystemInfo(object):
>      def _strip_memory(self, memories):
>          """
>          Size: 8192 MB Locator: DIMM_A1 Speed: 2133 MHz
> +        Size: 32 GB Locator: DIMMB1 Speed: 2400 MT/s
>          """
>          s_regex = r"(\s+)Size: (\d+) MB"
> +        s_regex_gb = r"(\s+)Size: (\d+) GB"
>          l_regex= r"(\s+)Locator: .*_(\w+)"
> +        l_regex_x= r"(\s+)Locator:.*DIMM(\w+)"
>          speed_regex = r"(\s+)Speed: (.*)"
>          size = ""
>          locate = ""
> @@ -88,11 +91,17 @@ class SystemInfo(object):
>          total_size = 0
>          for line in lines:
>              m = re.match(s_regex, line)
> +            m_gb = re.match(s_regex_gb, line)
>              if m:
>                  size = m.group(2)
> +            elif m_gb:
> +                size = m_gb.group(2)*1024
>              l_m = re.match(l_regex, line)
> +            l_mx = re.match(l_regex_x, line)
>              if l_m:
>                  locate = l_m.group(2)
> +            elif l_mx:
> +                locate = l_mx.group(2)
>              s_m = re.match(speed_regex, line)
>              if s_m:
>                  speed = s_m.group(2)
> --
> 2.17.2


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

end of thread, other threads:[~2020-04-24  6:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24  3:32 [dts] [PATCH V1] nics/system_info: _strip_memory adapt new output Jiang, YuX
2020-04-24  4:05 ` Jiang, YuX
     [not found]   ` <60652C6914E08D41B9AA1580751B3CA9015EF9BE@SHSMSX103.ccr.corp.intel.com>
2020-04-24  5:34     ` Jiang, MaoX
2020-04-24  5:54     ` Jiang, MaoX
2020-04-24  6:41 ` 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).