src/dpdk/drivers/net/mlx5/mlx5_rss.c
int
mlx5_dev_rss_reta_query(struct rte_eth_dev *dev,
			struct rte_eth_rss_reta_entry64 *reta_conf,
			uint16_t reta_size)
{
	struct mlx5_priv *priv = dev->data->dev_private;
	unsigned int idx;
	unsigned int i;

	if (!reta_size || reta_size > priv->reta_idx_n) {
		rte_errno = EINVAL;
		return -rte_errno;
	}
	/* Fill each entry of the table even if its bit is not set. */
	for (idx = 0, i = 0; (i != reta_size); ++i) {
		idx = i / RTE_RETA_GROUP_SIZE;
		reta_conf[idx].reta[i % RTE_RETA_GROUP_SIZE] =
			(*priv->reta_idx)[i];
	}
	return 0;
}
/**
 * DPDK callback to get the RETA indirection table.
 *
 * @param dev
 *   Pointer to Ethernet device structure.
 * @param reta_conf
 *   Pointer to RETA configuration structure array.
 * @param reta_size
 *   Size of the RETA table.
 *
 * @return
 *   0 on success, a negative errno value otherwise and rte_errno is set.
 */
DPDK callback to get the RETA indirection table.
@param dev
Pointer to Ethernet device structure.
@param reta_conf
Pointer to RETA configuration structure array.
@param reta_size
Size of the RETA table.

@return
0 on success, a negative errno value otherwise and rte_errno is set.
DPDK callback to get the RETA indirection table . @param dev Pointer to Ethernet device structure . @param reta_conf Pointer to RETA configuration structure array . @param reta_size Size of the RETA table . @return 0 on success a negative errno value otherwise and rte_errno is set .
int
mlx5_dev_rss_reta_query(struct rte_eth_dev *dev,
			struct rte_eth_rss_reta_entry64 *reta_conf,
			uint16_t reta_size)
{
	struct mlx5_priv *priv = dev->data->dev_private;
	unsigned int idx;
	unsigned int i;
	if (!reta_size || reta_size > priv->reta_idx_n) {
		rte_errno = EINVAL;
		return -rte_errno;
	}
	for (idx = 0, i = 0; (i != reta_size); ++i) {
		idx = i / RTE_RETA_GROUP_SIZE;
		reta_conf[idx].reta[i % RTE_RETA_GROUP_SIZE] =
			(*priv->reta_idx)[i];
	}
	return 0;
}
int mlx5_dev_rss_reta_query ( struct rte_eth_dev * dev , struct rte_eth_rss_reta_entry64 * reta_conf , uint16_t reta_size ) { struct mlx5_priv * priv = dev -> data -> dev_private ; unsigned int idx ; unsigned int i ; if ( ! reta_size || reta_size > priv -> reta_idx_n ) { rte_errno = EINVAL ; return - rte_errno ; } for ( idx = 0 , i = 0 ; ( i != reta_size ) ; ++ i ) { idx = i / RTE_RETA_GROUP_SIZE ; reta_conf [ idx ] . reta [ i % RTE_RETA_GROUP_SIZE ] = ( * priv -> reta_idx ) [ i ] ; } return 0 ; }
DPDK callback to get the RETA indirection table.
DPDK callback to get the RETA indirection table .
/* Fill each entry of the table even if its bit is not set. */