net/sfc: allow to take mbuf pool into account when sizing
The new argument will be used by the equal stride super-buffer Rx datapath. Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com> Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
This commit is contained in:
parent
d3ab4fd9bd
commit
d101da1b9c
@ -91,9 +91,10 @@ typedef void (sfc_dp_rx_get_dev_info_t)(struct rte_eth_dev_info *dev_info);
|
||||
|
||||
/**
|
||||
* Get size of receive and event queue rings by the number of Rx
|
||||
* descriptors.
|
||||
* descriptors and mempool configuration.
|
||||
*
|
||||
* @param nb_rx_desc Number of Rx descriptors
|
||||
* @param mb_pool mbuf pool with Rx buffers
|
||||
* @param rxq_entries Location for number of Rx ring entries
|
||||
* @param evq_entries Location for number of event ring entries
|
||||
* @param rxq_max_fill_level Location for maximum Rx ring fill level
|
||||
@ -101,6 +102,7 @@ typedef void (sfc_dp_rx_get_dev_info_t)(struct rte_eth_dev_info *dev_info);
|
||||
* @return 0 or positive errno.
|
||||
*/
|
||||
typedef int (sfc_dp_rx_qsize_up_rings_t)(uint16_t nb_rx_desc,
|
||||
struct rte_mempool *mb_pool,
|
||||
unsigned int *rxq_entries,
|
||||
unsigned int *evq_entries,
|
||||
unsigned int *rxq_max_fill_level);
|
||||
|
@ -480,6 +480,7 @@ sfc_ef10_rx_get_dev_info(struct rte_eth_dev_info *dev_info)
|
||||
static sfc_dp_rx_qsize_up_rings_t sfc_ef10_rx_qsize_up_rings;
|
||||
static int
|
||||
sfc_ef10_rx_qsize_up_rings(uint16_t nb_rx_desc,
|
||||
__rte_unused struct rte_mempool *mb_pool,
|
||||
unsigned int *rxq_entries,
|
||||
unsigned int *evq_entries,
|
||||
unsigned int *rxq_max_fill_level)
|
||||
|
@ -384,6 +384,7 @@ sfc_rxq_by_dp_rxq(const struct sfc_dp_rxq *dp_rxq)
|
||||
static sfc_dp_rx_qsize_up_rings_t sfc_efx_rx_qsize_up_rings;
|
||||
static int
|
||||
sfc_efx_rx_qsize_up_rings(uint16_t nb_rx_desc,
|
||||
__rte_unused struct rte_mempool *mb_pool,
|
||||
unsigned int *rxq_entries,
|
||||
unsigned int *evq_entries,
|
||||
unsigned int *rxq_max_fill_level)
|
||||
@ -982,8 +983,8 @@ sfc_rx_qinit(struct sfc_adapter *sa, unsigned int sw_index,
|
||||
struct sfc_rxq *rxq;
|
||||
struct sfc_dp_rx_qcreate_info info;
|
||||
|
||||
rc = sa->dp_rx->qsize_up_rings(nb_rx_desc, &rxq_entries, &evq_entries,
|
||||
&rxq_max_fill_level);
|
||||
rc = sa->dp_rx->qsize_up_rings(nb_rx_desc, mb_pool, &rxq_entries,
|
||||
&evq_entries, &rxq_max_fill_level);
|
||||
if (rc != 0)
|
||||
goto fail_size_up_rings;
|
||||
SFC_ASSERT(rxq_entries >= EFX_RXQ_MINNDESCS);
|
||||
|
Loading…
Reference in New Issue
Block a user