:orphan: .. index:: pair: group; Interface interrupts configuration .. _doxid-group__tapi__conf__irq: Interface interrupts configuration ================================== .. toctree:: :hidden: Overview ~~~~~~~~ Query and change the SMP affinity of the interrupts of a network interface. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block // global functions :ref:`te_errno` :ref:`tapi_cfg_irq_affinity_get`(const char* ta, const char* if_name, unsigned int irq, char** cpu_list); :ref:`te_errno` :ref:`tapi_cfg_irq_affinity_set`(const char* ta, const char* if_name, unsigned int irq, const char* cpu_list); :ref:`te_errno` :ref:`tapi_cfg_irq_affinity_set_all`(const char* ta, const char* if_name, const char* cpu_list); :ref:`te_errno` :ref:`tapi_cfg_irq_affinity_mask_get`(const char* ta, const char* if_name, unsigned int irq, uint64_t* mask); :ref:`te_errno` :ref:`tapi_cfg_irq_affinity_mask_set`(const char* ta, const char* if_name, unsigned int irq, uint64_t mask); :ref:`te_errno` :ref:`tapi_cfg_irq_affinity_mask_set_all`(const char* ta, const char* if_name, uint64_t mask); .. _details-group__tapi__conf__irq: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Query and change the SMP affinity of the interrupts of a network interface. Affinity is expressed in two interchangeable ways: * as a CPU list in the Linux kernel syntax, e.g. ``"0-3,8"``, which places no limit on the number of CPUs; * as a 64-bit mask, which is easier to compute in a test but cannot address CPUs numbered 64 and above. Global Functions ---------------- .. index:: pair: function; tapi_cfg_irq_affinity_get .. _doxid-group__tapi__conf__irq_1gaa360874678c9706e2fe3182bb9f78787: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_irq_affinity_get(const char* ta, const char* if_name, unsigned int irq, char** cpu_list) Get the affinity of a single IRQ as a CPU list. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test agent name. * - if_name - Interface name. * - irq - IRQ number. * - cpu_list - CPU list in the Linux kernel syntax, e.g. ``"0-3,8"``. The caller owns the string and should free() it. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_irq_affinity_set .. _doxid-group__tapi__conf__irq_1ga787b084bd53f9619df2b3cecf41366d3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_irq_affinity_set(const char* ta, const char* if_name, unsigned int irq, const char* cpu_list) Set the affinity of a single IRQ from a CPU list. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test agent name. * - if_name - Interface name. * - irq - IRQ number. * - cpu_list - CPU list in the Linux kernel syntax, e.g. ``"0-3,8"``. Must not be empty. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_irq_affinity_set_all .. _doxid-group__tapi__conf__irq_1gaf38870a83fdb7b296672ff8a1344855f: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_irq_affinity_set_all(const char* ta, const char* if_name, const char* cpu_list) Set the affinity of every IRQ of an interface from a CPU list. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test agent name. * - if_name - Interface name. * - cpu_list - CPU list in the Linux kernel syntax, e.g. ``"0-3,8"``. Must not be empty. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_irq_affinity_mask_get .. _doxid-group__tapi__conf__irq_1gaa438d041843fb4d262ccd22db1980ffa: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_irq_affinity_mask_get(const char* ta, const char* if_name, unsigned int irq, uint64_t* mask) Get the affinity of a single IRQ as a 64-bit mask. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test agent name. * - if_name - Interface name. * - irq - IRQ number. * - mask - Affinity mask, bit ``N`` set iff CPU ``N`` may handle the interrupt. * - TE_ERANGE - The IRQ is allowed on a CPU numbered 64 or above, so the affinity does not fit into a 64-bit mask. Use :ref:`tapi_cfg_irq_affinity_get() ` instead. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_irq_affinity_mask_set .. _doxid-group__tapi__conf__irq_1gac457c9b28c4aff95a6b04158e3924f91: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_irq_affinity_mask_set(const char* ta, const char* if_name, unsigned int irq, uint64_t mask) Set the affinity of a single IRQ from a 64-bit mask. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test agent name. * - if_name - Interface name. * - irq - IRQ number. * - mask - Affinity mask, bit ``N`` set iff CPU ``N`` may handle the interrupt. Must not be zero. .. rubric:: Returns: Status code. .. index:: pair: function; tapi_cfg_irq_affinity_mask_set_all .. _doxid-group__tapi__conf__irq_1ga04ce0802674468788c1a92a6f8eb0546: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`te_errno` tapi_cfg_irq_affinity_mask_set_all(const char* ta, const char* if_name, uint64_t mask) Set the affinity of every IRQ of an interface from a 64-bit mask. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - ta - Test agent name. * - if_name - Interface name. * - mask - Affinity mask, bit ``N`` set iff CPU ``N`` may handle the interrupt. Must not be zero. .. rubric:: Returns: Status code.