DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev]  [PATCH] cpu_layout.py: adjust output format to align
@ 2014-05-27  9:41 Shannon Zhao
  2014-05-27 10:30 ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Shannon Zhao @ 2014-05-27  9:41 UTC (permalink / raw)
  To: dev

Bug: when "core id" is greater than 9, the cpu_layout.py output doesn't align.

        Socket 0        Socket 1
        ---------       ---------
Core 9  [4, 16]         [10, 22]

Core 10         [5, 17]         [11, 23]

Solution: adjust output format to align

        Socket 0        Socket 1
        ---------       ---------
Core 9  [4, 16]         [10, 22]

Core 10 [5, 17]         [11, 23]

Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
---
 tools/cpu_layout.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/cpu_layout.py b/tools/cpu_layout.py
index 9eff9d7..4768551 100755
--- a/tools/cpu_layout.py
+++ b/tools/cpu_layout.py
@@ -83,7 +83,7 @@ for s in sockets:
 print ""

 for c in cores:
-       print "Core %s" % c,
+       print "Core %s" % str(c).ljust(2),
        for s in sockets:
-               print "\t", core_map[(s,c)],
+               print core_map[(s,c)],"\t",
        print "\n"
--
1.7.1

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

end of thread, other threads:[~2014-05-28  9:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-27  9:41 [dpdk-dev] [PATCH] cpu_layout.py: adjust output format to align Shannon Zhao
2014-05-27 10:30 ` Thomas Monjalon
2014-05-28  3:02   ` Shannon Zhao
2014-05-28  9:23     ` Thomas Monjalon

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).