DPDK patches and discussions
 help / color / mirror / Atom feed
From: Jie Wang <jie1x.wang@intel.com>
To: dev@dpdk.org
Cc: stevex.yang@intel.com, qi.z.zhang@intel.com,
	qiming.yang@intel.com, beilei.xing@intel.com,
	yuying.zhang@intel.com, Jie Wang <jie1x.wang@intel.com>,
	stable@dpdk.org
Subject: [PATCH] net/i40e: fix X722 NIC receives jumbo frame packets
Date: Thu, 10 Nov 2022 11:45:24 +0800	[thread overview]
Message-ID: <20221110034524.467431-1-jie1x.wang@intel.com> (raw)

For NIC I40E_10G-10G_BASE_T_X722, when the port is configured with
link speed, it cannot receive jumbo frame packets.

Because it set maximum frame size failed when starts the port that
the port link status is still down.

This patch fix the error that starts the port will force set maximum
frame size.

Fixes: 2184f7cdeeaa ("net/i40e: fix max frame size config at port level")
Cc: stable@dpdk.org

Signed-off-by: Jie Wang <jie1x.wang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 80fbcc847c..7726a89d99 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12132,8 +12132,13 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
 	enum i40e_status_code status;
 	bool can_be_set = true;
 
-	/* I40E_MEDIA_TYPE_BASET link up can be ignored */
-	if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET) {
+	/*
+	 * I40E_MEDIA_TYPE_BASET link up can be ignored
+	 * I40E_MEDIA_TYPE_BASET link down that hw->phy.media_type
+	 * is I40E_MEDIA_TYPE_UNKNOWN
+	 */
+	if (hw->phy.media_type != I40E_MEDIA_TYPE_BASET &&
+	    hw->phy.media_type != I40E_MEDIA_TYPE_UNKNOWN) {
 		do {
 			update_link_reg(hw, &link);
 			if (link.link_status)
-- 
2.25.1


             reply	other threads:[~2022-11-10  3:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  3:45 Jie Wang [this message]
2022-11-10  5:59 ` Yuan, DukaiX
2022-11-10  9:47   ` Zhang, Qi Z
2022-12-05 11:15     ` David Marchand
2022-12-05 12:02       ` Kevin Traynor
2022-12-06  0:01       ` Zhang, Qi Z
2022-12-06 10:12         ` Kevin Traynor

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=20221110034524.467431-1-jie1x.wang@intel.com \
    --to=jie1x.wang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=stevex.yang@intel.com \
    --cc=yuying.zhang@intel.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).