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 B498145BB0; Wed, 23 Oct 2024 14:00:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4083F427B2; Wed, 23 Oct 2024 14:00:11 +0200 (CEST) Received: from inva020.nxp.com (inva020.nxp.com [92.121.34.13]) by mails.dpdk.org (Postfix) with ESMTP id E72A3402C6 for ; Wed, 23 Oct 2024 13:59:58 +0200 (CEST) Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id C733F1A135B; Wed, 23 Oct 2024 13:59:58 +0200 (CEST) Received: from aprdc01srsp001v.ap-rdc01.nxp.com (aprdc01srsp001v.ap-rdc01.nxp.com [165.114.16.16]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 8CE361A20CD; Wed, 23 Oct 2024 13:59:58 +0200 (CEST) Received: from lsv03379.swis.in-blr01.nxp.com (lsv03379.swis.in-blr01.nxp.com [92.120.147.188]) by aprdc01srsp001v.ap-rdc01.nxp.com (Postfix) with ESMTP id 9E6FB183DC02; Wed, 23 Oct 2024 19:59:57 +0800 (+08) From: vanshika.shukla@nxp.com To: dev@dpdk.org, Hemant Agrawal , Sachin Saxena Cc: Apeksha Gupta , Jun Yang Subject: [v5 03/42] net/dpaa2: add proper MTU debugging print Date: Wed, 23 Oct 2024 17:29:16 +0530 Message-Id: <20241023115955.1207617-4-vanshika.shukla@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241023115955.1207617-1-vanshika.shukla@nxp.com> References: <20241022191256.516818-1-vanshika.shukla@nxp.com> <20241023115955.1207617-1-vanshika.shukla@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: ClamAV using ClamSMTP 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 From: Apeksha Gupta This patch add proper debug info for check information of max-pkt-len and configured params. also store MTU Signed-off-by: Apeksha Gupta Signed-off-by: Jun Yang --- drivers/net/dpaa2/dpaa2_ethdev.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/dpaa2/dpaa2_ethdev.c b/drivers/net/dpaa2/dpaa2_ethdev.c index 051ebd9d8e..ab64df6a59 100644 --- a/drivers/net/dpaa2/dpaa2_ethdev.c +++ b/drivers/net/dpaa2/dpaa2_ethdev.c @@ -579,9 +579,11 @@ dpaa2_eth_dev_configure(struct rte_eth_dev *dev) DPAA2_PMD_ERR("Unable to set mtu. check config"); return ret; } - DPAA2_PMD_INFO("MTU configured for the device: %d", + DPAA2_PMD_DEBUG("MTU configured for the device: %d", dev->data->mtu); } else { + DPAA2_PMD_ERR("Configured mtu %d and calculated max-pkt-len is %d which should be <= %d", + eth_conf->rxmode.mtu, max_rx_pktlen, DPAA2_MAX_RX_PKT_LEN); return -1; } @@ -1537,6 +1539,7 @@ dpaa2_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu) DPAA2_PMD_ERR("Setting the max frame length failed"); return -1; } + dev->data->mtu = mtu; DPAA2_PMD_INFO("MTU configured for the device: %d", mtu); return 0; } @@ -2839,6 +2842,7 @@ dpaa2_dev_init(struct rte_eth_dev *eth_dev) DPAA2_PMD_ERR("Unable to set mtu. check config"); goto init_err; } + eth_dev->data->mtu = RTE_ETHER_MTU; /*TODO To enable soft parser support DPAA2 driver needs to integrate * with external entity to receive byte code for software sequence -- 2.25.1