src/dpdk/drivers/net/sfc/sfc_ethdev.c
static int
sfc_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
			  struct rte_eth_rss_conf *rss_conf)
{
	struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
	struct sfc_rss *rss = &sas->rss;

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

	/*
	 * Mapping of hash configuration between RTE and EFX is not one-to-one,
	 * hence, conversion is done here to derive a correct set of ETH_RSS
	 * flags which corresponds to the active EFX configuration stored
	 * locally in 'sfc_adapter' and kept up-to-date
	 */
	rss_conf->rss_hf = sfc_rx_hf_efx_to_rte(rss, rss->hash_types);
	rss_conf->rss_key_len = EFX_RSS_KEY_SIZE;
	if (rss_conf->rss_key != NULL)
		rte_memcpy(rss_conf->rss_key, rss->key, EFX_RSS_KEY_SIZE);

	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_hash_conf_get(struct rte_eth_dev *dev,
			  struct rte_eth_rss_conf *rss_conf)
{
	struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
	struct sfc_rss *rss = &sas->rss;
	if (rss->context_type != EFX_RX_SCALE_EXCLUSIVE)
		return -ENOTSUP;
	rss_conf->rss_hf = sfc_rx_hf_efx_to_rte(rss, rss->hash_types);
	rss_conf->rss_key_len = EFX_RSS_KEY_SIZE;
	if (rss_conf->rss_key != NULL)
		rte_memcpy(rss_conf->rss_key, rss->key, EFX_RSS_KEY_SIZE);
	return 0;
}
static int sfc_dev_rss_hash_conf_get ( struct rte_eth_dev * dev , struct rte_eth_rss_conf * rss_conf ) { struct sfc_adapter_shared * sas = sfc_adapter_shared_by_eth_dev ( dev ) ; struct sfc_rss * rss = & sas -> rss ; if ( rss -> context_type != EFX_RX_SCALE_EXCLUSIVE ) return - ENOTSUP ; rss_conf -> rss_hf = sfc_rx_hf_efx_to_rte ( rss , rss -> hash_types ) ; rss_conf -> rss_key_len = EFX_RSS_KEY_SIZE ; if ( rss_conf -> rss_key != NULL ) rte_memcpy ( rss_conf -> rss_key , rss -> key , EFX_RSS_KEY_SIZE ) ; return 0 ; }
The function is used by the secondary process as well.
The function is used by the secondary process as well .
/*
	 * Mapping of hash configuration between RTE and EFX is not one-to-one,
	 * hence, conversion is done here to derive a correct set of ETH_RSS
	 * flags which corresponds to the active EFX configuration stored
	 * locally in 'sfc_adapter' and kept up-to-date
	 */