From: Andrew Rybchenko Date: Thu, 19 Apr 2018 11:36:54 +0000 (+0100) Subject: net/sfc: allow to take mbuf pool into account when sizing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=d101da1b9ccc3dba3a23ffc2a82eb871d260f660;p=dpdk.git 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 Reviewed-by: Ivan Malov --- diff --git a/drivers/net/sfc/sfc_dp_rx.h b/drivers/net/sfc/sfc_dp_rx.h index cc9e7c410a..ecb486fbaa 100644 --- a/drivers/net/sfc/sfc_dp_rx.h +++ b/drivers/net/sfc/sfc_dp_rx.h @@ -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); diff --git a/drivers/net/sfc/sfc_ef10_rx.c b/drivers/net/sfc/sfc_ef10_rx.c index 5ec82dbf29..1f0d6a0a09 100644 --- a/drivers/net/sfc/sfc_ef10_rx.c +++ b/drivers/net/sfc/sfc_ef10_rx.c @@ -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) diff --git a/drivers/net/sfc/sfc_rx.c b/drivers/net/sfc/sfc_rx.c index e24a6ef3a1..7345074cd2 100644 --- a/drivers/net/sfc/sfc_rx.c +++ b/drivers/net/sfc/sfc_rx.c @@ -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);