From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from tama50.ecl.ntt.co.jp (tama50.ecl.ntt.co.jp [129.60.39.147]) by dpdk.org (Postfix) with ESMTP id 907441B3BB for ; Thu, 31 Jan 2019 04:07:15 +0100 (CET) Received: from vc2.ecl.ntt.co.jp (vc2.ecl.ntt.co.jp [129.60.86.154]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x0V37DKk027712; Thu, 31 Jan 2019 12:07:13 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id DC6FB638A5F; Thu, 31 Jan 2019 12:07:13 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id CE19A63893E; Thu, 31 Jan 2019 12:07:13 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp Date: Thu, 31 Jan 2019 12:05:03 +0900 Message-Id: <1548903906-17403-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 X-TM-AS-MML: disable Subject: [spp] [PATCH 0/3] Add getting lcores feature X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 31 Jan 2019 03:07:16 -0000 From: Yasufumi Ogawa How to assign cores depends on a decision of user, but made a mistake sometimes because it could be complex if there are many cores and several DPDK processes running on. User should be able to know while making a decision of core assiginment. This series of patches is to add a feature to inspect core usage of spp_priamry. You can get the core usage from spp-ctl or SPP CLI as a part of status info. spp > pri; status - lcores: - [0, 1] - physical ports: ID rx tx tx_drop mac_addr 0 0 0 0 56:48:4f:53:54:00 It is also available to get CPU layout from spp-ctl, logical cores and physical cores on each of sockets. It cannot be referred from SPP CLI currently. Here is an example of getting CPU layout of single socket. `jq' is a command to show JSON data in well formatted. $ curl http://192.168.1.100:7777/v1/cpus | jq [ { "cores": [ { "cpus": [ 1 ], "core_id": 1 }, ... ], "socket_id": 0 } ] The rest of SPP processes are supported in a future update. Yasufumi Ogawa (3): spp_primary: add lcores in status info controller: add lcores in status command of pri spp-ctl: add API for getting CPU layout src/controller/commands/pri.py | 33 ++++++++++++++++++++------------- src/primary/init.h | 2 ++ src/primary/main.c | 34 +++++++++++++++++++++++++++------- src/spp-ctl/spp_ctl.py | 25 +++++++++++++++++++++++++ src/spp-ctl/spp_webapi.py | 4 ++++ 5 files changed, 78 insertions(+), 20 deletions(-) -- 2.7.4