From: Hemant Agrawal Date: Wed, 24 Feb 2021 12:43:11 +0000 (+0530) Subject: net/dpaa: support Rx buffer size X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=378cd4887d6c02bf771eee3a8b56a3af41f37b7c;p=dpdk.git net/dpaa: support Rx buffer size This patch adds Rx buf size support in rxq info for dpaa. Signed-off-by: Hemant Agrawal --- diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h index a3cf77f0e3..f3a5d05970 100644 --- a/drivers/bus/dpaa/include/fsl_fman.h +++ b/drivers/bus/dpaa/include/fsl_fman.h @@ -139,6 +139,7 @@ __rte_internal void fman_if_set_sg(struct fman_if *fm_if, int enable); /* Get interface Max Frame length (MTU) */ +__rte_internal uint16_t fman_if_get_maxfrm(struct fman_if *fm_if); /* Set interface Max Frame length (MTU) */ diff --git a/drivers/bus/dpaa/version.map b/drivers/bus/dpaa/version.map index fe4f9ac5aa..1bd5a01ec5 100644 --- a/drivers/bus/dpaa/version.map +++ b/drivers/bus/dpaa/version.map @@ -30,6 +30,7 @@ INTERNAL { fman_if_get_fc_quanta; fman_if_get_fc_threshold; fman_if_get_fdoff; + fman_if_get_maxfrm; fman_if_get_sg_enable; fman_if_loopback_disable; fman_if_loopback_enable; diff --git a/drivers/net/dpaa/dpaa_ethdev.c b/drivers/net/dpaa/dpaa_ethdev.c index a3a3e7cb24..176943a8ea 100644 --- a/drivers/net/dpaa/dpaa_ethdev.c +++ b/drivers/net/dpaa/dpaa_ethdev.c @@ -1521,12 +1521,19 @@ dpaa_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, { struct dpaa_if *dpaa_intf = dev->data->dev_private; struct qman_fq *rxq; + int ret; rxq = dev->data->rx_queues[queue_id]; qinfo->mp = dpaa_intf->bp_info->mp; qinfo->scattered_rx = dev->data->scattered_rx; qinfo->nb_desc = rxq->nb_desc; + + /* Report the HW Rx buffer length to user */ + ret = fman_if_get_maxfrm(dev->process_private); + if (ret > 0) + qinfo->rx_buf_size = ret; + qinfo->conf.rx_free_thresh = 1; qinfo->conf.rx_drop_en = 1; qinfo->conf.rx_deferred_start = 0;