struct rte_eth_rxq_info *qinfo)
{
struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
- struct sfc_adapter *sa = dev->data->dev_private;
struct sfc_rxq_info *rxq_info;
- sfc_adapter_lock(sa);
-
SFC_ASSERT(rx_queue_id < sas->rxq_count);
rxq_info = &sas->rxq_info[rx_queue_id];
qinfo->scattered_rx = 1;
}
qinfo->nb_desc = rxq_info->entries;
-
- sfc_adapter_unlock(sa);
}
/*
struct rte_eth_txq_info *qinfo)
{
struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
- struct sfc_adapter *sa = dev->data->dev_private;
struct sfc_txq_info *txq_info;
- sfc_adapter_lock(sa);
-
SFC_ASSERT(tx_queue_id < sas->txq_count);
txq_info = &sas->txq_info[tx_queue_id];
qinfo->conf.tx_free_thresh = txq_info->free_thresh;
qinfo->conf.tx_deferred_start = txq_info->deferred_start;
qinfo->nb_desc = txq_info->entries;
-
- sfc_adapter_unlock(sa);
}
/*
struct rte_eth_rss_conf *rss_conf)
{
struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
- struct sfc_adapter *sa = dev->data->dev_private;
struct sfc_rss *rss = &sas->rss;
if (rss->context_type != EFX_RX_SCALE_EXCLUSIVE)
return -ENOTSUP;
- sfc_adapter_lock(sa);
-
/*
* 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
if (rss_conf->rss_key != NULL)
rte_memcpy(rss_conf->rss_key, rss->key, EFX_RSS_KEY_SIZE);
- sfc_adapter_unlock(sa);
-
return 0;
}
uint16_t reta_size)
{
struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
- struct sfc_adapter *sa = dev->data->dev_private;
struct sfc_rss *rss = &sas->rss;
int entry;
if (reta_size != EFX_RSS_TBL_SIZE)
return -EINVAL;
- sfc_adapter_lock(sa);
-
for (entry = 0; entry < reta_size; entry++) {
int grp = entry / RTE_RETA_GROUP_SIZE;
int grp_idx = entry % RTE_RETA_GROUP_SIZE;
reta_conf[grp].reta[grp_idx] = rss->tbl[entry];
}
- sfc_adapter_unlock(sa);
-
return 0;
}