From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C6A73A034F; Wed, 24 Feb 2021 13:46:38 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68C3C1608DC; Wed, 24 Feb 2021 13:43:52 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 20A62160874 for ; Wed, 24 Feb 2021 13:43:33 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id EC7331A0398; Wed, 24 Feb 2021 13:43:32 +0100 (CET) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id D849E1A0391; Wed, 24 Feb 2021 13:43:30 +0100 (CET) Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.133.63]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 4165E40327; Wed, 24 Feb 2021 13:43:28 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Hemant Agrawal Date: Wed, 24 Feb 2021 18:13:11 +0530 Message-Id: <20210224124311.29799-24-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210224124311.29799-1-hemant.agrawal@nxp.com> References: <20210211141620.12482-1-hemant.agrawal@nxp.com> <20210224124311.29799-1-hemant.agrawal@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Subject: [dpdk-dev] [PATCH v3 23/23] net/dpaa: add Rx buf size support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch adds rx buf size support in rxq info for dpaa Signed-off-by: Hemant Agrawal --- drivers/bus/dpaa/include/fsl_fman.h | 1 + drivers/bus/dpaa/version.map | 1 + drivers/net/dpaa/dpaa_ethdev.c | 7 +++++++ 3 files changed, 9 insertions(+) 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; -- 2.17.1