patches for DPDK stable branches
 help / color / mirror / Atom feed
Cc: Wenxuan Wu <>,
Subject: [PATCH] net/i40e: fix max frmame size config at port level
Date: Thu, 28 Apr 2022 08:56:13 +0000
Message-ID: <> (raw)

From: Wenxuan Wu <>

Max frame size of XL710 can only be set when link is up, and the wait
time is 1 sec. But X722 consumes longer time which is too short to up would
result in this error.

Acctually, max frame size of X722 can be set regardless of link status.

This fix resolve max frame size can only be set when link is up.

Fixes: a4ba77367923 ("net/i40e: enable maximum frame size at port level")

Signed-off-by: Wenxuan Wu <>
 drivers/net/i40e/i40e_ethdev.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 755786dc10..d3cc6a2769 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12108,17 +12108,15 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
 		update_link_reg(hw, &link);
 		if (link.link_status)
 	} while (--rep_cnt);
-	if (link.link_status) {
+	/* Only I40E_MAC_XL710 link up should be guaranteed */
+	if (hw->mac.type == I40E_MAC_X722 || link.link_status)
 		status = i40e_aq_set_mac_config(hw, size, TRUE, 0, false, NULL);
-		if (status != I40E_SUCCESS)
-			PMD_DRV_LOG(ERR, "Failed to set max frame size at port level");
-	} else {
-		PMD_DRV_LOG(ERR, "Set max frame size at port level not applicable on link down");
-	}
+	if (status != I40E_SUCCESS)
+		PMD_DRV_LOG(ERR, "Failed to set max frame size at port level");
 RTE_LOG_REGISTER_SUFFIX(i40e_logtype_init, init, NOTICE);

             reply	other threads:[~2022-04-28  9:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28  8:56 wenxuanx.wu [this message]
2022-04-28  8:57 wenxuanx.wu
2022-04-28 11:12 wenxuanx.wu
2022-05-10 16:50 Zhang, Yuying

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ \
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone