From patchwork Wed Feb 24 12:43:11 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 386860 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp343585jap; Wed, 24 Feb 2021 04:46:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJwLXQuyi5ul6GCVXxJi8b6di1wRIplaBi1N4wZPNIn6xgibMqih57WKkC9gkjYo0FzZEGbA X-Received: by 2002:a17:906:753:: with SMTP id z19mr30532741ejb.15.1614170799076; Wed, 24 Feb 2021 04:46:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614170799; cv=none; d=google.com; s=arc-20160816; b=WHeR5kKU8Yl7f7ovq4bueN3EcEqmU+5O0XYdtwZzY88RSZBP+VULPD9bp4lna5ZZNv Z/K1FuzUnH22onp888bccqjCvFXqPvyLdG80wx9w9DMllWRnIugHIXhseoz6rq2w+uUb rvALTHR+o4Zjn4aDtLexN/O3MxwQlB+q3sMzenvSWQSPGqVpc3ITijBSMtoU1kN2YDBv dLyHmgqOmtlEIlmbtOKKinrLPbYzVT80Jc9lRgTcdy9d2WWAKTZGcXAFyow14drIAzGx yQkmLWqhocR1lUAdMLPgNPNTWRlHzQ5zo6Or+y1cSrPQDRYUcVaLhahcCLVyx9Ji7Nsm +AjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=ZBICx2ulwlvENaetITOSxJLlhGMeaOefF8FXoX4taqM=; b=ho2jWK8U/dS5XJtVNwXoKfP8jsAWSncE9h30RsfUtBMamxO4DG47iif9r86IBOVmDv fXd/YNQrgFTqtsDSNfF/gmyVRJisSLwfobXvOVUCdGv+qELGFcIj/6d6DveSoiCNNJMJ zHlOtbVJSaLqqOBeikwqvjmjFkVGRMkzWideX2k9oi9xWyp+fDycgBKdRLF4KDC52wrF 0GsEbZ7W5QDMg9SPko3ofZKAFyPo20Fb/B6AsKs8SCFu4bchUVFAo+jvjcKm9jS/sOZi fUC6jbTf1k90Z2Gk4pRtUvZznqKPExE31FzDB8gX73iWYtWgnw6xfJUh+938sWGtrAt1 XPVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from mails.dpdk.org (mails.dpdk.org. [217.70.189.124]) by mx.google.com with ESMTP id j19si1200325ejx.190.2021.02.24.04.46.38; Wed, 24 Feb 2021 04:46:39 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) client-ip=217.70.189.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 217.70.189.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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(+) -- 2.17.1 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;