From patchwork Wed Feb 24 12:43:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 386859 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp343527jap; Wed, 24 Feb 2021 04:46:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuFvcOrB/x7863UawpQaQdSjs9tfmV3uHQu7AyzyjLq1ZiCE35T631hx8tr3AhHY+tjhFz X-Received: by 2002:a17:906:2e96:: with SMTP id o22mr31134784eji.190.1614170792253; Wed, 24 Feb 2021 04:46:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614170792; cv=none; d=google.com; s=arc-20160816; b=dr9ZkQWR1U9Y87APliWptUIH+WyX2RTbPvaKxapAv9Xp/NGfQ8hXXF/CbNNNx3n93z +XwMUCQQrFmGdgMXbwWdJLPLpw4jHsIV3yet3SHlxaLbsqwfDyH/fiNdBllz8FjeLcqM ieWnfqOh2UpGqbuyrf94P2mNvw19rLGeDE7mwwglvGVUvRtWmAWa+e0j5HoSkkbFe/tl oe1O8gFWf4rNyIj75BWxDf+PEoHSy5zKPeBhc0fD/HRK6f57JON3fGH0B/OxZBHEYAmN q7JdRcripOzVWSf/P/Dk3eNTqcm5Vxd1uFXRBYKicYYOUXj7t02PWrAUijCyOso+02Ka YDcw== 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=lZ9jth6ZOkH3AcGJFX7Mq8UkmpCpvjbJt/zXSAAZFAs=; b=m1GuY8rx/RKJOMaXVc2jnwF/u30jfCVB2MKd/gZN76uIj0amnoWUeDpeEHwoDftNmi G+lRjlbj5uZho+dgx4JRkIgZkTKpWQ6TayqleFBauc+8o2BiI+9shS3OK134M2RbFVKZ T0zIyb+TNcHH6CKLwQyTNG9lXIwWsqj6Azw6K4wbosawi/E3WT6+HKeAEQ4tQcAFPUHt M4u2c6LT9ti5yxXNfYwO/9G2hu7BBaOIhQ6zNsdIdcKdlxCwokZWZm24UZwp1ajUVnVg xFH7FBnoSCkdphVZky0zYfgaFlRisT5jXLyl649BmJONVxzy7Wqi9wcjJDF+B9wasMbF LjqQ== 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 hc6si1269481ejc.554.2021.02.24.04.46.32; Wed, 24 Feb 2021 04:46:32 -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 1299C1608D7; Wed, 24 Feb 2021 13:43:51 +0100 (CET) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id 7BA85160874 for ; Wed, 24 Feb 2021 13:43:32 +0100 (CET) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 552411A039F; 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 412571A0395; 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 9921F40332; Wed, 24 Feb 2021 13:43:27 +0100 (CET) From: Hemant Agrawal To: dev@dpdk.org Cc: ferruh.yigit@intel.com, Hemant Agrawal Date: Wed, 24 Feb 2021 18:13:10 +0530 Message-Id: <20210224124311.29799-23-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 22/23] net/dpaa2: 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 queue info Signed-off-by: Hemant Agrawal --- drivers/net/dpaa2/dpaa2_ethdev.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1 diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 586d116227..0e7ebf4dc0 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -2368,12 +2368,18 @@ dpaa2_rxq_info_get(struct rte_eth_dev *dev, uint16_t queue_id, struct rte_eth_rxq_info *qinfo) { struct dpaa2_queue *rxq; + struct dpaa2_dev_priv *priv = dev->data->dev_private; + struct fsl_mc_io *dpni = (struct fsl_mc_io *)dev->process_private; + uint16_t max_frame_length; rxq = (struct dpaa2_queue *)dev->data->rx_queues[queue_id]; qinfo->mp = rxq->mb_pool; qinfo->scattered_rx = dev->data->scattered_rx; qinfo->nb_desc = rxq->nb_desc; + if (dpni_get_max_frame_length(dpni, CMD_PRI_LOW, priv->token, + &max_frame_length) == 0) + qinfo->rx_buf_size = max_frame_length; qinfo->conf.rx_free_thresh = 1; qinfo->conf.rx_drop_en = 1;