[PATCH 21.11 2/3] Revert "net/i40e: fix max frame size config at port level"

Kevin Traynor ktraynor at redhat.com
Tue Dec 13 19:47:32 CET 2022


This reverts commit 67309512051829f552bc105ac63f48029629e238.

This chain of commits has been found to cause issues with setting
max frame size when the link is not negotiated in 1s or the link
is down. The frame size is not set and no error is returned to
the user.

Revert the chain until a fix is found.

Link to original upstream commit and discussion:
2184f7cdeeaa ("net/i40e: fix max frame size config at port level")
https://mails.dpdk.org/archives/dev/2022-December/257566.html

Reported-by: David Marchand <david.marchand at redhat.com>
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
---
 drivers/net/i40e/i40e_ethdev.c | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index bad27355fc..4ac31c2fec 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -12113,18 +12113,14 @@ i40e_set_mac_max_frame(struct rte_eth_dev *dev, uint16_t size)
 	struct rte_eth_link link;
 	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) {
-		do {
-			update_link_reg(hw, &link);
-			if (link.link_status)
-				break;
-			rte_delay_ms(CHECK_INTERVAL);
-		} while (--rep_cnt);
-		can_be_set = !!link.link_status;
-	}
+	do {
+		update_link_reg(hw, &link);
+		if (link.link_status)
+			break;
 
-	if (can_be_set) {
+		rte_delay_ms(CHECK_INTERVAL);
+	} while (--rep_cnt);
+
+	if (link.link_status) {
 		status = i40e_aq_set_mac_config(hw, size, TRUE, 0, false, NULL);
 		if (status != I40E_SUCCESS)
-- 
2.38.1



More information about the stable mailing list