From: Andrew Rybchenko Date: Thu, 19 Apr 2018 11:36:57 +0000 (+0100) Subject: net/sfc: check mempool when equal stride super-buffer used X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=2a97a82b658b412acbefcf53d033b59e4011940a;p=dpdk.git net/sfc: check mempool when equal stride super-buffer used Equal stride super-buffer requires mempool with contiguous object block allocation mechanism. Bucket mempool is the only which provides it. Signed-off-by: Andrew Rybchenko Reviewed-by: Ivan Malov --- diff --git a/drivers/net/sfc/sfc_ef10_essb_rx.c b/drivers/net/sfc/sfc_ef10_essb_rx.c index 1df61ff39b..8dd43964d8 100644 --- a/drivers/net/sfc/sfc_ef10_essb_rx.c +++ b/drivers/net/sfc/sfc_ef10_essb_rx.c @@ -391,6 +391,18 @@ sfc_ef10_essb_rx_get_dev_info(struct rte_eth_dev_info *dev_info) dev_info->rx_desc_lim.nb_align = SFC_RX_REFILL_BULK; } +static sfc_dp_rx_pool_ops_supported_t sfc_ef10_essb_rx_pool_ops_supported; +static int +sfc_ef10_essb_rx_pool_ops_supported(const char *pool) +{ + SFC_ASSERT(pool != NULL); + + if (strcmp(pool, "bucket") == 0) + return 0; + + return -ENOTSUP; +} + static sfc_dp_rx_qsize_up_rings_t sfc_ef10_essb_rx_qsize_up_rings; static int sfc_ef10_essb_rx_qsize_up_rings(uint16_t nb_rx_desc, @@ -630,6 +642,7 @@ struct sfc_dp_rx sfc_ef10_essb_rx = { }, .features = 0, .get_dev_info = sfc_ef10_essb_rx_get_dev_info, + .pool_ops_supported = sfc_ef10_essb_rx_pool_ops_supported, .qsize_up_rings = sfc_ef10_essb_rx_qsize_up_rings, .qcreate = sfc_ef10_essb_rx_qcreate, .qdestroy = sfc_ef10_essb_rx_qdestroy,