rte_pmd_mlx5.h(3)
๐ฆ rte_pmd_mlx5.h โ Library Functions Manual, but make it cute ๐ฆ
okay bestie, this is part 1 of 3 of the manual page for rte_pmd_mlx5.h, straight out of the Library Functions Manual. It's the MLX5 public header, and it's literally giving "private PMD dynamic flags" main character energy. iykyk ๐
โจ SYNOPSIS โจ
#include <stdint.h>
#include <rte_byteorder.h>
#include <rte_compat.h>
#include <rte_flow.h>
#include <rte_per_lcore.h>
๐งธ Data Structures
struct rte_pmd_mlx5_geneve_tlvstruct rte_pmd_mlx5_driver_event_cb_queue_infostruct rte_pmd_mlx5_driver_event_cb_info
๐ Macros
#define RTE_PMD_MLX5_DOMAIN_BIT_NIC_RX (1 << 0)โ NIC RX domain bit mask, slay.#define RTE_PMD_MLX5_DOMAIN_BIT_NIC_TX (1 << 1)โ NIC TX domain bit mask, periodt.#define RTE_PMD_MLX5_DOMAIN_BIT_FDB (1 << 2)โ FDB (TX + RX) domain bit mask, iconic.#define RTE_PMD_MLX5_EXTERNAL_RX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)โ External Rx queuerte_flowindex minimal value.#define MLX5_EXTERNAL_TX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)โ External Tx queuerte_flowindex minimal value.#define RTE_PMD_MLX5_LINEAR_HASH_TAG_INDEX 255โ Tag level to set the linear hash index.#define RTE_PMD_MLX5_HOST_SHAPER_FLAG_AVAIL_THRESH_TRIGGERED 0โ The rate of the host port shaper will be updated directly at the next available descriptor threshold event to the rate that comes with this flag set; set rate0to disable this rate update. Unset this flag to update the rate of the host port shaper directly in the API call; use rate0to disable the current shaper.#define RTE_PMD_MLX5_FLOW_ENGINE_FLAG_STANDBY_DUP_INGRESS RTE_BIT32(0)โ When set on the flow engine of a standby process, ingress flow rules will be effective in active and standby processes, so the ingress traffic may be duplicated. heads up, bestie ๐ซถ
๐ Typedefs
typedef void(* rte_pmd_mlx5_driver_event_callback_t) (uint16_t port_id,
const struct rte_pmd_mlx5_driver_event_cb_info *info, const void
*opaque)
Prototype of the callback called on mlx5 driver events.
๐ฅ Enumerations
enum rte_pmd_mlx5_driver_event_cb_type {
RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_RXQ_CREATE,
RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_RXQ_DESTROY,
RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_TXQ_CREATE,
RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_TXQ_DESTROY }
๐ Functions
__rte_experimental int rte_pmd_mlx5_get_dyn_flag_names (char *names[], unsigned int n)__rte_experimental int rte_pmd_mlx5_sync_flow (uint16_t port_id, uint32_t domains)__rte_experimental int rte_pmd_mlx5_external_rx_queue_id_map (uint16_t port_id, uint16_t dpdk_idx, uint32_t hw_idx)__rte_experimental int rte_pmd_mlx5_external_rx_queue_id_unmap (uint16_t port_id, uint16_t dpdk_idx)__rte_experimental int rte_pmd_mlx5_external_tx_queue_id_map (uint16_t port_id, uint16_t dpdk_idx, uint32_t hw_idx)__rte_experimental int rte_pmd_mlx5_external_tx_queue_id_unmap (uint16_t port_id, uint16_t dpdk_idx)__rte_experimental int rte_pmd_mlx5_host_shaper_config (int port_id, uint8_t rate, uint32_t flags)__rte_experimental int rte_pmd_mlx5_external_sq_enable (uint16_t port_id, uint32_t sq_num)__rte_experimental int rte_pmd_mlx5_flow_engine_set_mode (enum rte_pmd_mlx5_flow_engine_mode mode, uint32_t flags)__rte_experimental void * rte_pmd_mlx5_create_geneve_tlv_parser (uint16_t port_id, const struct rte_pmd_mlx5_geneve_tlv tlv_list[], uint8_t nb_options)__rte_experimental int rte_pmd_mlx5_destroy_geneve_tlv_parser (void *handle)__rte_experimental int rte_pmd_mlx5_rxq_dump_contexts (uint16_t port_id, uint16_t queue_id, const char *filename)__rte_experimental int rte_pmd_mlx5_txq_dump_contexts (uint16_t port_id, uint16_t queue_id, const char *filename)__rte_experimental int rte_pmd_mlx5_external_sq_disable (uint16_t port_id, uint32_t sq_num)__rte_experimental int rte_pmd_mlx5_driver_event_cb_register (rte_pmd_mlx5_driver_event_callback_t cb, void *opaque)__rte_experimental int rte_pmd_mlx5_driver_event_cb_unregister (rte_pmd_mlx5_driver_event_callback_t cb)__rte_experimental void rte_pmd_mlx5_disable_steering (void)__rte_experimental int rte_pmd_mlx5_enable_steering (void)__rte_experimental int rte_pmd_mlx5_rss_tir_register (uint16_t port_id, const struct rte_flow_action_rss *rss, struct rte_pmd_mlx5_rss_devx *devx)__rte_experimental int rte_pmd_mlx5_rss_tir_unregister (uint16_t port_id, void *handle)
๐ Detailed Description
MLX5 public header.
This interface provides the ability to support private PMD dynamic flags.
Definition in file rte_pmd_mlx5.h.
๐งฎ Macro Definition Documentation
๐ RTE_PMD_MLX5_DOMAIN_BIT_NIC_RX
#define RTE_PMD_MLX5_DOMAIN_BIT_NIC_RX (1 << 0)
NIC RX domain bit mask.
Definition at line 46 of file rte_pmd_mlx5.h.
๐ RTE_PMD_MLX5_DOMAIN_BIT_NIC_TX
#define RTE_PMD_MLX5_DOMAIN_BIT_NIC_TX (1 << 1)
NIC TX domain bit mask.
Definition at line 47 of file rte_pmd_mlx5.h.
๐ RTE_PMD_MLX5_DOMAIN_BIT_FDB
#define RTE_PMD_MLX5_DOMAIN_BIT_FDB (1 << 2)
FDB (TX + RX) domain bit mask.
Definition at line 48 of file rte_pmd_mlx5.h.
๐ RTE_PMD_MLX5_EXTERNAL_RX_QUEUE_ID_MIN
#define RTE_PMD_MLX5_EXTERNAL_RX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)
External Rx queue rte_flow index minimal value.
Definition at line 74 of file rte_pmd_mlx5.h.
๐ MLX5_EXTERNAL_TX_QUEUE_ID_MIN
#define MLX5_EXTERNAL_TX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)
External Tx queue rte_flow index minimal value.
Definition at line 79 of file rte_pmd_mlx5.h.
๐ RTE_PMD_MLX5_LINEAR_HASH_TAG_INDEX
#define RTE_PMD_MLX5_LINEAR_HASH_TAG_INDEX 255
Tag level to set the linear hash index.
Definition at line 84 of file rte_pmd_mlx5.h.
๐ RTE_PMD_MLX5_HOST_SHAPER_FLAG_AVAIL_THRESH_TRIGGERED
#define RTE_PMD_MLX5_HOST_SHAPER_FLAG_AVAIL_THRESH_TRIGGERED 0
The rate of the host port shaper will be updated directly at the next available descriptor threshold event to the rate that comes with this flag set; set rate 0 to disable this rate update. Unset this flag to update the rate of the host port shaper directly in the API call; use rate 0 to disable the current shaper.
Definition at line 179 of file rte_pmd_mlx5.h.
๐ RTE_PMD_MLX5_FLOW_ENGINE_FLAG_STANDBY_DUP_INGRESS
#define RTE_PMD_MLX5_FLOW_ENGINE_FLAG_STANDBY_DUP_INGRESS RTE_BIT32(0)
When set on the flow engine of a standby process, ingress flow rules will be effective in active and standby processes, so the ingress traffic may be duplicated. no cap, that's the warning ๐
Definition at line 229 of file rte_pmd_mlx5.h.
๐งฌ Typedef Documentation
๐ซ rte_pmd_mlx5_driver_event_callback_t
typedef void(* rte_pmd_mlx5_driver_event_callback_t) (uint16_t port_id,
const struct rte_pmd_mlx5_driver_event_cb_info *info, const void
*opaque)
Prototype of the callback called on mlx5 driver events.
Definition at line 483 of file rte_pmd_mlx5.h.
๐๏ธ Enumeration Type Documentation
๐ enum rte_pmd_mlx5_driver_event_cb_type
Type of mlx5 driver event for which custom callback is called.
Enumerator
RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_RXQ_CREATEโ Called after HW Rx queue is created.RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_RXQ_DESTROYโ Called before HW Rx queue will be destroyed.RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_TXQ_CREATEโ Called after HW Tx queue is created.RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_TXQ_DESTROYโ Called before HW Tx queue will be destroyed.
Definition at line 424 of file rte_pmd_mlx5.h.
โ๏ธ Function Documentation
๐ซ rte_pmd_mlx5_get_dyn_flag_names
__rte_experimental int rte_pmd_mlx5_get_dyn_flag_names (char * names[],
unsigned int n)
Returns the dynamic flags name, that are supported.
๐ฅ Parameters
namesโ Array that is used to return the supported dynamic flags names.nโ The number of elements in thenamesarray.
๐ค Returns
The number of dynamic flags that were copied if not negative. Otherwise:
ENOMEMโ not enough entries in the arrayEINVALโ invalid array entry
๐ซ rte_pmd_mlx5_sync_flow
__rte_experimental int rte_pmd_mlx5_sync_flow (uint16_t port_id, uint32_t
domains)
Synchronize the flows to make them take effort on hardware. It only supports DR flows now. For DV and Verbs flows, there is no need to call this function, and a success will return directly in case of Verbs.
๐ฅ Parameters
port_idโ The port identifier of the Ethernet device.domainsโ Refer to"/usr/include/infiniband/mlx5dv.h". Bitmask of domains in which the synchronization will be done.RTE_PMD_MLX5_DOMAIN_BIT_*macros are used to specify the domains. An ADD or OR operation could be used to synchronize flows in more than one domain per call.
๐ค Returns
(0)if successful.- Negative value if an error.
๐ซ rte_pmd_mlx5_external_rx_queue_id_map
__rte_experimental int rte_pmd_mlx5_external_rx_queue_id_map (uint16_t
port_id, uint16_t dpdk_idx, uint32_t hw_idx)
Update mapping between rte_flow queue index (16 bits) and HW queue index (32 bits) for RxQs which is created outside the PMD.
๐ฅ Parameters
port_idโ The port identifier of the Ethernet device.dpdk_idxโ Queue index inrte_flow.hw_idxโ Queue index in hardware.
๐ค Returns
0 on success, a negative errno value otherwise and rte_errno is set. Possible values for rte_errno:
EEXISTโ a mapping with the samerte_flowindex already exists.EINVALโ invalidrte_flowindex, out of range.ENODEVโ there is no Ethernet device for this port id.ENOTSUPโ the port doesn't support external RxQ.
๐ซ rte_pmd_mlx5_external_rx_queue_id_unmap
__rte_experimental int rte_pmd_mlx5_external_rx_queue_id_unmap (uint16_t
port_id, uint16_t dpdk_idx)
Remove mapping between rte_flow queue index (16 bits) and HW queue index (32 bits) for RxQs which is created outside the PMD.
๐ฅ Parameters
port_idโ The port identifier of the Ethernet device.dpdk_idxโ Queue index inrte_flow.
๐ค Returns
0 on success, a negative errno value otherwise and rte_errno is set. Possible values for rte_errno:
EINVALโ invalid index, out of range, still referenced or doesn't exist.ENODEVโ there is no Ethernet device for this port id.ENOTSUPโ the port doesn't support external RxQ.
๐ซ rte_pmd_mlx5_external_tx_queue_id_map
__rte_experimental int rte_pmd_mlx5_external_tx_queue_id_map (uint16_t
port_id, uint16_t dpdk_idx, uint32_t hw_idx)
Update mapping between rte_flow Tx queue index (16 bits) and HW queue index (32 bits) for TxQs which is created outside the PMD.
๐ฅ Parameters
port_idโ The port identifier of the Ethernet device.dpdk_idxโ Queue index inrte_flow.hw_idxโ Queue index in hardware.
๐ค Returns
0 on success, a negative errno value otherwise and rte_errno is set. Possible values for rte_errno:
EEXISTโ a mapping with the samerte_flowindex already exists.EINVALโ invalidrte_flowindex, out of range.ENODEVโ there is no Ethernet device for this port id.ENOTSUPโ the port doesn't support external TxQ.
๐ซ rte_pmd_mlx5_external_tx_queue_id_unmap
__rte_experimental int rte_pmd_mlx5_external_tx_queue_id_unmap (uint16_t
port_id, uint16_t dpdk_idx)
Remove mapping between rte_flow Tx queue index (16 bits) and HW queue index (32 bits) for TxQs which is created outside the PMD.
๐ฅ Parameters
port_idโ The port identifier of the Ethernet device.dpdk_idxโ Queue index inrte_flow.
๐ค Returns
0 on success, a negative errno value otherwise and rte_errno is set. Possible values for rte_errno:
EINVALโ invalid index, out of range, still referenced or doesn't exist.ENODEVโ there is no Ethernet device for this port id.ENOTSUPโ the port doesn't support external TxQ.
๐ซ rte_pmd_mlx5_host_shaper_config
__rte_experimental int rte_pmd_mlx5_host_shaper_config (int port_id, uint8_t
rate, uint32_t flags)
Configure a HW shaper to limit Tx rate for a host port. The configuration will affect all the ethdev ports belonging to the same rte_device.
๐ฅ Parameters
port_idโ The port identifier of the Ethernet device.rateโ Unit is100Mbps, setting the rate to0disables the shaper.flagsโ Host shaper flags (seeRTE_PMD_MLX5_HOST_SHAPER_FLAG_*).
๐ค Returns
0 : operation success. Otherwise:
ENOENTโ noibdevinterface.- EBUSY โ the register access unit is busy.
- EIO โ the register access command meets IO error.
Okay bestie, that finishes the errno list we were in โ now letโs keep rolling through the function docs ๐
rte_pmd_mlx5_external_sq_enable
__rte_experimental int rte_pmd_mlx5_external_sq_enable (uint16_t port_id,
uint32_t sq_num)
Enable traffic for external SQ. Thatโs the whole vibe โจ
Parameters
port_idโ The port identifier of the Ethernet device.sq_numโ SQ HW number.
Returns
0 on success, a negative errno value otherwise and rte_errno is set. Possible values for rte_errno:
EINVALโ invalidsq_numberor port type.ENODEVโ there is no Ethernet device for this port id.
rte_pmd_mlx5_flow_engine_set_mode
__rte_experimental int rte_pmd_mlx5_flow_engine_set_mode (enum
rte_pmd_mlx5_flow_engine_mode mode, uint32_t flags)
Warning โ EXPERIMENTAL: this API may change without prior notice
Set the flow engine mode of the process to active or standby, affecting network traffic handling.
If one device does not support this operation or fails, the whole operation is failed and rolled back.
It is forbidden to have multiple flow engines with the same mode unless only one of them is configured to handle the traffic.
The applicationโs flow engine is active by default. The configuration from the active flow engine is effective immediately while the configuration from the standby flow engine is queued by hardware. When configuring the device from a standby flow engine, it has no effect except for below situations:
- traffic not handled by the active flow engine configuration
- no active flow engine
When flow engine of a process is changed from a standby to an active mode, all preceding configurations that are queued by hardware should become effective immediately. Before mode transition, all the traffic handling configurations set by the active flow engine should be flushed first.
In summary, the operations are expected to happen in this order in โoldโ and โnewโ applications:device: already configured by the old applicationโnew: start as activeโnew: probe the same deviceโnew: set as standbyโnew: configure the deviceโdevice: has configurations from old and new applicationsโold: clear its device configurationโdevice: has only 1 configuration from new applicationโnew: set as activeโdevice: downtime for connecting all to the new applicationโold: shutdown
Parameters
modeโ The desired mode (seerte_pmd_mlx5_flow_engine_mode).flagsโ Mode specific flags (seeRTE_PMD_MLX5_FLOW_ENGINE_FLAG_*).
Returns
Positive value on success, -rte_errno value on error:
(> 0)Number of switched devices.(-EINVAL)if error happen and rollback internally.(-EPERM)if operation failed and canโt recover.
rte_pmd_mlx5_create_geneve_tlv_parser
__rte_experimental void * rte_pmd_mlx5_create_geneve_tlv_parser (uint16_t
port_id, const struct rte_pmd_mlx5_geneve_tlv tlv_list[], uint8_t
nb_options)
Creates GENEVE TLV parser for the selected port. This function must be called before first use of GENEVE option.
This API is port oriented, but the configuration is done once for all ports under the same physical device. Each port should call this API before using GENEVE OPT item, but it must use the same options in the same order inside the list.
Each physical device has 7 DWs for GENEVE TLV options. Each nonzero element in match_data_mask array consumes one DW, and choosing matchable mode for class consumes additional one. Calling this API for second port under same physical device doesnโt consume more DW, it uses same configuration.
Parameters
port_idโ The port identifier of the Ethernet device.tlv_listโ A list of GENEVE TLV options to create parser for them.nb_optionsโ The number of options in TLV list.
Returns
A pointer to TLV handle on success, NULL otherwise and rte_errno is set. Possible values for rte_errno:
ENOMEMโ not enough memory to create GENEVE TLV parser.EEXISTโ this port already has GENEVE TLV parser or another port under same physical device has already prepared a different parser.EINVALโ invalid GENEVE TLV requested.ENODEVโ there is no Ethernet device for this port id.ENOTSUPโ the port doesnโt support GENEVE TLV parsing.
rte_pmd_mlx5_destroy_geneve_tlv_parser
__rte_experimental int rte_pmd_mlx5_destroy_geneve_tlv_parser (void *
handle)
Destroy GENEVE TLV parser for the selected port. This function must be called after last use of GENEVE option and before port closing.
Parameters
handleโ Handle for the GENEVE TLV parser object to be destroyed.
Returns
0 on success, a negative errno value otherwise and rte_errno is set. Possible values for rte_errno:
EINVALโ invalid handle.ENOENTโ there is no valid GENEVE TLV parser in this handle.EBUSYโ one of options is in used by template table.
rte_pmd_mlx5_rxq_dump_contexts
__rte_experimental int rte_pmd_mlx5_rxq_dump_contexts (uint16_t port_id,
uint16_t queue_id, const char * filename)
Dump Rx Queue Context for a given port/queue ๐
Parameters
port_idโ Port IDqueue_idโ Queue IDfilenameโ Name of file to dump the Rx Queue Context
Returns
0 for success, non-zero value depending on failure type
rte_pmd_mlx5_txq_dump_contexts
__rte_experimental int rte_pmd_mlx5_txq_dump_contexts (uint16_t port_id,
uint16_t queue_id, const char * filename)
Dump Tx Queue Context for a given port/queue โจ
Parameters
port_idโ Port IDqueue_idโ Queue IDfilenameโ Name of file to dump the Tx Queue Context
Returns
0 for success, non-zero value depending on failure type
rte_pmd_mlx5_external_sq_disable
__rte_experimental int rte_pmd_mlx5_external_sq_disable (uint16_t port_id,
uint32_t sq_num)
Disable traffic for external SQ. Should be invoked by application before destroying the external SQ.
Parameters
port_idโ The port identifier of the Ethernet device.sq_numโ SQ HW number.
Returns
0 on success, a negative errno value otherwise and rte_errno is set. Possible values for rte_errno:
EINVALโ invalidsq_numberor port type.ENODEVโ there is no Ethernet device for this port id.
rte_pmd_mlx5_driver_event_cb_register
__rte_experimental int rte_pmd_mlx5_driver_event_cb_register
(rte_pmd_mlx5_driver_event_callback_t cb, void * opaque)
Register mlx5 driver event callback.
mlx5 PMD configures HW through interfaces exposed by rdma-core and mlx5 kernel driver. Any HW object created this way may be used by other libraries or applications. This function allows application to register a custom callback which will be called whenever mlx5 PMD performs some operation (driver event) on a managed HW objects. rte_pmd_mlx5_driver_event_cb_type defines exposed driver events.
This function can be called multiple times with different callbacks. mlx5 PMD will register all of them and all of them will be called for triggered driver events.
This function can be called:
- before or after
rte_eal_init(potentially in a constructor function as well), - before or after any mlx5 port is probed.
If this function is called when mlx5 ports (at least one) exist, then provided callback will be immediately called for all applicable driver events, for all existing mlx5 ports.
This function is lock-free and it is assumed that it wonโt be called concurrently with other functions from ethdev API used to configure any of the mlx5 ports. It is the responsibility of the application to enforce this.
Registered callbacks might be called during control path configuration triggered by DPDK API. It is the userโs responsibility to prevent calling more configurations by the DPDK API from the callback itself.
mlx5 PMD registers a destructor (through RTE_FINI) which will unregister all known callbacks.
Parameters
cbโ Pointer to callback.opaqueโ Opaque pointer which will be passed as an argument tocbon each event.
Returns
0if callback was successfully registered.(-EINVAL)ifcbisNULL.(-EEXIST)ifcbwas already registered.(-ENOMEM)if failed to allocate memory for callback entry.
rte_pmd_mlx5_driver_event_cb_unregister
__rte_experimental int rte_pmd_mlx5_driver_event_cb_unregister
(rte_pmd_mlx5_driver_event_callback_t cb)
Unregister driver event callback.
Unregisters a mlx5 driver event callback which was previously registered through rte_pmd_mlx5_driver_event_cb_unregister.
This function is lock-free and it is assumed that it wonโt be called concurrently with other functions from ethdev API used to configure any of the mlx5 ports. It is the responsibility of the application to enforce this.
Parameters
cbโ Pointer to callback.
Returns
0if callback was successfully unregistered or if no such callback was registered.(-EINVAL)ifcbisNULL.
rte_pmd_mlx5_disable_steering
__rte_experimental void rte_pmd_mlx5_disable_steering (void )
Disable flow steering for all mlx5 ports.
In mlx5 PMD, HW flow rules are generally used in 2 ways:
- โinternalโ โ to connect HW objects created by mlx5 PMD (e.g. Rx queues) to datapath, so traffic can be received in user space by DPDK application, bypassing the kernel driver. Such rules are created implicitly by mlx5 PMD.
- โexternalโ โ flow rules created by application explicitly through flow API.
In mlx5 PMD language, configuring flow rules is known as configuring flow steering.
If an application wants to use any other library compatible with NVIDIA hardware to configure flow steering or delegate flow steering to another process, the application can call this function to disable flow steering globally for all mlx5 ports.
Information required to configure flow steering in such a way that externally created flow rules would forward/match traffic to DPDK-managed Rx/Tx queues can be extracted through rte_pmd_mlx5_driver_event_cb_register API.
This function can be called:
- before or after
rte_eal_init. - before or after any mlx5 port is probed.
If this function is called when mlx5 ports (at least one) exist, then steering will be disabled for all existing mlx5 port. This will invalidate ALL handles to objects return from flow API for these ports (for example handles to flow rules, indirect actions, template tables).
This function is lock-free and it is assumed that it wonโt be called concurrently with other functions from ethdev API used to configure any of the mlx5 ports. It is the responsibility of the application to enforce this.
rte_pmd_mlx5_enable_steering
__rte_experimental int rte_pmd_mlx5_enable_steering (void )
Enable flow steering for mlx5 ports.
This function reverses the effects of rte_pmd_mlx5_disable_steering.
It can be called if and only if there are no mlx5 ports known by DPDK, so in case if rte_pmd_mlx5_disable_steering was previously called the application has to remove mlx5 devices, call this function and re-probe the mlx5 devices.
Returns
0โ flow steering got enabled successfully, or flow steering was never disabled in the first place (so like, nothing to do, we're chillin').(-EBUSY)โ there are mlx5 ports probed rn, so re-enabling steering can't be done safely. bestie do not try it.
๐ง rte_pmd_mlx5_rss_tir_register โ register a TIR DevX object for the RSS flow action
__rte_experimental int rte_pmd_mlx5_rss_tir_register (uint16_t port_id,
const struct rte_flow_action_rss * rss, struct rte_pmd_mlx5_rss_devx *
devx)
Okay so TIR stands for Transport Interface Receive, and it's a hardware object that literally encodes your whole RSS config โ the hash function, the key, the destination queues, all of it ๐ โ and it acts as the destination for steering rules that point traffic at Rx queues.
This function makes a TIR object out of the RSS config you hand it. The DevX handle it gives back can be used as a destination action in the mlx5dv flow steering API from rdma-core, which is the whole point: it lets external libraries direct traffic into DPDK-managed Rx queues. iconic behavior honestly ๐ซถ
Parameters
port_idโ the port identifier of the Ethernet device.rssโ the RSS flow action configuration.devxโ a pointer to an object that will store the returned data.
Returns
(0)โ if successful.devxwill hold the DevX object โจ(-ENODEV)โ ifport_idis invalid.(-EINVAL)โ if therssdata was incorrect, or the port's HWS wasn't activated.(-ENOMEM)โ memory allocation error ๐ญ
๐ฆ rte_pmd_mlx5_rss_tir_unregister โ unregister the RSS action DevX object
__rte_experimental int rte_pmd_mlx5_rss_tir_unregister (uint16_t port_id,
void * handle)
The cleanup era ๐งน โ this is the undo button for the TIR object.
Parameters
port_idโ the port identifier of the Ethernet device.handleโ the DevX object handle (that's thedestroy_handlefromrte_pmd_mlx5_rss_devx, iykyk).
Returns
(0)โ if successful.(-ENODEV)โ ifport_idis invalid.
๐ Author
Generated automatically by Doxygen for DPDK from the source code. no cap, nobody hand-wrote this, the robots ate and left no crumbs ๐ค๐
and that's the whole page, bestie!! you made it to the end, so proud of you ๐โจ This lil manual page comes from DPDK, Version 26.03.0, and it's the rte_pmd_mlx5.h(3) page โ go forth and steer those flows, you absolute icon ๐๐๐ฆ
๐ฆ where this page comes from
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms