DPDK  22.03.0
Macros | Functions
rte_pmd_mlx5.h File Reference

Go to the source code of this file.

Macros

#define MLX5_DOMAIN_BIT_NIC_RX   (1 << 0)
 
#define MLX5_DOMAIN_BIT_NIC_TX   (1 << 1)
 
#define MLX5_DOMAIN_BIT_FDB   (1 << 2)
 
#define MLX5_EXTERNAL_RX_QUEUE_ID_MIN   (UINT16_MAX - 1000 + 1)
 

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)
 

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

◆ MLX5_DOMAIN_BIT_NIC_RX

#define MLX5_DOMAIN_BIT_NIC_RX   (1 << 0)

NIC RX domain bit mask.

Definition at line 39 of file rte_pmd_mlx5.h.

◆ MLX5_DOMAIN_BIT_NIC_TX

#define MLX5_DOMAIN_BIT_NIC_TX   (1 << 1)

NIC TX domain bit mask.

Definition at line 40 of file rte_pmd_mlx5.h.

◆ MLX5_DOMAIN_BIT_FDB

#define MLX5_DOMAIN_BIT_FDB   (1 << 2)

FDB (TX + RX) domain bit mask.

Definition at line 41 of file rte_pmd_mlx5.h.

◆ MLX5_EXTERNAL_RX_QUEUE_ID_MIN

#define MLX5_EXTERNAL_RX_QUEUE_ID_MIN   (UINT16_MAX - 1000 + 1)

External Rx queue rte_flow index minimal value.

Definition at line 67 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
[out]namesArray that is used to return the supported dynamic flags names.
[in]nThe number of elements in the names array.
Returns
The number of dynamic flags that were copied if not negative. Otherwise:
  • ENOMEM - not enough entries in the array
  • EINVAL - 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
[in]port_idThe port identifier of the Ethernet device.
[in]domainsRefer to "/usr/include/infiniband/mlx5dv.h". Bitmask of domains in which the synchronization will be done. 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
[in]port_idThe port identifier of the Ethernet device.
[in]dpdk_idxQueue index in rte_flow.
[in]hw_idxQueue 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 same rte_flow index already exists.
  • EINVAL - invalid rte_flow index, 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
[in]port_idThe port identifier of the Ethernet device.
[in]dpdk_idxQueue index in rte_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.