DPDK patches and discussions
 help / color / mirror / Atom feed
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>
Subject: [PATCH 07/13] common/cnxk: skip setting Tx MTU separately
Date: Thu, 8 Feb 2024 14:29:50 +0530	[thread overview]
Message-ID: <20240208085956.1741174-7-ndabilpuram@marvell.com> (raw)
In-Reply-To: <20240208085956.1741174-1-ndabilpuram@marvell.com>

Skip setting Tx MTU separately as now the Tx credit configuration
is based on max MTU possible for that link.
Also init MTU with max value for that port.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
 drivers/common/cnxk/roc_nix.c      |  2 +-
 drivers/common/cnxk/roc_nix.h      |  2 --
 drivers/net/cnxk/cnxk_ethdev_ops.c | 12 +-----------
 3 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/drivers/common/cnxk/roc_nix.c b/drivers/common/cnxk/roc_nix.c
index f64933a1d9..afbc3eb901 100644
--- a/drivers/common/cnxk/roc_nix.c
+++ b/drivers/common/cnxk/roc_nix.c
@@ -482,7 +482,7 @@ roc_nix_dev_init(struct roc_nix *roc_nix)
 	sdp_lbk_id_update(pci_dev, nix);
 	nix->pci_dev = pci_dev;
 	nix->reta_sz = reta_sz;
-	nix->mtu = ROC_NIX_DEFAULT_HW_FRS;
+	nix->mtu = roc_nix_max_pkt_len(roc_nix);
 	nix->dmac_flt_idx = -1;
 
 	/* Register error and ras interrupts */
diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 9d57ca0be7..3799b551f2 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -267,8 +267,6 @@ struct roc_nix_eeprom_info {
 #define ROC_NIX_RSS_KEY_LEN	     48 /* 352 Bits */
 #define ROC_NIX_RSS_MCAM_IDX_DEFAULT (-1)
 
-#define ROC_NIX_DEFAULT_HW_FRS 1514
-
 #define ROC_NIX_VWQE_MAX_SIZE_LOG2 11
 #define ROC_NIX_VWQE_MIN_SIZE_LOG2 2
 
diff --git a/drivers/net/cnxk/cnxk_ethdev_ops.c b/drivers/net/cnxk/cnxk_ethdev_ops.c
index e816884d47..4962f3bced 100644
--- a/drivers/net/cnxk/cnxk_ethdev_ops.c
+++ b/drivers/net/cnxk/cnxk_ethdev_ops.c
@@ -610,19 +610,9 @@ cnxk_nix_mtu_set(struct rte_eth_dev *eth_dev, uint16_t mtu)
 
 	frame_size -= RTE_ETHER_CRC_LEN;
 
-	/* Update mtu on Tx */
-	rc = roc_nix_mac_mtu_set(nix, frame_size);
-	if (rc) {
-		plt_err("Failed to set MTU, rc=%d", rc);
-		goto exit;
-	}
-
-	/* Sync same frame size on Rx */
+	/* Set frame size on Rx */
 	rc = roc_nix_mac_max_rx_len_set(nix, frame_size);
 	if (rc) {
-		/* Rollback to older mtu */
-		roc_nix_mac_mtu_set(nix,
-				    old_frame_size - RTE_ETHER_CRC_LEN);
 		plt_err("Failed to max Rx frame length, rc=%d", rc);
 		goto exit;
 	}
-- 
2.25.1


  parent reply	other threads:[~2024-02-08  9:01 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-08  8:59 [PATCH 01/13] common/cnxk: remove cn9k Inline IPsec FP opcode defines Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 02/13] net/cnxk: add IPsec SA defines for PMD API Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 03/13] net/cnxk: add transport mode to security capability on cn9k Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 04/13] common/cnxk: dump selected SQ entries Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 05/13] net/cnxk: added Tx descriptor dump API Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 06/13] net/cnxk: fix issue with buff size compute Nithin Dabilpuram
2024-02-08  8:59 ` Nithin Dabilpuram [this message]
2024-02-08  8:59 ` [PATCH 08/13] net/cnxk: fix max MTU limit Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 09/13] common/cnxk: update queue entries copy in RETA table Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 10/13] net/cnxk: fix indirect mbuf handling in Tx path Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 11/13] net/cnxk: fix check cookies for multi-seg offload Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 12/13] common/cnxk: add IO attribute to mbox structs Nithin Dabilpuram
2024-02-08  8:59 ` [PATCH 13/13] common/cnxk: use SQ enable and disable API Nithin Dabilpuram
2024-02-09  9:28   ` Jerin Jacob
2024-02-22 11:02 ` [PATCH v4 01/14] common/cnxk: remove cn9k Inline IPsec FP opcode defines Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 02/14] net/cnxk: add IPsec SA defines for PMD API Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 03/14] net/cnxk: add transport mode to security capability on cn9k Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 04/14] common/cnxk: dump selected SQ entries Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 05/14] net/cnxk: added Tx descriptor dump API Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 06/14] net/cnxk: fix issue with buff size compute Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 07/14] common/cnxk: skip setting Tx MTU separately Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 08/14] net/cnxk: fix max MTU limit Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 09/14] common/cnxk: update queue entries copy in RETA table Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 10/14] net/cnxk: fix indirect mbuf handling in Tx path Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 11/14] net/cnxk: fix check cookies for multi-seg offload Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 12/14] common/cnxk: add IO attribute to mbox structs Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 13/14] common/cnxk: use SQ enable and disable API Nithin Dabilpuram
2024-02-22 11:02   ` [PATCH v4 14/14] net/cnxk: reset mbuf fields in multi-seg Tx path Nithin Dabilpuram
2024-02-26 13:35 ` [PATCH v5 01/14] common/cnxk: remove cn9k Inline IPsec FP opcode defines Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 02/14] net/cnxk: add IPsec SA defines for PMD API Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 03/14] net/cnxk: add transport mode to security capability on cn9k Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 04/14] common/cnxk: dump selected SQ entries Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 05/14] net/cnxk: added Tx descriptor dump API Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 06/14] net/cnxk: fix issue with buff size compute Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 07/14] common/cnxk: fix Tx MTU configuration Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 08/14] net/cnxk: fix max MTU limit Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 09/14] common/cnxk: fix RETA table config API Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 10/14] net/cnxk: fix indirect mbuf handling in Tx path Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 11/14] net/cnxk: fix check cookies for multi-seg offload Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 12/14] common/cnxk: fix mbox struct attributes Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 13/14] common/cnxk: use SQ enable and disable API Nithin Dabilpuram
2024-02-26 13:35   ` [PATCH v5 14/14] net/cnxk: fix mbuf fields in multi-seg Tx path Nithin Dabilpuram
2024-02-29 18:23     ` Jerin Jacob

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=20240208085956.1741174-7-ndabilpuram@marvell.com \
    --to=ndabilpuram@marvell.com \
    --cc=dev@dpdk.org \
    --cc=kirankumark@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    /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).