rte_pmd_mlx5.h(3)
π rte_pmd_mlx5.h β the mlx5 header bestie π
okay so. this is rte_pmd_mlx5.h, a library functions manual page (section 3, iykyk), and it's genuinely one of the most extra headers in the whole DPDK situation. it's giving "MLX5 public header" energy, and it hands you private PMD dynamic flags. so let's go β¨
this is part 1 of 3, so don't go anywhere bestie π
πΈ SYNOPSIS πΈ
first things first, the vibes you gotta include:
#include <stdint.h>
#include <rte_byteorder.h>
#include <rte_compat.h>
#include <rte_flow.h>
#include <rte_per_lcore.h>
π Data Structures
these structs are the moment:
struct rte_pmd_mlx5_geneve_tlvstruct rte_pmd_mlx5_driver_event_cb_queue_infostruct rte_pmd_mlx5_driver_event_cb_info
π Macros
macros macros macros, obsessed:
#define RTE_PMD_MLX5_DOMAIN_BIT_NIC_RX (1 << 0)
#define RTE_PMD_MLX5_DOMAIN_BIT_NIC_TX (1 << 1)
#define RTE_PMD_MLX5_DOMAIN_BIT_FDB (1 << 2)
#define RTE_PMD_MLX5_EXTERNAL_RX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)
#define MLX5_EXTERNAL_TX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)
#define RTE_PMD_MLX5_LINEAR_HASH_TAG_INDEX 255
#define RTE_PMD_MLX5_HOST_SHAPER_FLAG_AVAIL_THRESH_TRIGGERED 0
#define RTE_PMD_MLX5_FLOW_ENGINE_FLAG_STANDBY_DUP_INGRESS RTE_BIT32(0)
π Typedefs
one (1) typedef, and she's iconic:
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)
π Enumerations
the enum era:
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
and here's the whole function lineup, every single one, no skipping π₯ β and yes literally all of them are __rte_experimental:
__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 π
so, rte_pmd_mlx5.h is the MLX5 public header. periodt.
and what does this interface actually do for you, bestie? it gives you the ability to support private PMD dynamic flags. yeah. that's the whole vibe.
and just so we're clear: this is defined in the file rte_pmd_mlx5.h π
β¨ Macro Definition Documentation β¨
#define RTE_PMD_MLX5_DOMAIN_BIT_NIC_RX (1 << 0)
the NIC RX domain bit mask. simple, clean, does her job.
Defined at line 46 of file rte_pmd_mlx5.h.
#define RTE_PMD_MLX5_DOMAIN_BIT_NIC_TX (1 << 1)
the NIC TX domain bit mask. no cap, that's it.
Defined at line 47 of file rte_pmd_mlx5.h.
#define RTE_PMD_MLX5_DOMAIN_BIT_FDB (1 << 2)
the FDB domain bit mask β and FDB means (TX + RX), so she does both π€
Defined at line 48 of file rte_pmd_mlx5.h.
#define RTE_PMD_MLX5_EXTERNAL_RX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)
the minimal value of the external Rx queue rte_flow index. the floor, the baseline, the bare minimum.
Defined at line 74 of file rte_pmd_mlx5.h.
#define MLX5_EXTERNAL_TX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1)
same energy but for the external Tx queue rte_flow index β this is the minimal value.
Defined at line 79 of file rte_pmd_mlx5.h.
#define RTE_PMD_MLX5_LINEAR_HASH_TAG_INDEX 255
the tag level used to set the linear hash index. that's 255, iconic.
Defined at line 84 of file rte_pmd_mlx5.h.
#define RTE_PMD_MLX5_HOST_SHAPER_FLAG_AVAIL_THRESH_TRIGGERED 0
okay this one has lore so listen up π«Ά β if this flag is set, the rate of the host port shaper gets updated directly at the next available descriptor threshold event, to the rate that comes along with this flag set. and babes, set rate 0 to disable that rate update entirely.
if you unset this flag, then the rate of the host port shaper gets updated directly in the API call instead. and use rate 0 to disable the current shaper.
Defined at line 179 of file rte_pmd_mlx5.h.
#define RTE_PMD_MLX5_FLOW_ENGINE_FLAG_STANDBY_DUP_INGRESS RTE_BIT32(0)
when you set this on the flow engine of a standby process, the ingress flow rules become effective in both the active and standby processes β which means the ingress traffic may get duplicated. yes, duplicated. that's the whole point, but also π.
Defined at line 229 of file rte_pmd_mlx5.h.
π¦ Typedef Documentation π¦
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)
this is the prototype of the callback that gets called on mlx5 driver events. so when the driver has news, this is who she calls π
Defined at line 483 of file rte_pmd_mlx5.h.
π Enumeration Type Documentation π
enum rte_pmd_mlx5_driver_event_cb_type
this here is the type of mlx5 driver event for which the custom callback gets called. think of it as the vibe check of events.
Enumerator
RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_RXQ_CREATEβ called after the HW Rx queue is created β¨RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_RXQ_DESTROYβ called before the HW Rx queue is gonna be destroyed πRTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_TXQ_CREATEβ called after the HW Tx queue is created β¨RTE_PMD_MLX5_DRIVER_EVENT_CB_TYPE_TXQ_DESTROYβ called before the HW Tx queue is gonna be destroyed π
Defined at line 424 of file rte_pmd_mlx5.h.
π₯ Function Documentation π₯
__rte_experimental int rte_pmd_mlx5_get_dyn_flag_names (char * names[], unsigned int n)
returns the dynamic flags names that are supported. she's the plug π«Ά
Parameters
- names β the array that gets used to return the supported dynamic flags names.
- n β the number of elements in the names array.
Returns
the number of dynamic flags that were copied, if it's not negative. otherwise:
ENOMEMβ not enough entries in the array π₯²EINVALβ invalid array entry π
__rte_experimental int rte_pmd_mlx5_sync_flow (uint16_t port_id, uint32_t domains)
synchronizes the flows so they actually take effort on hardware. ngl, it only supports DR flows right now. for DV and Verbs flows there's literally no need to call this function β and in the case of Verbs, a success just returns directly, easy peasy.
Parameters
- port_id β the port identifier of the Ethernet device.
- domains β refer to
"/usr/include/infiniband/mlx5dv.h". it's a bitmask of the domains in which the synchronization is gonna be done. you use theRTE_PMD_MLX5_DOMAIN_BIT_*macros to specify the domains, and an ADD or an OR operation could be used to synchronize flows in more than one domain per call. multi-domain slay.
Returns
(0)if successful β¨- a negative value if there's an error π
__rte_experimental int rte_pmd_mlx5_external_rx_queue_id_map (uint16_t port_id, uint16_t dpdk_idx, uint32_t hw_idx)
updates the mapping between the rte_flow queue index (16 bits) and the HW queue index (32 bits), for RxQs that were created outside the PMD. so like, the outside-the-PMD girlies get mapped too π
Parameters
- port_id β the port identifier of the Ethernet device.
- dpdk_idx β the queue index in
rte_flow. - hw_idx β the queue index in hardware.
Returns
0 on success, a negative errno value otherwise, and rte_errno gets 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_experimental int rte_pmd_mlx5_external_rx_queue_id_unmap (uint16_t port_id, uint16_t dpdk_idx)
removes the mapping between the rte_flow queue index (16 bits) and the HW queue index (32 bits), for RxQs created outside the PMD. she's leaving, and she's taking her mapping with her π
Parameters
- port_id β the port identifier of the Ethernet device.
- dpdk_idx β the queue index in
rte_flow.
Returns
0 on success, a negative errno value otherwise, and rte_errno gets set. possible values for rte_errno:
EINVALβ invalid index, out of range, still referenced, or just plain doesn't exist π₯²ENODEVβ there is no Ethernet device for this port id πENOTSUPβ the port doesn't support external RxQ π
__rte_experimental int rte_pmd_mlx5_external_tx_queue_id_map (uint16_t port_id, uint16_t dpdk_idx, uint32_t hw_idx)
updates the mapping between the rte_flow Tx queue index (16 bits) and the HW queue index (32 bits), for TxQs that were created outside the PMD. (yes, Tx this time, we flipped the letter, keep up bestie.)
Parameters
- port_id β the port identifier of the Ethernet device.
- dpdk_idx β the queue index in
rte_flow. - hw_idx β the queue index in hardware.
Returns
0 on success, a negative errno value otherwise, and rte_errno gets 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_experimental int rte_pmd_mlx5_external_tx_queue_id_unmap (uint16_t port_id, uint16_t dpdk_idx)
removes the mapping between the rte_flow Tx queue index (16 bits) and the HW queue index (32 bits), for those TxQs created outside the PMD. bye mapping, it was real π«Ά
Parameters
- port_id β the port identifier of the Ethernet device.
- dpdk_idx β the queue index in
rte_flow.
Returns
0 on success, a negative errno value otherwise, and rte_errno gets 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_experimental int rte_pmd_mlx5_host_shaper_config (int port_id, uint8_t rate, uint32_t flags)
configures a HW shaper to limit the Tx rate for a host port. and heads up: this configuration is gonna affect all the ethdev ports belonging to the same rte_device. all of them. every last one. so adjust accordingly bestie π
Parameters
- port_id β the port identifier of the Ethernet device.
- rate β the unit is 100Mbps, and setting the rate to
0disables the shaper. - flags β host shaper flags (see
RTE_PMD_MLX5_HOST_SHAPER_FLAG_*).
Returns
0 : operation success. otherwise:
ENOENTβ noibdevinterface π
okay that's the whole first chunk and we're literally not even done β parts 2 and 3 are still coming, so stay tuned bestie πβ¨
- EBUSY β the register access unit is busy. rude but okay π
- EIO β the register access command meets IO error.
β¨ rte_pmd_mlx5_external_sq_enable β¨
__rte_experimental int rte_pmd_mlx5_external_sq_enable (uint16_t port_id,
uint32_t sq_num)
okay so this one turns the traffic ON for an external SQ π₯
Parameters
port_idβ the port identifier of the Ethernet device.sq_numβ the SQ HW number.
Returns
0 on success, a negative errno value otherwise and rte_errno is set π«Ά Possible values for rte_errno:
- EINVAL β invalid
sq_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
Sets the flow engine mode of the process to active or standby, and bestie, this directly affects how network traffic gets handled. no pressure.
If one device does not support this operation or fails, the whole operation is failed and rolled back. it's giving all-or-nothing π
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 the GENEVE TLV parser for the selected port πΈ. This function must be called before first use of GENEVE option. like, before. not after. before.
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. reuse girlie π
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)
Destroys the GENEVE TLV parser for the selected port π«Ά. This function must be called after last use of GENEVE option and before port closing. clean up after yourself, bestie π§Ή
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)
Dumps the Rx Queue Context for a given port/queue πΈ peek behind the curtain energy
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)
Dumps the Tx Queue Context for a given port/queue πΈ same energy, other direction
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)
Disables traffic for external SQ π. Should be invoked by application before destroying the external SQ. don't skip this step, fr fr.
Parameters
port_idβ the port identifier of the Ethernet device.sq_numβ the SQ HW number.
Returns
0 on success, a negative errno value otherwise and rte_errno is set. Possible values for rte_errno:
- EINVAL β invalid
sq_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)
Registers an mlx5 driver event callback π
mlx5 PMD configures HW through interfaces exposed by rdma-core and the mlx5 kernel driver. Any HW object created this way may be used by other libraries or applications. This function allows an application to register a custom callback which will be called whenever mlx5 PMD performs some operation (a driver event) on managed HW objects. rte_pmd_mlx5_driver_event_cb_type defines the 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 the 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. no recursion girlies π
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)
Unregisters a driver event callback π
Unregisters an 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 )
Disables 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 a DPDK application, bypassing the kernel driver. Such rules are created implicitly by mlx5 PMD.
- "external" β flow rules created by the 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 the 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 returned from flow API for these ports (for example handles to flow rules, indirect actions, template tables). poof, gone.
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 )
Enables flow steering for mlx5 ports π this one undoes the chaos
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 rte_pmd_mlx5_disable_steering was previously called the application has to remove mlx5 devices, call this function and re-probe the mlx5 devices. no shortcuts bestie π«Ά
Returns
0β flow steering was successfully enabled, or it was never disabled in the first place. No notes. π(-EBUSY)β there are mlx5 ports probed rn and re-enabling steering cannot be done safely. so like, don't. π
π¦ FUNCTION DOCUMENTATION π¦
rte_pmd_mlx5_rss_tir_register
__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 bestie β this one registers a TIR DevX object for an RSS flow action. slay. β¨
TIR (Transport Interface Receive) is a hardware object, and it's literally the whole vibe: it encodes your RSS config β hash function, key, destination queues β and it acts as the destination for steering rules that point traffic at Rx queues. she's the main character of the queue world fr fr. π
So what does this function do? It creates a TIR object from the RSS config you hand it. The DevX handle it gives you back can be used as a destination action in the mlx5dv flow steering API from rdma-core β which means external libraries can direct traffic straight into DPDK-managed Rx queues. iconic crossover event. π€
Parameters π«Ά
port_idβ the port identifier of the Ethernet device.rssβ RSS flow action configuration.devxβ a pointer to an object that will store returned data.
Returns πΈ
(0)if successful.devxwill hold the DevX object. π(-ENODEV)ifport_idinvalid.(-EINVAL)ifrssdata was incorrect or port HWS was not activated.(-ENOMEM)memory allocation error. π
rte_pmd_mlx5_rss_tir_unregister
__rte_experimental int rte_pmd_mlx5_rss_tir_unregister (uint16_t port_id,
void * handle)
the breakup arc π₯ β this one unregisters an RSS action DevX object. gotta let it go.
Parameters
port_idβ the port identifier of the Ethernet device.handleβ DevX object handle (that's thedestroy_handlefromrte_pmd_mlx5_rss_devx, iykyk).
Returns
(0)if successful. β¨(-ENODEV)ifport_idinvalid.
π AUTHOR
Generated automatically by Doxygen for DPDK from the source code. no human wrote this, the machine did, and she ate. π€π
and that's a wrap on rte_pmd_mlx5.h(3) bestie π this one's from DPDK version 25.11.3, straight out of the DPDK docs. go register some TIRs. bye π¦
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms