From patchwork Tue Feb 20 11:04:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nithin Dabilpuram X-Patchwork-Id: 136912 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7FAA843B53; Tue, 20 Feb 2024 12:05:49 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD00342D26; Tue, 20 Feb 2024 12:05:15 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by mails.dpdk.org (Postfix) with ESMTP id F347340289; Tue, 20 Feb 2024 12:05:13 +0100 (CET) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41K3qNfq003996; Tue, 20 Feb 2024 03:05:13 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= pfpt0220; bh=qO+uUIADDnZPHqQj5+K/18uqxv2EHcCCUr1r2dttMg8=; b=bpt YkRDSYf95otiWT6XCQLarMVxcsqJyGgKOOFa2WQe8Kg5a714WY/mKhEl1fXjKXP9 nzfRg0TtLNOxlnoWAYs2OnL2aPiaGnnFtdC9HX3KRF1o/pI7G0aK/aKgnuWsP8xf 8tU6LT7WEVf7s6+NrzIb1VPEA+cQcrKFraDliv/LWyPmVjoMAtdqgBSuUR2thjIN h92lyD7+wRz2ZA3JMAFLF/CRkYlW+RDeM9380/0Cb772u6xy20d6fK2u7my4ny/d D/VmRCjjXbQUJvcxa3XJBcMiLKT2D1pmguCudNZ4MUv9/aUdJUH26CNRtEu2VywQ I/Pqjv2jET4U+GP9RQA== Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 3wcmjcs1ye-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 20 Feb 2024 03:05:13 -0800 (PST) Received: from DC5-EXCH05.marvell.com (10.69.176.209) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Tue, 20 Feb 2024 03:05:11 -0800 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.1258.12; Tue, 20 Feb 2024 03:05:11 -0800 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Tue, 20 Feb 2024 03:05:11 -0800 Received: from hyd1588t430.caveonetworks.com (unknown [10.29.52.204]) by maili.marvell.com (Postfix) with ESMTP id 082023F7084; Tue, 20 Feb 2024 03:05:08 -0800 (PST) From: Nithin Dabilpuram To: Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao CC: , Subject: [PATCH v2 08/13] net/cnxk: fix max MTU limit Date: Tue, 20 Feb 2024 16:34:45 +0530 Message-ID: <20240220110450.2227277-8-ndabilpuram@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240220110450.2227277-1-ndabilpuram@marvell.com> References: <20240220110450.2227277-1-ndabilpuram@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: l9f8voV-jWfUSUQ44jh6uF1_xptDiMsQ X-Proofpoint-GUID: l9f8voV-jWfUSUQ44jh6uF1_xptDiMsQ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-20_06,2024-02-20_01,2023-05-22_02 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: Sunil Kumar Kori Device can support maximum frame size up to 9212 bytes. While configuring mtu, overhead is considered as ethernet header size, crc and 2 * (vlan tags) which translates to 26 bytes. Exposed overhead to the user via rte_eth_dev_info() is 18 bytes which were leading to set wrong Rx frame size. Fixes: 8589ec212e80 ("net/cnxk: support MTU set") Cc: stable@dpdk.org Signed-off-by: Sunil Kumar Kori --- drivers/net/cnxk/cnxk_ethdev_ops.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c index 4962f3bced..56049c5dd2 100644 --- a/drivers/net/cnxk/cnxk_ethdev_ops.c +++ b/drivers/net/cnxk/cnxk_ethdev_ops.c @@ -20,8 +20,7 @@ cnxk_nix_info_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *devinfo) devinfo->max_tx_queues = RTE_MAX_QUEUES_PER_PORT; devinfo->max_mac_addrs = dev->max_mac_entries; devinfo->max_vfs = pci_dev->max_vfs; - devinfo->max_mtu = devinfo->max_rx_pktlen - - (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN); + devinfo->max_mtu = devinfo->max_rx_pktlen - CNXK_NIX_L2_OVERHEAD; devinfo->min_mtu = devinfo->min_rx_bufsize - CNXK_NIX_L2_OVERHEAD; devinfo->rx_offload_capa = dev->rx_offload_capa;