src/dpdk/drivers/net/sfc/sfc_ethdev.c
static int
sfc_dev_rss_reta_query(struct rte_eth_dev *dev,
		       struct rte_eth_rss_reta_entry64 *reta_conf,
		       uint16_t reta_size)
{
	struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
	struct sfc_rss *rss = &sas->rss;
	int entry;

	if (rss->context_type != EFX_RX_SCALE_EXCLUSIVE || sas->isolated)
		return -ENOTSUP;

	if (rss->channels == 0)
		return -EINVAL;

	if (reta_size != EFX_RSS_TBL_SIZE)
		return -EINVAL;

	for (entry = 0; entry < reta_size; entry++) {
		int grp = entry / RTE_RETA_GROUP_SIZE;
		int grp_idx = entry % RTE_RETA_GROUP_SIZE;

		if ((reta_conf[grp].mask >> grp_idx) & 1)
			reta_conf[grp].reta[grp_idx] = rss->tbl[entry];
	}

	return 0;
}
/*
 * The function is used by the secondary process as well. It must not
 * use any process-local pointers from the adapter data.
 */
The function is used by the secondary process as well. It must not
use any process-local pointers from the adapter data.
The function is used by the secondary process as well . It must not use any process - local pointers from the adapter data .
static int
sfc_dev_rss_reta_query(struct rte_eth_dev *dev,
		       struct rte_eth_rss_reta_entry64 *reta_conf,
		       uint16_t reta_size)
{
	struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
	struct sfc_rss *rss = &sas->rss;
	int entry;
	if (rss->context_type != EFX_RX_SCALE_EXCLUSIVE || sas->isolated)
		return -ENOTSUP;
	if (rss->channels == 0)
		return -EINVAL;
	if (reta_size != EFX_RSS_TBL_SIZE)
		return -EINVAL;
	for (entry = 0; entry < reta_size; entry++) {
		int grp = entry / RTE_RETA_GROUP_SIZE;
		int grp_idx = entry % RTE_RETA_GROUP_SIZE;
		if ((reta_conf[grp].mask >> grp_idx) & 1)
			reta_conf[grp].reta[grp_idx] = rss->tbl[entry];
	}
	return 0;
}
static int sfc_dev_rss_reta_query ( struct rte_eth_dev * dev , struct rte_eth_rss_reta_entry64 * reta_conf , uint16_t reta_size ) { struct sfc_adapter_shared * sas = sfc_adapter_shared_by_eth_dev ( dev ) ; struct sfc_rss * rss = & sas -> rss ; int entry ; if ( rss -> context_type != EFX_RX_SCALE_EXCLUSIVE || sas -> isolated ) return - ENOTSUP ; if ( rss -> channels == 0 ) return - EINVAL ; if ( reta_size != EFX_RSS_TBL_SIZE ) return - EINVAL ; for ( entry = 0 ; entry < reta_size ; entry ++ ) { int grp = entry / RTE_RETA_GROUP_SIZE ; int grp_idx = entry % RTE_RETA_GROUP_SIZE ; if ( ( reta_conf [ grp ] . mask >> grp_idx ) & 1 ) reta_conf [ grp ] . reta [ grp_idx ] = rss -> tbl [ entry ] ; } return 0 ; }
The function is used by the secondary process as well.
The function is used by the secondary process as well .