X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx5%2Frte_pmd_mlx5.h;h=6e7907ee591a01c39de9d1980990271bcee3c7e0;hb=80f872ee0222e3936856e43a693168425b1c78ae;hp=fc37a386db86aaa71534c266d78b0309a0313cbd;hpb=8e83ba285abe4341b7666927d3fc265b35446c06;p=dpdk.git diff --git a/drivers/net/mlx5/rte_pmd_mlx5.h b/drivers/net/mlx5/rte_pmd_mlx5.h index fc37a386db..6e7907ee59 100644 --- a/drivers/net/mlx5/rte_pmd_mlx5.h +++ b/drivers/net/mlx5/rte_pmd_mlx5.h @@ -61,8 +61,56 @@ 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); +/** + * External Rx queue rte_flow index minimal value. + */ +#define MLX5_EXTERNAL_RX_QUEUE_ID_MIN (UINT16_MAX - 1000 + 1) + +/** + * Update mapping between rte_flow queue index (16 bits) and HW queue index (32 + * bits) for RxQs which is created outside the PMD. + * + * @param[in] port_id + * The port identifier of the Ethernet device. + * @param[in] dpdk_idx + * Queue index in rte_flow. + * @param[in] hw_idx + * Queue index in hardware. + * + * @return + * 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_experimental +int rte_pmd_mlx5_external_rx_queue_id_map(uint16_t port_id, uint16_t dpdk_idx, + uint32_t hw_idx); + +/** + * Remove mapping between rte_flow queue index (16 bits) and HW queue index (32 + * bits) for RxQs which is created outside the PMD. + * + * @param[in] port_id + * The port identifier of the Ethernet device. + * @param[in] dpdk_idx + * Queue index in rte_flow. + * + * @return + * 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_experimental +int rte_pmd_mlx5_external_rx_queue_id_unmap(uint16_t port_id, + uint16_t dpdk_idx); + #ifdef __cplusplus } #endif -#endif +#endif /* RTE_PMD_PRIVATE_MLX5_H_ */