From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from valinux.co.jp (vagw.valinux.co.jp [210.128.90.14]) by dpdk.org (Postfix) with ESMTP id 892D35B40 for ; Fri, 5 Oct 2018 05:58:01 +0200 (CEST) Received: by valinux.co.jp (Postfix, from userid 1000) id 3DE01240CDE; Fri, 5 Oct 2018 12:57:59 +0900 (JST) From: oda@valinux.co.jp To: spp@dpdk.org, ferruh.yigit@intel.com, ogawa.yasufumi@lab.ntt.co.jp Date: Fri, 5 Oct 2018 12:57:56 +0900 Message-Id: <20181005035757.23122-14-oda@valinux.co.jp> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181005035757.23122-1-oda@valinux.co.jp> References: <20180913082544.2D36.277DD91C@valinux.co.jp> <20181005035757.23122-1-oda@valinux.co.jp> Subject: [spp] [PATCH v4 13/14] docs: add labels and captions for tables 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: Fri, 05 Oct 2018 03:58:02 -0000 From: Yasufumi Ogawa For documentation, DPDK's documentation Guidelines[1] requires that all of tables have labels and captions. [1] https://doc.dpdk.org/guides/contributing/documentation.html Signed-off-by: Yasufumi Ogawa Signed-off-by: Itsuro Oda --- docs/guides/spp-ctl/api-reference.rst | 525 ++++++++++++++++---------- 1 file changed, 327 insertions(+), 198 deletions(-) diff --git a/docs/guides/spp-ctl/api-reference.rst b/docs/guides/spp-ctl/api-reference.rst index 3263934..23bc8db 100644 --- a/docs/guides/spp-ctl/api-reference.rst +++ b/docs/guides/spp-ctl/api-reference.rst @@ -30,15 +30,20 @@ Error code ``spp-ctl`` does basic syntax and lexical check of a request. -+------+----------------------------------------------------------------+ -| Error| Description | -+======+================================================================+ -| 400 | Syntax or lexical error, or SPP returns error for the request. | -+------+----------------------------------------------------------------+ -| 404 | URL is not supported, or no SPP process of client-id in a URL. | -+------+----------------------------------------------------------------+ -| 500 | System error occured in ``spp-ctl``. | -+------+----------------------------------------------------------------+ +.. _table_spp_ctl_error_codes: + +.. table:: Error codes in spp-ctl. + + +-------+----------------------------------------------------------------+ + | Error | Description | + | | | + +=======+================================================================+ + | 400 | Syntax or lexical error, or SPP returns error for the request. | + +-------+----------------------------------------------------------------+ + | 404 | URL is not supported, or no SPP process of client-id in a URL. | + +-------+----------------------------------------------------------------+ + | 500 | System error occured in ``spp-ctl``. | + +-------+----------------------------------------------------------------+ API independent of the process type @@ -66,13 +71,18 @@ An array of process objects. process object: -+-----------+---------+---------------------------------------------------------------+ -| Name | Type | Description | -+===========+=========+===============================================================+ -| type | string | process type. one of ``primary``, ``vf`` or ``nfv``. | -+-----------+---------+---------------------------------------------------------------+ -| client-id | integer | client id. if type is ``primary`` this member does not exist. | -+-----------+---------+---------------------------------------------------------------+ +.. _table_spp_ctl_processes: + +.. table:: Response params of getting processes info. + + +-----------+---------+-----------------------------------------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+=================================================================+ + | type | string | process type. one of ``primary``, ``nfv`` or ``vf``. | + +-----------+---------+-----------------------------------------------------------------+ + | client-id | integer | client id. if type is ``primary`` this member does not exist. | + +-----------+---------+-----------------------------------------------------------------+ Response example ^^^^^^^^^^^^^^^^ @@ -154,11 +164,16 @@ Get the information of the ``spp_nfv`` or ``spp_vm`` process. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-------------+ -| Name | Type | Description | -+===========+=========+=============+ -| client_id | integer | client id. | -+-----------+---------+-------------+ +.. _table_spp_ctl_nfvs_get: + +.. table:: Request parameter for getting spp_nfv or spp_vm info. + + +-----------+---------+-------------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+=====================================+ + | client_id | integer | client id. | + +-----------+---------+-------------------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -171,27 +186,37 @@ Request example Response ^^^^^^^^ -+-----------+---------+-------------------------------------------+ -| Name | Type | Description | -+===========+=========+===========================================+ -| client-id | integer | client id. | -+-----------+---------+-------------------------------------------+ -| status | string | ``Running`` or ``Idle``. | -+-----------+---------+-------------------------------------------+ -| ports | array | an array of port ids used by the process. | -+-----------+---------+-------------------------------------------+ -| patches | array | an array of patches. | -+-----------+---------+-------------------------------------------+ +.. _table_spp_ctl_spp_nfv_res: + +.. table:: Response params of getting spp_nfv or spp_vm info. + + +-----------+---------+---------------------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+=============================================+ + | client-id | integer | client id. | + +-----------+---------+---------------------------------------------+ + | status | string | ``Running`` or ``Idle``. | + +-----------+---------+---------------------------------------------+ + | ports | array | an array of port ids used by the process. | + +-----------+---------+---------------------------------------------+ + | patches | array | an array of patches. | + +-----------+---------+---------------------------------------------+ patch objest -+------+--------+----------------------+ -| Name | Type | Description | -+======+========+======================+ -| src | string | source port id. | -+------+--------+----------------------+ -| dst | string | destination port id. | -+------+--------+----------------------+ +.. _table_spp_ctl_patch_spp_nfv: + +.. table:: Attributes of patch of spp_nfv or spp_vm. + + +------+--------+----------------------------------------------+ + | Name | Type | Description | + | | | | + +======+========+==============================================+ + | src | string | source port id. | + +------+--------+----------------------------------------------+ + | dst | string | destination port id. | + +------+--------+----------------------------------------------+ Response example ^^^^^^^^^^^^^^^^ @@ -233,11 +258,16 @@ Start or Stop forwarding. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-------------+ -| Name | Type | Description | -+===========+=========+=============+ -| client_id | integer | client id. | -+-----------+---------+-------------+ +.. _table_spp_ctl_spp_nfv_forward_get: + +.. table:: Request params of forward of spp_nfv or spp_vm. + + +-----------+---------+---------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+=================================+ + | client_id | integer | client id. | + +-----------+---------+---------------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -251,11 +281,16 @@ Request example Request(body) ^^^^^^^^^^^^^ -+--------+--------+------------------------+ -| Name | Type | Description | -+========+========+========================+ -| action | string | ``start`` or ``stop``. | -+--------+--------+------------------------+ +.. _table_spp_ctl_spp_nfv_forward_get_body: + +.. table:: Request body params of forward of spp_nfv or spp_vm. + + +--------+--------+-------------------------------------+ + | Name | Type | Description | + | | | | + +========+========+=====================================+ + | action | string | ``start`` or ``stop``. | + +--------+--------+-------------------------------------+ Response ^^^^^^^^ @@ -289,22 +324,32 @@ Add or Delete port. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-------------+ -| Name | Type | Description | -+===========+=========+=============+ -| client_id | integer | client id. | -+-----------+---------+-------------+ +.. _table_spp_ctl_spp_nfv_ports_get: + +.. table:: Request params of ports of spp_nfv or spp_vm. + + +-----------+---------+--------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+================================+ + | client_id | integer | client id. | + +-----------+---------+--------------------------------+ Request(body) ^^^^^^^^^^^^^ -+--------+--------+---------------------------------------------------------------+ -| Name | Type | Description | -+========+========+===============================================================+ -| action | string | ``add`` or ``del``. | -+--------+--------+---------------------------------------------------------------+ -| port | string | port id. port id is the form {interface_type}:{interface_id}. | -+--------+--------+---------------------------------------------------------------+ +.. _table_spp_ctl_spp_nfv_ports_get_body: + +.. table:: Request body params of ports of spp_nfv or spp_vm. + + +--------+--------+---------------------------------------------------------------+ + | Name | Type | Description | + | | | | + +========+========+===============================================================+ + | action | string | ``add`` or ``del``. | + +--------+--------+---------------------------------------------------------------+ + | port | string | port id. port id is the form {interface_type}:{interface_id}. | + +--------+--------+---------------------------------------------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -339,22 +384,32 @@ Add a patch. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-------------+ -| Name | Type | Description | -+===========+=========+=============+ -| client_id | integer | client id. | -+-----------+---------+-------------+ +.. _table_spp_ctl_spp_nfv_patches_get: + +.. table:: Request params of patches of spp_nfv or spp_vm. + + +-----------+---------+---------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+=================================+ + | client_id | integer | client id. | + +-----------+---------+---------------------------------+ Request(body) ^^^^^^^^^^^^^ -+------+--------+----------------------+ -| Name | Type | Description | -+======+========+======================+ -| src | string | source port id. | -+------+--------+----------------------+ -| dst | string | destination port id. | -+------+--------+----------------------+ +.. _table_spp_ctl_spp_nfv_ports_patches_body: + +.. table:: Request body params of patches of spp_nfv or spp_vm. + + +------+--------+------------------------------------+ + | Name | Type | Description | + | | | | + +======+========+====================================+ + | src | string | source port id. | + +------+--------+------------------------------------+ + | dst | string | destination port id. | + +------+--------+------------------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -389,11 +444,16 @@ Reset patches. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-------------+ -| Name | Type | Description | -+===========+=========+=============+ -| client_id | integer | client id. | -+-----------+---------+-------------+ +.. _table_spp_ctl_spp_nfv_del_patches: + +.. table:: Request params of deleting patches of spp_nfv or spp_vm. + + +-----------+---------+---------------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+=======================================+ + | client_id | integer | client id. | + +-----------+---------+---------------------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -430,11 +490,16 @@ Get the information of the ``spp_vf`` process. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-------------+ -| Name | Type | Description | -+===========+=========+=============+ -| client_id | integer | client id. | -+-----------+---------+-------------+ +.. _table_spp_ctl_vfs_get: + +.. table:: Request parameter for getting spp_vf. + + +-----------+---------+--------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+==========================+ + | client_id | integer | client id. | + +-----------+---------+--------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -447,67 +512,92 @@ Request example Response ^^^^^^^^ -+------------------+---------+-----------------------------------------------+ -| Name | Type | Description | -+==================+=========+===============================================+ -| client-id | integer | client id. | -+------------------+---------+-----------------------------------------------+ -| ports | array | an array of port ids used by the process. | -+------------------+---------+-----------------------------------------------+ -| components | array | an array of component objects in the process. | -+------------------+---------+-----------------------------------------------+ -| classifier_table | array | an array of classifier tables in the process. | -+------------------+---------+-----------------------------------------------+ +.. _table_spp_ctl_spp_vf_res: + +.. table:: Response params of getting spp_vf. + + +------------------+---------+-----------------------------------------------+ + | Name | Type | Description | + | | | | + +==================+=========+===============================================+ + | client-id | integer | client id. | + +------------------+---------+-----------------------------------------------+ + | ports | array | an array of port ids used by the process. | + +------------------+---------+-----------------------------------------------+ + | components | array | an array of component objects in the process. | + +------------------+---------+-----------------------------------------------+ + | classifier_table | array | an array of classifier tables in the process. | + +------------------+---------+-----------------------------------------------+ component object: -+---------+---------+---------------------------------------------------------------------+ -| Name | Type | Description | -+=========+=========+=====================================================================+ -| core | integer | core id running on the component | -+---------+---------+---------------------------------------------------------------------+ -| name | string | an array of port ids used by the process. | -+---------+---------+---------------------------------------------------------------------+ -| type | string | an array of component objects in the process. | -+---------+---------+---------------------------------------------------------------------+ -| rx_port | array | an array of port objects connected to the rx side of the component. | -+---------+---------+---------------------------------------------------------------------+ -| tx_port | array | an array of port objects connected to the tx side of the component. | -+---------+---------+---------------------------------------------------------------------+ +.. _table_spp_ctl_spp_vf_res_comp: + +.. table:: Component objects of getting spp_vf. + + +---------+---------+---------------------------------------------------------------------+ + | Name | Type | Description | + | | | | + +=========+=========+=====================================================================+ + | core | integer | core id running on the component | + +---------+---------+---------------------------------------------------------------------+ + | name | string | an array of port ids used by the process. | + +---------+---------+---------------------------------------------------------------------+ + | type | string | an array of component objects in the process. | + +---------+---------+---------------------------------------------------------------------+ + | rx_port | array | an array of port objects connected to the rx side of the component. | + +---------+---------+---------------------------------------------------------------------+ + | tx_port | array | an array of port objects connected to the tx side of the component. | + +---------+---------+---------------------------------------------------------------------+ port object: -+---------+---------+---------------------------------------------------------------+ -| Name | Type | Description | -+=========+=========+===============================================================+ -| port | string | port id. port id is the form {interface_type}:{interface_id}. | -+---------+---------+---------------------------------------------------------------+ -| vlan | object | vlan operation which is applied to the port. | -+---------+---------+---------------------------------------------------------------+ +.. _table_spp_ctl_spp_vf_res_port: + +.. table:: Port objects of getting spp_vf. + + +---------+---------+---------------------------------------------------------------+ + | Name | Type | Description | + | | | | + +=========+=========+===============================================================+ + | port | string | port id. port id is the form {interface_type}:{interface_id}. | + +---------+---------+---------------------------------------------------------------+ + | vlan | object | vlan operation which is applied to the port. | + +---------+---------+---------------------------------------------------------------+ vlan object: -+-----------+---------+-------------------------------+ -| Name | Type | Description | -+===========+=========+===============================+ -| operation | string | ``add``, ``del`` or ``none``. | -+-----------+---------+-------------------------------+ -| id | integer | vlan id. | -+-----------+---------+-------------------------------+ -| pcp | integer | vlan pcp. | -+-----------+---------+-------------------------------+ +.. _table_spp_ctl_spp_vf_res_vlan: + +.. table:: Vlan objects of getting spp_vf. + + +-----------+---------+-------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+===============================+ + | operation | string | ``add``, ``del`` or ``none``. | + +-----------+---------+-------------------------------+ + | id | integer | vlan id. | + +-----------+---------+-------------------------------+ + | pcp | integer | vlan pcp. | + +-----------+---------+-------------------------------+ classifier table: -+-----------+--------+------------------------------------------------------------+ -| Name | Type | Description | -+===========+========+============================================================+ -| type | string | ``mac`` or ``vlan``. | -+-----------+--------+------------------------------------------------------------+ -| value | string | mac_address for ``mac``, vlan_id/mac_address for ``vlan``. | -+-----------+--------+------------------------------------------------------------+ -| port | string | port id applied to classify. | -+-----------+--------+------------------------------------------------------------+ +.. _table_spp_ctl_spp_vf_res_vlan: + +.. table:: Vlan objects of getting spp_vf. + + +-----------+--------+------------------------------------------------------------+ + | Name | Type | Description | + | | | | + +===========+========+============================================================+ + | type | string | ``mac`` or ``vlan``. | + +-----------+--------+------------------------------------------------------------+ + | value | string | mac_address for ``mac``, vlan_id/mac_address for ``vlan``. | + +-----------+--------+------------------------------------------------------------+ + | port | string | port id applied to classify. | + +-----------+--------+------------------------------------------------------------+ Response example ^^^^^^^^^^^^^^^^ @@ -635,25 +725,34 @@ Start the component. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-------------+ -| Name | Type | Description | -+===========+=========+=============+ -| client_id | integer | client id. | -+-----------+---------+-------------+ +.. _table_spp_ctl_spp_vf_components: + +.. table:: Request params of components of spp_vf. + + +-----------+---------+-------------+ + | Name | Type | Description | + +===========+=========+=============+ + | client_id | integer | client id. | + +-----------+---------+-------------+ Request(body) ^^^^^^^^^^^^^ -+-----------+---------+----------------------------------------------------------------------+ -| Name | Type | Description | -+===========+=========+======================================================================+ -| name | string | component name. must be unique in the process. | -+-----------+---------+----------------------------------------------------------------------+ -| core | integer | core id. | -+-----------+---------+----------------------------------------------------------------------+ -| type | string | component type. one of ``forward``, ``merge`` or ``classifier_mac``. | -+-----------+---------+----------------------------------------------------------------------+ +.. _table_spp_ctl_spp_vf_components_res: + +.. table:: Response params of components of spp_vf. + + +-----------+---------+----------------------------------------------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+======================================================================+ + | name | string | component name. must be unique in the process. | + +-----------+---------+----------------------------------------------------------------------+ + | core | integer | core id. | + +-----------+---------+----------------------------------------------------------------------+ + | type | string | component type. one of ``forward``, ``merge`` or ``classifier_mac``. | + +-----------+---------+----------------------------------------------------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -688,13 +787,18 @@ Stop the component. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-----------------+ -| Name | Type | Description | -+===========+=========+=================+ -| client_id | integer | client id. | -+-----------+---------+-----------------+ -| name | string | component name. | -+-----------+---------+-----------------+ +.. _table_spp_ctl_spp_vf_del: + +.. table:: Request params of deleting component of spp_vf. + + +-----------+---------+---------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+=================================+ + | client_id | integer | client id. | + +-----------+---------+---------------------------------+ + | name | string | component name. | + +-----------+---------+---------------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -728,40 +832,55 @@ Add or Delete port to the component. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-----------------+ -| Name | Type | Description | -+===========+=========+=================+ -| client_id | integer | client id. | -+-----------+---------+-----------------+ -| name | string | component name. | -+-----------+---------+-----------------+ +.. _table_spp_ctl_spp_vf_comp_port: + +.. table:: Request params for ports of component of spp_vf. + + +-----------+---------+---------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+===========================+ + | client_id | integer | client id. | + +-----------+---------+---------------------------+ + | name | string | component name. | + +-----------+---------+---------------------------+ Request(body) ^^^^^^^^^^^^^ -+---------+---------+-----------------------------------------------------------------+ -| Name | Type | Description | -+=========+=========+=================================================================+ -| action | string | ``attach`` or ``detach``. | -+---------+---------+-----------------------------------------------------------------+ -| port | string | port id. port id is the form {interface_type}:{interface_id}. | -+---------+---------+-----------------------------------------------------------------+ -| dir | string | ``rx`` or ``tx``. | -+---------+---------+-----------------------------------------------------------------+ -| vlan | object | vlan operation which is applied to the port. it can be omitted. | -+---------+---------+-----------------------------------------------------------------+ +.. _table_spp_ctl_spp_vf_comp_port_body: + +.. table:: Request body params for ports of component of spp_vf. + + +---------+---------+-----------------------------------------------------------------+ + | Name | Type | Description | + | | | | + +=========+=========+=================================================================+ + | action | string | ``attach`` or ``detach``. | + +---------+---------+-----------------------------------------------------------------+ + | port | string | port id. port id is the form {interface_type}:{interface_id}. | + +---------+---------+-----------------------------------------------------------------+ + | dir | string | ``rx`` or ``tx``. | + +---------+---------+-----------------------------------------------------------------+ + | vlan | object | vlan operation which is applied to the port. it can be omitted. | + +---------+---------+-----------------------------------------------------------------+ vlan object: -+-----------+---------+----------------------------------------------------------+ -| Name | Type | Description | -+===========+=========+==========================================================+ -| operation | string | ``add``, ``del`` or ``none``. | -+-----------+---------+----------------------------------------------------------+ -| id | integer | vlan id. ignored when operation is ``del`` or ``none``. | -+-----------+---------+----------------------------------------------------------+ -| pcp | integer | vlan pcp. ignored when operation is ``del`` or ``none``. | -+-----------+---------+----------------------------------------------------------+ +.. _table_spp_ctl_spp_vf_comp_port_body_vlan: + +.. table:: Request body params for vlan ports of component of spp_vf. + + +-----------+---------+----------------------------------------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+==========================================================+ + | operation | string | ``add``, ``del`` or ``none``. | + +-----------+---------+----------------------------------------------------------+ + | id | integer | vlan id. ignored when operation is ``del`` or ``none``. | + +-----------+---------+----------------------------------------------------------+ + | pcp | integer | vlan pcp. ignored when operation is ``del`` or ``none``. | + +-----------+---------+----------------------------------------------------------+ Request example ^^^^^^^^^^^^^^^ @@ -811,28 +930,38 @@ Set or Unset classifier table. Request(path) ^^^^^^^^^^^^^ -+-----------+---------+-------------+ -| Name | Type | Description | -+===========+=========+=============+ -| client_id | integer | client id. | -+-----------+---------+-------------+ +.. _table_spp_ctl_spp_vf_cls_table: + +.. table:: Request params for classifier_table of spp_vf. + + +-----------+---------+---------------------------+ + | Name | Type | Description | + | | | | + +===========+=========+===========================+ + | client_id | integer | client id. | + +-----------+---------+---------------------------+ Request(body) ^^^^^^^^^^^^^ -+-------------+-----------------+----------------------------------------------------+ -| Name | Type | Description | -+=============+=================+====================================================+ -| action | string | ``add`` or ``del``. | -+-------------+-----------------+----------------------------------------------------+ -| type | string | ``mac`` or ``vlan``. | -+-------------+-----------------+----------------------------------------------------+ -| vlan | integer or null | vlan id for ``vlan``. null or omitted for ``mac``. | -+-------------+-----------------+----------------------------------------------------+ -| mac_address | string | mac address. | -+-------------+-----------------+----------------------------------------------------+ -| port | string | port id. | -+-------------+-----------------+----------------------------------------------------+ +.. _table_spp_ctl_spp_vf_cls_table_body: + +.. table:: Request body params for classifier_table of spp_vf. + + +-------------+-----------------+----------------------------------------------------+ + | Name | Type | Description | + | | | | + +=============+=================+====================================================+ + | action | string | ``add`` or ``del``. | + +-------------+-----------------+----------------------------------------------------+ + | type | string | ``mac`` or ``vlan``. | + +-------------+-----------------+----------------------------------------------------+ + | vlan | integer or null | vlan id for ``vlan``. null or omitted for ``mac``. | + +-------------+-----------------+----------------------------------------------------+ + | mac_address | string | mac address. | + +-------------+-----------------+----------------------------------------------------+ + | port | string | port id. | + +-------------+-----------------+----------------------------------------------------+ Request example ^^^^^^^^^^^^^^^ -- 2.17.1