From: Nithin Dabilpuram <ndabilpuram@marvell.com>
To: Nithin Dabilpuram <ndabilpuram@marvell.com>,
Kiran Kumar K <kirankumark@marvell.com>,
Sunil Kumar Kori <skori@marvell.com>,
Satha Rao <skoteshwar@marvell.com>
Cc: <dev@dpdk.org>, <stable@dpdk.org>
Subject: [PATCH v2 08/13] net/cnxk: fix max MTU limit
Date: Tue, 20 Feb 2024 16:34:45 +0530 [thread overview]
Message-ID: <20240220110450.2227277-8-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20240220110450.2227277-1-ndabilpuram@marvell.com>
From: Sunil Kumar Kori <skori@marvell.com>
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 <skori@marvell.com>
---
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;
--
2.25.1
next prev parent reply other threads:[~2024-02-20 11:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 11:04 [PATCH v2 01/13] common/cnxk: remove cn9k Inline IPsec FP opcode defines Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 02/13] net/cnxk: add IPsec SA defines for PMD API Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 03/13] net/cnxk: add transport mode to security capability on cn9k Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 04/13] common/cnxk: dump selected SQ entries Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 05/13] net/cnxk: added Tx descriptor dump API Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 06/13] net/cnxk: fix issue with buff size compute Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 07/13] common/cnxk: skip setting Tx MTU separately Nithin Dabilpuram
2024-02-20 11:04 ` Nithin Dabilpuram [this message]
2024-02-20 11:04 ` [PATCH v2 09/13] common/cnxk: update queue entries copy in RETA table Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 10/13] net/cnxk: fix indirect mbuf handling in Tx path Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 11/13] net/cnxk: fix check cookies for multi-seg offload Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 12/13] common/cnxk: add IO attribute to mbox structs Nithin Dabilpuram
2024-02-20 11:04 ` [PATCH v2 13/13] common/cnxk: use SQ enable and disable API Nithin Dabilpuram
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240220110450.2227277-8-ndabilpuram@marvell.com \
--to=ndabilpuram@marvell.com \
--cc=dev@dpdk.org \
--cc=kirankumark@marvell.com \
--cc=skori@marvell.com \
--cc=skoteshwar@marvell.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).