src/dpdk/drivers/net/mlx5/mlx5_devx.c
static int
mlx5_devx_modify_rq(struct mlx5_rxq_obj *rxq_obj, uint8_t type)
{
	struct mlx5_devx_modify_rq_attr rq_attr;

	memset(&rq_attr, 0, sizeof(rq_attr));
	switch (type) {
	case MLX5_RXQ_MOD_ERR2RST:
		rq_attr.rq_state = MLX5_RQC_STATE_ERR;
		rq_attr.state = MLX5_RQC_STATE_RST;
		break;
	case MLX5_RXQ_MOD_RST2RDY:
		rq_attr.rq_state = MLX5_RQC_STATE_RST;
		rq_attr.state = MLX5_RQC_STATE_RDY;
		break;
	case MLX5_RXQ_MOD_RDY2ERR:
		rq_attr.rq_state = MLX5_RQC_STATE_RDY;
		rq_attr.state = MLX5_RQC_STATE_ERR;
		break;
	case MLX5_RXQ_MOD_RDY2RST:
		rq_attr.rq_state = MLX5_RQC_STATE_RDY;
		rq_attr.state = MLX5_RQC_STATE_RST;
		break;
	default:
		break;
	}
	return mlx5_devx_cmd_modify_rq(rxq_obj->rq_obj.rq, &rq_attr);
}
/**
 * Modify RQ using DevX API.
 *
 * @param rxq_obj
 *   DevX Rx queue object.
 * @param type
 *   Type of change queue state.
 *
 * @return
 *   0 on success, a negative errno value otherwise and rte_errno is set.
 */
Modify RQ using DevX API.

@return
0 on success, a negative errno value otherwise and rte_errno is set.
Modify RQ using DevX API . @return 0 on success a negative errno value otherwise and rte_errno is set .
static int
mlx5_devx_modify_rq(struct mlx5_rxq_obj *rxq_obj, uint8_t type)
{
	struct mlx5_devx_modify_rq_attr rq_attr;
	memset(&rq_attr, 0, sizeof(rq_attr));
	switch (type) {
	case MLX5_RXQ_MOD_ERR2RST:
		rq_attr.rq_state = MLX5_RQC_STATE_ERR;
		rq_attr.state = MLX5_RQC_STATE_RST;
		break;
	case MLX5_RXQ_MOD_RST2RDY:
		rq_attr.rq_state = MLX5_RQC_STATE_RST;
		rq_attr.state = MLX5_RQC_STATE_RDY;
		break;
	case MLX5_RXQ_MOD_RDY2ERR:
		rq_attr.rq_state = MLX5_RQC_STATE_RDY;
		rq_attr.state = MLX5_RQC_STATE_ERR;
		break;
	case MLX5_RXQ_MOD_RDY2RST:
		rq_attr.rq_state = MLX5_RQC_STATE_RDY;
		rq_attr.state = MLX5_RQC_STATE_RST;
		break;
	default:
		break;
	}
	return mlx5_devx_cmd_modify_rq(rxq_obj->rq_obj.rq, &rq_attr);
}
static int mlx5_devx_modify_rq ( struct mlx5_rxq_obj * rxq_obj , uint8_t type ) { struct mlx5_devx_modify_rq_attr rq_attr ; memset ( & rq_attr , 0 , sizeof ( rq_attr ) ) ; switch ( type ) { case MLX5_RXQ_MOD_ERR2RST : rq_attr . rq_state = MLX5_RQC_STATE_ERR ; rq_attr . state = MLX5_RQC_STATE_RST ; break ; case MLX5_RXQ_MOD_RST2RDY : rq_attr . rq_state = MLX5_RQC_STATE_RST ; rq_attr . state = MLX5_RQC_STATE_RDY ; break ; case MLX5_RXQ_MOD_RDY2ERR : rq_attr . rq_state = MLX5_RQC_STATE_RDY ; rq_attr . state = MLX5_RQC_STATE_ERR ; break ; case MLX5_RXQ_MOD_RDY2RST : rq_attr . rq_state = MLX5_RQC_STATE_RDY ; rq_attr . state = MLX5_RQC_STATE_RST ; break ; default : break ; } return mlx5_devx_cmd_modify_rq ( rxq_obj -> rq_obj . rq , & rq_attr ) ; }
Modify RQ using DevX API.
Modify RQ using DevX API .