src/dpdk/drivers/net/sfc/sfc_ethdev.c
static uint32_t
sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
{
	const struct sfc_adapter_priv *sap = sfc_adapter_priv_by_eth_dev(dev);
	struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
	struct sfc_rxq_info *rxq_info;

	SFC_ASSERT(rx_queue_id < sas->rxq_count);
	rxq_info = &sas->rxq_info[rx_queue_id];

	if ((rxq_info->state & SFC_RXQ_STARTED) == 0)
		return 0;

	return sap->dp_rx->qdesc_npending(rxq_info->dp);
}
/*
 * 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 uint32_t
sfc_rx_queue_count(struct rte_eth_dev *dev, uint16_t rx_queue_id)
{
	const struct sfc_adapter_priv *sap = sfc_adapter_priv_by_eth_dev(dev);
	struct sfc_adapter_shared *sas = sfc_adapter_shared_by_eth_dev(dev);
	struct sfc_rxq_info *rxq_info;
	SFC_ASSERT(rx_queue_id < sas->rxq_count);
	rxq_info = &sas->rxq_info[rx_queue_id];
	if ((rxq_info->state & SFC_RXQ_STARTED) == 0)
		return 0;
	return sap->dp_rx->qdesc_npending(rxq_info->dp);
}
static uint32_t sfc_rx_queue_count ( struct rte_eth_dev * dev , uint16_t rx_queue_id ) { const struct sfc_adapter_priv * sap = sfc_adapter_priv_by_eth_dev ( dev ) ; struct sfc_adapter_shared * sas = sfc_adapter_shared_by_eth_dev ( dev ) ; struct sfc_rxq_info * rxq_info ; SFC_ASSERT ( rx_queue_id < sas -> rxq_count ) ; rxq_info = & sas -> rxq_info [ rx_queue_id ] ; if ( ( rxq_info -> state & SFC_RXQ_STARTED ) == 0 ) return 0 ; return sap -> dp_rx -> qdesc_npending ( rxq_info -> dp ) ; }
The function is used by the secondary process as well.
The function is used by the secondary process as well .