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 60FB41B43F for ; Thu, 31 Jan 2019 12:05:18 +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 x0VB5HnK005285; Thu, 31 Jan 2019 20:05:17 +0900 Received: from vc2.ecl.ntt.co.jp (localhost [127.0.0.1]) by vc2.ecl.ntt.co.jp (Postfix) with ESMTP id 48EA96396F9; Thu, 31 Jan 2019 20:05:17 +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 3ABC263965A; Thu, 31 Jan 2019 20:05:17 +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 20:03:07 +0900 Message-Id: <1548932589-21099-3-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1548932589-21099-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> References: <1548932589-21099-1-git-send-email-ogawa.yasufumi@lab.ntt.co.jp> X-TM-AS-MML: disable Subject: [spp] [PATCH 2/4] docs: add launch of primary to REST API reference 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 11:05:19 -0000 From: Yasufumi Ogawa This patch is to add `launch` API for spp_primary which is for launching a secondary process via REST API. Signed-off-by: Yasufumi Ogawa --- docs/guides/api_ref/spp_primary.rst | 94 +++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/docs/guides/api_ref/spp_primary.rst b/docs/guides/api_ref/spp_primary.rst index e46de21..3cbad10 100644 --- a/docs/guides/api_ref/spp_primary.rst +++ b/docs/guides/api_ref/spp_primary.rst @@ -174,3 +174,97 @@ Response ~~~~~~~~ There is no body content for the response of a successful ``DELETE`` request. + + +PUT /v1/primary/launch +---------------------- + +Launch a secondary process. + +* Normal response codes: 204 +* Error response codes: 400, 404 + + +Request (path) +~~~~~~~~~~~~~~ + +There is no params in this API. + + +Request (body) +~~~~~~~~~~~~~~ + +There are four params for launching secondary process. ``eal`` object +contains a set of EAL options, and ``app`` contains options of teh process. + +.. _table_spp_ctl_spp_primary_launch_body: + +.. table:: Request body params for launch secondary for spp_primary. + + +-----------+---------+-------------------------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+=================================================+ + | proc_name | string | Process name such as ``spp_nfv`` or ``spp_vf``. | + +-----------+---------+-------------------------------------------------+ + | client_id | integer | Secondary ID for the process. | + +-----------+---------+-------------------------------------------------+ + | eal | object | Hash obj of DPDK's EAL options. | + +-----------+---------+-------------------------------------------------+ + | app | object | Hash obj of options of secondary process. | + +-----------+---------+-------------------------------------------------+ + +``eal`` object is a hash of EAL options and its values. All of EAL options +are referred in +`EAL parameters +`_ +in DPDK's +`Getting Started Guide for Linux +`_. + +``app`` object is a hash of options of secondary process, and you can refer +options of each of processes in +`How to Use +`_ +section. + + +Request example +~~~~~~~~~~~~~~~ + +Launch ``spp_nfv`` with secondary ID 1 and lcores ``1,2``. + +.. code-block:: console + + $ curl -X PUT -H 'application/json' \ + -d "{'proc_name': 'spp_nfv', 'client_id': '1', \ + 'eal': {'-m': '512', '-l': '1,2', '--proc-type': 'secondary'}, \ + 'app': {'-s': '192.168.11.59:6666', '-n': '1'}}" + http://127.0.0.1:7777/v1/primary/launch + +Launch ``spp_vf`` with secondary ID 2 and lcores ``1,4-7``. + +.. code-block:: console + + $ curl -X PUT -H 'application/json' \ + -d "{'proc_name': 'spp_vf', 'client_id': '2', \ + 'eal': {'-m': '512', '-l': '1,4-7', '--proc-type': 'secondary'}, \ + 'app': {'-s': '192.168.11.59:6666', '--client-id': '2'}}" + http://127.0.0.1:7777/v1/primary/launch + + +Response +~~~~~~~~ + +There is no body content for the response of a successful ``PUT`` request. + + +Equivalent CLI command +~~~~~~~~~~~~~~~~~~~~~~ + +``proc_type`` is ``nfv``, ``vf`` or ``mirror`` or so. +``eal_opts`` and ``app_opts`` are the same as launching from command line. + +.. code-block:: none + + pri; launch {proc_type} {sec_id} {eal_opts} -- {app_opts} -- 2.7.4