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 2E3311B122 for ; Tue, 29 Jan 2019 13:24:20 +0100 (CET) Received: from vc1.ecl.ntt.co.jp (vc1.ecl.ntt.co.jp [129.60.86.153]) by tama50.ecl.ntt.co.jp (8.13.8/8.13.8) with ESMTP id x0TCOKT4025107; Tue, 29 Jan 2019 21:24:20 +0900 Received: from vc1.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id E34F1EA85D9; Tue, 29 Jan 2019 21:24:19 +0900 (JST) Received: from localhost.localdomain (lobster.nslab.ecl.ntt.co.jp [129.60.13.95]) by vc1.ecl.ntt.co.jp (Postfix) with ESMTP id CEDBAEA8589; Tue, 29 Jan 2019 21:24:19 +0900 (JST) From: ogawa.yasufumi@lab.ntt.co.jp To: ferruh.yigit@intel.com, spp@dpdk.org, ogawa.yasufumi@lab.ntt.co.jp Date: Tue, 29 Jan 2019 21:21:53 +0900 Message-Id: <1548764521-2827-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/8] Add launch command to spp_primary 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: Tue, 29 Jan 2019 12:24:21 -0000 From: Yasufumi Ogawa This series of patches is to add `launch` command which is used to launch secondary process from spp_primary. For this update, spp-ctl and SPP CLI are also update to support the command. Spp_primary receives the command via tcp port 5555 and launches requested secondary process by running `sec_launcher.py` script. The reason of calling from the script is to avoid secondary be child process. Spp-ctl has REST API of PUT method for launch commnad. Request body consists of client ID, process name and options of the secondary. Here is an example. # request body params for launching spp_nfv with sec ID 1 { "client_id": 1, "proc_name": "spp_nfv", "eal": { "-l": "1-2", "-m": 512, ... }, "app": { "-n": 1, "-s": "127.0.0.1:6666" } } You can try to launch it from spp-ctl with curl command. $ curl -X PUT -d '{"client_id":1,"proc_name":"spp_nfv",...}' \ http://127.0.0.1:7777/v1/primary/launch SPP CLI supports launch command more easy way to use. You notice that some of mandatory options such as `--proc-type` are missing. These options are completed in SPP CLI before sending the request. This comamnd also supporting TAB completion as same as other commands. spp > pri; launch nfv 1 -l 1-2 -m 512 -- -n 1 -s ... Yasufumi Ogawa (8): shared: add func for getting dirname of secondary spp_priamry: add launch command spp-ctl: add launch command support for REST API controller: add launch sub command in pri spp_primary: change launching sec to use python tools/helpers: add sec launcher script controller: revise completion of launch command tools/helpers: move cpu_layout script to helpers log/README.txt | 8 ++ src/controller/commands/pri.py | 211 +++++++++++++++++++++++++++++++++++-- src/controller/commands/server.py | 4 + src/controller/shell.py | 3 + src/controller/shell_lib/common.py | 8 +- src/controller/spp_common.py | 4 + src/primary/main.c | 174 ++++++++++++++++++++++++++++-- src/shared/common.c | 26 +++++ src/shared/common.h | 5 +- src/spp-ctl/spp_proc.py | 113 ++++++++++++++++++++ src/spp-ctl/spp_webapi.py | 11 ++ tools/cpu_layout.py | 144 ------------------------- tools/helpers/cpu_layout.py | 144 +++++++++++++++++++++++++ tools/helpers/sec_launcher.py | 10 ++ 14 files changed, 704 insertions(+), 161 deletions(-) create mode 100644 log/README.txt delete mode 100755 tools/cpu_layout.py create mode 100755 tools/helpers/cpu_layout.py create mode 100755 tools/helpers/sec_launcher.py -- 2.7.4