patches for DPDK stable branches
 help / color / mirror / Atom feed
* [PATCH v3 1/1] net/mlx5: fix port down in link detection error branch
@ 2025-11-19  5:47 Yang Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Yang Xu @ 2025-11-19  5:47 UTC (permalink / raw)
  To: xu.yang3, yao.chenghu; +Cc: stable


[-- Attachment #1.1.1: Type: text/plain, Size: 1446 bytes --]

The port down state was not initialized in the error branch of link
detection when MLX NIC link status update failed (ret < 0).
This resulted in incorrect link state reporting, as the device
retained stale link status instead of reflecting the actual down
state under error conditions.

Fixes: 1256805dd54 ("net/mlx5: move Linux-specific functions")
Cc: stable@dpdk.org

Signed-off-by: Yang Xu <xu.yang3@zte.com.cn>
---
 .mailmap                                | 1 +
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index 34a99f93a1..14d6ee93dd 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1891,3 +1891,4 @@ Zoltan Kiss <zoltan.kiss@schaman.hu> <zoltan.kiss@linaro.org>
 Zorik Machulsky <zorik@amazon.com>
 Zyta Szpak <zyta@marvell.com> <zr@semihalf.com>
 Zyta Szpak <zyta@marvell.com> <zyta.szpak@semihalf.com>
+Yang Xu <xu.yang3@zte.com.cn>
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 9daeda5435..49b88dfebb 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -504,6 +504,7 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 				return -rte_errno;
 			}
 		} else if (ret < 0) {
+			memset(&dev->data->dev_link, 0, sizeof(dev->data->dev_link));
 			return ret;
 		}
 	} while (wait_to_complete || retry-- > 0);
-- 
2.27.0

[-- Attachment #1.1.2: Type: text/html , Size: 2918 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/1] net/mlx5: fix port down in link detection error branch
@ 2025-11-19  6:02 Yang Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Yang Xu @ 2025-11-19  6:02 UTC (permalink / raw)
  To: thomas, dsosnowski, viacheslavo, bingz, orika, suanmingm, matan,
	xu.yang3, yao.chenghu
  Cc: dev, stable


[-- Attachment #1.1.1: Type: text/plain, Size: 1446 bytes --]

The port down state was not initialized in the error branch of link
detection when MLX NIC link status update failed (ret < 0).
This resulted in incorrect link state reporting, as the device
retained stale link status instead of reflecting the actual down
state under error conditions.

Fixes: 1256805dd54 ("net/mlx5: move Linux-specific functions")
Cc: stable@dpdk.org

Signed-off-by: Yang Xu <xu.yang3@zte.com.cn>
---
 .mailmap                                | 1 +
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index 34a99f93a1..14d6ee93dd 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1891,3 +1891,4 @@ Zoltan Kiss <zoltan.kiss@schaman.hu> <zoltan.kiss@linaro.org>
 Zorik Machulsky <zorik@amazon.com>
 Zyta Szpak <zyta@marvell.com> <zr@semihalf.com>
 Zyta Szpak <zyta@marvell.com> <zyta.szpak@semihalf.com>
+Yang Xu <xu.yang3@zte.com.cn>
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 9daeda5435..49b88dfebb 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -504,6 +504,7 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 				return -rte_errno;
 			}
 		} else if (ret < 0) {
+			memset(&dev->data->dev_link, 0, sizeof(dev->data->dev_link));
 			return ret;
 		}
 	} while (wait_to_complete || retry-- > 0);
-- 
2.27.0

[-- Attachment #1.1.2: Type: text/html , Size: 2918 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/1] net/mlx5: fix port down in link detection error branch
@ 2025-11-19  5:08 Yang Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Yang Xu @ 2025-11-19  5:08 UTC (permalink / raw)
  To: xu.yang3, yao.chenghu; +Cc: stable


[-- Attachment #1.1.1: Type: text/plain, Size: 1383 bytes --]

The port state was not initialized down in the error branch
when detecting MLX NIC link status. This resulted in incorrect
link state reporting, as the device failed to reflect the actual
down status under error conditions.

Fixes: 1256805dd54 ("net/mlx5: move Linux-specific functions")
Cc: stable@dpdk.org

Signed-off-by: Yang Xu <xu.yang3@zte.com.cn>
---
 .mailmap                                | 1 +
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index 34a99f93a1..14d6ee93dd 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1891,3 +1891,4 @@ Zoltan Kiss <zoltan.kiss@schaman.hu> <zoltan.kiss@linaro.org>
 Zorik Machulsky <zorik@amazon.com>
 Zyta Szpak <zyta@marvell.com> <zr@semihalf.com>
 Zyta Szpak <zyta@marvell.com> <zyta.szpak@semihalf.com>
+Yang Xu <xu.yang3@zte.com.cn>
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 9daeda5435..49b88dfebb 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -504,6 +504,7 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 				return -rte_errno;
 			}
 		} else if (ret < 0) {
+			memset(&dev->data->dev_link, 0, sizeof(dev->data->dev_link));
 			return ret;
 		}
 	} while (wait_to_complete || retry-- > 0);
-- 
2.27.0

[-- Attachment #1.1.2: Type: text/html , Size: 2798 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH v3 1/1] net/mlx5: fix port down in link detection error branch
@ 2025-11-18  9:30 Yang Xu
  0 siblings, 0 replies; 4+ messages in thread
From: Yang Xu @ 2025-11-18  9:30 UTC (permalink / raw)
  To: xu.yang3, yao.chenghu; +Cc: stable


[-- Attachment #1.1.1: Type: text/plain, Size: 1383 bytes --]

The port down state was not initialized in the error branch
when detecting MLX NIC link status. This resulted in incorrect
link state reporting, as the device failed to reflect the actual
down status under error conditions.

Fixes: 1256805dd54 ("net/mlx5: move Linux-specific functions")
Cc: stable@dpdk.org

Signed-off-by: Yang Xu <xu.yang3@zte.com.cn>
---
 .mailmap                                | 1 +
 drivers/net/mlx5/linux/mlx5_ethdev_os.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index 34a99f93a1..14d6ee93dd 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1891,3 +1891,4 @@ Zoltan Kiss <zoltan.kiss@schaman.hu> <zoltan.kiss@linaro.org>
 Zorik Machulsky <zorik@amazon.com>
 Zyta Szpak <zyta@marvell.com> <zr@semihalf.com>
 Zyta Szpak <zyta@marvell.com> <zyta.szpak@semihalf.com>
+Yang Xu <xu.yang3@zte.com.cn>
diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
index 9daeda5435..49b88dfebb 100644
--- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c
@@ -504,6 +504,7 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
 				return -rte_errno;
 			}
 		} else if (ret < 0) {
+			memset(&dev->data->dev_link, 0, sizeof(dev->data->dev_link));
 			return ret;
 		}
 	} while (wait_to_complete || retry-- > 0);
-- 
2.27.0

[-- Attachment #1.1.2: Type: text/html , Size: 2798 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-19  6:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-19  5:47 [PATCH v3 1/1] net/mlx5: fix port down in link detection error branch Yang Xu
  -- strict thread matches above, loose matches on Subject: below --
2025-11-19  6:02 Yang Xu
2025-11-19  5:08 Yang Xu
2025-11-18  9:30 Yang Xu

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).