:orphan: .. index:: pair: group; TAPI for RTE EAL API remote calls .. _doxid-group__te__lib__rpc__rte__eal: TAPI for RTE EAL API remote calls ================================= .. toctree:: :hidden: struct_lcore_mask_t.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef struct :ref:`lcore_mask_t` :target:`lcore_mask_t`; // structs struct :ref:`lcore_mask_t`; // global functions :ref:`te_errno` :ref:`tapi_rte_lcore_mask_set_bit`(:ref:`lcore_mask_t`* mask, unsigned int bit); int :ref:`rpc_rte_eal_init`(:ref:`rcf_rpc_server`* rpcs, int argc, char** argv); :ref:`te_errno` :ref:`tapi_rte_make_eal_args`(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs, const char* program_name, const :ref:`lcore_mask_t`* lcore_mask_override, int argc, const char** argv, int* out_argc, char*** out_argv); :ref:`te_errno` :ref:`tapi_rte_eal_init`(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs, int argc, const char** argv); :ref:`te_errno` :ref:`tapi_rte_eal_fini`(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs); const char* :ref:`tarpc_rte_proc_type_t2str`(enum :ref:`tarpc_rte_proc_type_t` val); enum :ref:`tarpc_rte_proc_type_t` :ref:`rpc_rte_eal_process_type`(:ref:`rcf_rpc_server`* rpcs); int :ref:`rpc_dpdk_get_version`(:ref:`rcf_rpc_server`* rpcs); int :ref:`rpc_rte_eal_hotplug_add`(:ref:`rcf_rpc_server`* rpcs, const char* busname, const char* devname, const char* devargs); :ref:`te_errno` :ref:`tapi_rte_eal_hotplug_add`(:ref:`rcf_rpc_server`* rpcs, const char* busname, const char* devname, const char* devargs); int :ref:`rpc_rte_eal_hotplug_remove`(:ref:`rcf_rpc_server`* rpcs, const char* busname, const char* devname); :ref:`te_errno` :ref:`tapi_rte_eal_hotplug_remove`(:ref:`rcf_rpc_server`* rpcs, const char* busname, const char* devname); int :ref:`rpc_rte_epoll_wait`(:ref:`rcf_rpc_server`* rpcs, int epfd, struct :ref:`tarpc_rte_epoll_event`* events, int maxevents, int timeout); :ref:`te_errno` :ref:`tapi_rte_get_dev_args`(const char* ta, const char* vendor, const char* device, char** arg_list); :ref:`te_errno` :ref:`tapi_rte_get_nb_required_service_cores`(const char* ta, const char* vendor, const char* device, unsigned int* nb_cores); :ref:`te_errno` :ref:`tapi_eal_get_nb_required_service_cores_rpcs`(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs, unsigned int* nb_cores); :ref:`te_errno` :ref:`tapi_rte_get_dev_args_by_pci_addr`(const char* ta, const char* pci_addr, char** arg_list); :ref:`te_errno` :ref:`tapi_rte_get_numa_node`(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs, int* numa_node); .. _details-group__te__lib__rpc__rte__eal: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Global Functions ---------------- .. index:: pair: function; tapi_rte_lcore_mask_set_bit .. _doxid-group__te__lib__rpc__rte__eal_1ga46d8192f1e9a18355062ca1fbe79d18e: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_lcore_mask_set_bit(:ref:`lcore_mask_t`* mask, unsigned int bit) Set bit in a lcore mask .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - mask - lcore mask * - bit - Bit number (0 is lsb) .. rubric:: Returns: Status code. .. index:: pair: function; rpc_rte_eal_init .. _doxid-group__te__lib__rpc__rte__eal_1ga6a850e61d795cf73271c9a4798454861: .. ref-code-block:: cpp :class: doxyrest-title-code-block int rpc_rte_eal_init(:ref:`rcf_rpc_server`* rpcs, int argc, char** argv) **rte_eal_init()** RPC. If error is not expected using :ref:`RPC_AWAIT_IUT_ERROR() `, the function jumps out in the case of failure. .. index:: pair: function; tapi_rte_make_eal_args .. _doxid-group__te__lib__rpc__rte__eal_1gabd59fde81ea24fb7c8a60498316168df: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_make_eal_args(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs, const char* program_name, const :ref:`lcore_mask_t`* lcore_mask_override, int argc, const char** argv, int* out_argc, char*** out_argv) Allocate EAL argument vector in accordance with environment binding. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Environment binding * - rpcs - RPC server handle * - program_name - Name of a program (``NULL`` means use RPC server name) * - lcore_mask_override - Lcore mask to use (``NULL`` means use the mask from local DPDK configurator tree) * - argc - Number of additional EAL arguments * - argv - Additional EAL arguments .. rubric:: Returns: Status code. .. index:: pair: function; tapi_rte_eal_init .. _doxid-group__te__lib__rpc__rte__eal_1ga70a61f1d2d3a2d36e11d4d19467aef29: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_eal_init(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs, int argc, const char** argv) Initialize EAL library in accordance with environment binding. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Environment binding * - rpcs - RPC server handle * - argc - Number of additional EAL arguments * - argv - Additional EAL arguments .. rubric:: Returns: Status code. .. index:: pair: function; tapi_rte_eal_fini .. _doxid-group__te__lib__rpc__rte__eal_1ga7f2f307ee461f977a47672236d6f9eff: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_eal_fini(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs) Deinitialize resources allocated on :ref:`tapi_rte_eal_init() `. WARNING: In order to deinitialize EAL completely, RPC server is restarted by the function (if it is required). .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Environment binding * - rpcs - RPC server handle .. rubric:: Returns: Status code. .. index:: pair: function; tarpc_rte_proc_type_t2str .. _doxid-group__te__lib__rpc__rte__eal_1ga4d1b3ddbc08aa38a0c527616c588bd57: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char* tarpc_rte_proc_type_t2str(enum :ref:`tarpc_rte_proc_type_t` val) Map RTE EAL process type to string. .. index:: pair: function; rpc_rte_eal_process_type .. _doxid-group__te__lib__rpc__rte__eal_1ga755b837f59b205ba8c0cdebaae6c45dc: .. ref-code-block:: cpp :class: doxyrest-title-code-block enum :ref:`tarpc_rte_proc_type_t` rpc_rte_eal_process_type(:ref:`rcf_rpc_server`* rpcs) rte_eal_process_type() RPC. If error is not expected using :ref:`RPC_AWAIT_IUT_ERROR() `, the function jumps out in the case of unknown process type returned. .. index:: pair: function; rpc_dpdk_get_version .. _doxid-group__te__lib__rpc__rte__eal_1gaee248114d7a9306ec5d230ea28d0fca5: .. ref-code-block:: cpp :class: doxyrest-title-code-block int rpc_dpdk_get_version(:ref:`rcf_rpc_server`* rpcs) Get DPDK version (4 components combined in a single number). WARNING: This RPC is a compelled elaboration to cope with drastic differences amongst DPDK versions. The engineer has to think meticulously before attempting to use this RPC for any new code. .. rubric:: Returns: DPDK version. .. index:: pair: function; rpc_rte_eal_hotplug_add .. _doxid-group__te__lib__rpc__rte__eal_1ga46244854d9771c011a4dd028b217e119: .. ref-code-block:: cpp :class: doxyrest-title-code-block int rpc_rte_eal_hotplug_add(:ref:`rcf_rpc_server`* rpcs, const char* busname, const char* devname, const char* devargs) rte_eal_hotplug_add() RPC .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - busname - Bus name for the device to be added to * - devname - Device name to undergo identification and probing * - devargs - Device arguments to be passed to the driver .. rubric:: Returns: ``0`` on success; jumps out on error (negative value). .. index:: pair: function; tapi_rte_eal_hotplug_add .. _doxid-group__te__lib__rpc__rte__eal_1ga5b13be1b53a35784e7b814a56a50bc48: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_eal_hotplug_add(:ref:`rcf_rpc_server`* rpcs, const char* busname, const char* devname, const char* devargs) Wrapper for :ref:`rpc_rte_eal_hotplug_add() ` that also resets cached value of EAL arguments in the configurator. The reset is almost always required since hotplug changes the EAL configuration and it interferes with :ref:`dpdk_reuse_rpcs() `. .. index:: pair: function; rpc_rte_eal_hotplug_remove .. _doxid-group__te__lib__rpc__rte__eal_1ga94130c6a79f0a556fe0165474422d27e: .. ref-code-block:: cpp :class: doxyrest-title-code-block int rpc_rte_eal_hotplug_remove(:ref:`rcf_rpc_server`* rpcs, const char* busname, const char* devname) rte_eal_hotplug_remove() RPC .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - busname - Bus name for the device to be removed from * - devname - Device name .. rubric:: Returns: ``0`` on success; jumps out on error (negative value). .. index:: pair: function; tapi_rte_eal_hotplug_remove .. _doxid-group__te__lib__rpc__rte__eal_1gadf1dd9fb3d27d55fb7fc3723f85404fd: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_eal_hotplug_remove(:ref:`rcf_rpc_server`* rpcs, const char* busname, const char* devname) Wrapper for :ref:`rpc_rte_eal_hotplug_remove() ` that also resets cached value of EAL arguments in the configurator. The reset is almost always required since hotplug changes the EAL configuration and it interferes with :ref:`dpdk_reuse_rpcs() `. .. index:: pair: function; rpc_rte_epoll_wait .. _doxid-group__te__lib__rpc__rte__eal_1ga967c4f311ab11811811966d6a29d37b6: .. ref-code-block:: cpp :class: doxyrest-title-code-block int rpc_rte_epoll_wait(:ref:`rcf_rpc_server`* rpcs, int epfd, struct :ref:`tarpc_rte_epoll_event`* events, int maxevents, int timeout) **rte_epoll_wait()** RPC If error is not expected using :ref:`RPC_AWAIT_IUT_ERROR() `, the function jumps out in the case of failure. .. index:: pair: function; tapi_rte_get_dev_args .. _doxid-group__te__lib__rpc__rte__eal_1ga7b18598a6c6f72df3b6273f5696e3a7c: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_get_dev_args(const char* ta, const char* vendor, const char* device, char** arg_list) Get device arguments of a PCI device. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - vendor - PCI vendor identifier * - device - PCI device identifier * - arg_list - Device arguments, must not be ``NULL``, on success points to comma-separated string or to ``NULL``. .. rubric:: Returns: Status code .. index:: pair: function; tapi_rte_get_nb_required_service_cores .. _doxid-group__te__lib__rpc__rte__eal_1ga23ac8ddd670faa614b5dc93134e9d432: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_get_nb_required_service_cores(const char* ta, const char* vendor, const char* device, unsigned int* nb_cores) Get required number of service cores for a PCI device. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - vendor - PCI vendor identifier * - device - PCI device identifier * - nb_cores - Required number of service cores .. rubric:: Returns: Status code .. index:: pair: function; tapi_eal_get_nb_required_service_cores_rpcs .. _doxid-group__te__lib__rpc__rte__eal_1ga215d22eb4817f2005e5c39b756ff8acb: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_eal_get_nb_required_service_cores_rpcs(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs, unsigned int* nb_cores) Get required number of service cores for PCI devices specified in an environment for an RPC server. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Test environment * - rpcs - RPC server * - nb_cores - Required number of service cores .. rubric:: Returns: Status code .. index:: pair: function; tapi_rte_get_dev_args_by_pci_addr .. _doxid-group__te__lib__rpc__rte__eal_1gae2a24c7f52049a13542d104699cfcb9d: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_get_dev_args_by_pci_addr(const char* ta, const char* pci_addr, char** arg_list) Wrapper for :ref:`tapi_rte_get_dev_args() ` that accepts PCI address (BDF notation) .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name * - pci_addr - PCI address of a device * - arg_list - Device arguments, must not be ``NULL``, on success points to comma-separated string or to ``NULL``. .. rubric:: Returns: Status code .. index:: pair: function; tapi_rte_get_numa_node .. _doxid-group__te__lib__rpc__rte__eal_1gaf6eca7d6769fdc3c8b1d482777a80b39: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_rte_get_numa_node(:ref:`tapi_env`* env, :ref:`rcf_rpc_server`* rpcs, int* numa_node) Get NUMA node assigned to the PCI devices specified in the environment for an RPC server. If there is multiple devices, the common to all devices NUMA node is returned or ``-1``. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - env - Test environment * - rpcs - RPC server * - numa_node - Assigned NUMA node .. rubric:: Returns: Status code