[PATCH v3 1/1] net/mlx5: fix port down in link detection error branch
Yang Xu
xu.yang3 at zte.com.cn
Tue Nov 18 10:30:11 CET 2025
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 at dpdk.org
Signed-off-by: Yang Xu <xu.yang3 at 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 at schaman.hu> <zoltan.kiss at linaro.org>
Zorik Machulsky <zorik at amazon.com>
Zyta Szpak <zyta at marvell.com> <zr at semihalf.com>
Zyta Szpak <zyta at marvell.com> <zyta.szpak at semihalf.com>
+Yang Xu <xu.yang3 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mails.dpdk.org/archives/stable/attachments/20251118/87aa66e7/attachment.htm>
More information about the stable
mailing list