:orphan: .. index:: pair: group; Open vSwitch .. _doxid-group__tapi__conf__ovs: Open vSwitch ============ .. toctree:: :hidden: enum_tapi_cfg_ovs_cfg_type.rst struct_tapi_cfg_ovs_cfg.rst Overview ~~~~~~~~ .. ref-code-block:: cpp :class: doxyrest-overview-code-block // typedefs typedef enum :ref:`tapi_cfg_ovs_cfg_type` :ref:`tapi_cfg_ovs_cfg_type`; typedef struct :ref:`tapi_cfg_ovs_cfg` :ref:`tapi_cfg_ovs_cfg`; // enums enum :ref:`tapi_cfg_ovs_cfg_type`; // structs struct :ref:`tapi_cfg_ovs_cfg`; // global variables const char*const :ref:`tapi_cfg_ovs_cfg_name`[]; // global functions :ref:`te_errno` :ref:`tapi_cfg_ovs_convert_eal_args`(int argc, const char*const* argv, :ref:`tapi_cfg_ovs_cfg`* ovs_cfg); :ref:`te_errno` :ref:`tapi_cfg_ovs_default_bridge`(const char* ta, char** bridge); :ref:`te_errno` :ref:`tapi_cfg_ovs_clear_rules`(const char* ta, const char* bridge); :ref:`te_errno` :ref:`tapi_cfg_ovs_add_rule`(const char* ta, const char* bridge, uint64_t* cookie, const char* fmt, ...); :ref:`te_errno` :ref:`tapi_cfg_ovs_flow_rule_get`(const char* ta, const char* bridge, uint64_t cookie, :ref:`ovs_flow_rule`* rule); :ref:`te_errno` :ref:`tapi_cfg_ovs_del_rule`(const char* ta, const char* bridge, uint64_t cookie); .. _details-group__tapi__conf__ovs: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Typedefs -------- .. index:: pair: typedef; tapi_cfg_ovs_cfg_type .. _doxid-group__tapi__conf__ovs_1ga174c6f879cfd87553b01efee8dcce8a5: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef enum :ref:`tapi_cfg_ovs_cfg_type` tapi_cfg_ovs_cfg_type Configuration entry type, see tapi_cfg_ovs_cfg_name for details .. index:: pair: typedef; tapi_cfg_ovs_cfg .. _doxid-group__tapi__conf__ovs_1gafb2dc8d2a9e66f7b02072b261f196f6f: .. ref-code-block:: cpp :class: doxyrest-title-code-block typedef struct :ref:`tapi_cfg_ovs_cfg` tapi_cfg_ovs_cfg Open vSwitch Configuration entry array Global Variables ---------------- .. index:: pair: variable; tapi_cfg_ovs_cfg_name .. _doxid-group__tapi__conf__ovs_1ga565ae5d17fb5c55be98577251b439e98: .. ref-code-block:: cpp :class: doxyrest-title-code-block const char*const tapi_cfg_ovs_cfg_name[] Configuration entry name. Names correspond to Open vSwitch configuration entries. Global Functions ---------------- .. index:: pair: function; tapi_cfg_ovs_convert_eal_args .. _doxid-group__tapi__conf__ovs_1gac9517ceb996370de616e6052818b17f8: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_ovs_convert_eal_args(int argc, const char*const* argv, :ref:`tapi_cfg_ovs_cfg`* ovs_cfg) Convert raw DPDK EAL arguments into Open vSwitch configuration entries. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - argc - Number of arguments * - argv - EAL arguments * - ovs_cfg - Open vSwitch configuraion .. rubric:: Returns: Status code .. index:: pair: function; tapi_cfg_ovs_default_bridge .. _doxid-group__tapi__conf__ovs_1ga3ebf631fdc17436f683bc5cdb3d56a58: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_ovs_default_bridge(const char* ta, char** bridge) Find the name of the OvS bridge that's running on the given agent. This function assumes there is only one bridge. The memory for the name is allocated by this function and needs to be freed by the user. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - bridge - Where the bridge name should be stored. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_ovs_clear_rules .. _doxid-group__tapi__conf__ovs_1gaf97e8089a5bce36d30230c1c22252c58: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_ovs_clear_rules(const char* ta, const char* bridge) Remove all flow rules from the given OvS bridge. Only flow rules that are visible to TE will be removed, all hidden flows will still be present after this function is called. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - bridge - Bridge name. If NULL, use default bridge. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_ovs_add_rule .. _doxid-group__tapi__conf__ovs_1ga94ccee6b5a6795b868db88103b39e660: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_ovs_add_rule(const char* ta, const char* bridge, uint64_t* cookie, const char* fmt, ...) Add a flow rule to the given OvS bridge. Flow cookie will be generated by the function and may be used by the user to refer to the rule later. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - bridge - Bridge name. If NULL, use default bridge. * - cookie - Where to store the new flow's cookie. * - fmt - Format string that defines the flow rule. * - ... - Additional arguments for the format string. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_ovs_flow_rule_get .. _doxid-group__tapi__conf__ovs_1gaae7b500bc8d668268777f5bc0622c722: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_ovs_flow_rule_get(const char* ta, const char* bridge, uint64_t cookie, :ref:`ovs_flow_rule`* rule) Get the descriptor structure for the flow rule defined by the given Open vSwitch bridge and cookie. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - bridge - Bridge name. If NULL, use default bridge. * - cookie - Flow cookie. * - rule - Flow rule descriptor structure. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_ovs_del_rule .. _doxid-group__tapi__conf__ovs_1ga873ef5cfbd0f6f8ce35467b5c1bd5f76: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_ovs_del_rule(const char* ta, const char* bridge, uint64_t cookie) Remove a flow rule from the given OvS bridge. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test Agent name. * - bridge - Bridge name. If NULL, use default bridge. * - cookie - Cookie of the flow to be removed. .. rubric:: Returns: Status code.