Soft Patch Panel
 help / color / mirror / Atom feed
* [spp] [PATCH 0/8] Add launch command to spp_primary
@ 2019-01-29 12:21 ogawa.yasufumi
  2019-01-29 12:21 ` [spp] [PATCH 1/8] shared: add func for getting dirname of secondary ogawa.yasufumi
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: ogawa.yasufumi @ 2019-01-29 12:21 UTC (permalink / raw)
  To: ferruh.yigit, spp, ogawa.yasufumi

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

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

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

end of thread, other threads:[~2019-01-29 12:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-29 12:21 [spp] [PATCH 0/8] Add launch command to spp_primary ogawa.yasufumi
2019-01-29 12:21 ` [spp] [PATCH 1/8] shared: add func for getting dirname of secondary ogawa.yasufumi
2019-01-29 12:21 ` [spp] [PATCH 2/8] spp_priamry: add launch command ogawa.yasufumi
2019-01-29 12:21 ` [spp] [PATCH 3/8] spp-ctl: add launch command support for REST API ogawa.yasufumi
2019-01-29 12:21 ` [spp] [PATCH 4/8] controller: add launch sub command in pri ogawa.yasufumi
2019-01-29 12:21 ` [spp] [PATCH 5/8] spp_primary: change launching sec to use python ogawa.yasufumi
2019-01-29 12:21 ` [spp] [PATCH 6/8] tools/helpers: add sec launcher script ogawa.yasufumi
2019-01-29 12:22 ` [spp] [PATCH 7/8] controller: revise completion of launch command ogawa.yasufumi
2019-01-29 12:22 ` [spp] [PATCH 8/8] tools/helpers: move cpu_layout script to helpers ogawa.yasufumi

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