* [PATCH 0/3] fix build with MinGW 13
@ 2025-08-13 15:25 Thomas Monjalon
2025-08-13 15:25 ` [PATCH 1/3] bus/pci: " Thomas Monjalon
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Thomas Monjalon @ 2025-08-13 15:25 UTC (permalink / raw)
To: dev
After an upgrade to MinGW version 13, some compilation errors appear
in PCI, mlx5 and bbdev code.
This series fixes them all.
Thomas Monjalon (3):
bus/pci: fix build with MinGW 13
net/mlx5: fix build with MinGW 13
bbdev: wrong fix for MinGW 13
drivers/bus/pci/windows/pci_netuio.c | 6 ------
drivers/bus/pci/windows/pci_netuio.h | 4 +++-
drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +-
lib/bbdev/rte_bbdev.c | 9 +++++++--
4 files changed, 11 insertions(+), 10 deletions(-)
--
2.47.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] bus/pci: fix build with MinGW 13
2025-08-13 15:25 [PATCH 0/3] fix build with MinGW 13 Thomas Monjalon
@ 2025-08-13 15:25 ` Thomas Monjalon
2025-08-13 15:25 ` [PATCH 2/3] net/mlx5: " Thomas Monjalon
2025-08-13 15:25 ` [PATCH 3/3] bbdev: wrong fix for " Thomas Monjalon
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2025-08-13 15:25 UTC (permalink / raw)
To: dev
Cc: stable, Chenbo Xia, Nipun Gupta, Dmitry Kozlyuk, Tyler Retzlaff,
Ranjit Menon
After an upgrade to MinGW version 13, some compilation errors appear:
drivers/bus/pci/windows/pci.c:362:58:
error: 'GUID_DEVCLASS_NETUIO' undeclared
drivers/bus/pci/windows/pci_netuio.c:57:39:
error: 'GUID_DEVINTERFACE_NETUIO' undeclared
The cause is MinGW has set NTDDI_VERSION to the highest version
without defining the expected NETUIO constants.
It is safer to not rely on Windows headers version,
and instead define what is not already defined.
Fixes: 6605c7f02e24 ("bus/pci: fix build with Windows SDK >= 10.0.20253")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/bus/pci/windows/pci_netuio.c | 6 ------
drivers/bus/pci/windows/pci_netuio.h | 4 +++-
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/drivers/bus/pci/windows/pci_netuio.c b/drivers/bus/pci/windows/pci_netuio.c
index 346b2f4c0a..db75475f92 100644
--- a/drivers/bus/pci/windows/pci_netuio.c
+++ b/drivers/bus/pci/windows/pci_netuio.c
@@ -10,12 +10,6 @@
#include <rte_eal.h>
#include <rte_bus_pci.h>
-#ifdef __MINGW32__
-#include <ddk/ndisguid.h>
-#else
-#include <ndisguid.h>
-#endif
-
#include "private.h"
#include "pci_netuio.h"
diff --git a/drivers/bus/pci/windows/pci_netuio.h b/drivers/bus/pci/windows/pci_netuio.h
index 2f6c97ea73..c600da80b1 100644
--- a/drivers/bus/pci/windows/pci_netuio.h
+++ b/drivers/bus/pci/windows/pci_netuio.h
@@ -5,11 +5,13 @@
#ifndef _PCI_NETUIO_H_
#define _PCI_NETUIO_H_
-#if !defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE
+#ifndef GUID_DEVCLASS_NETUIO
/* GUID definition for device class netUIO */
DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
0xa3, 0x29, 0xf3, 0x22, 0xeb, 0xad, 0xbe, 0x0f);
+#endif
+#ifndef GUID_DEVINTERFACE_NETUIO
/* GUID definition for the netuio device interface */
DEFINE_GUID(GUID_DEVINTERFACE_NETUIO, 0x08336f60, 0x0679, 0x4c6c,
0x85, 0xd2, 0xae, 0x7c, 0xed, 0x65, 0xff, 0xf7);
--
2.47.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 2/3] net/mlx5: fix build with MinGW 13
2025-08-13 15:25 [PATCH 0/3] fix build with MinGW 13 Thomas Monjalon
2025-08-13 15:25 ` [PATCH 1/3] bus/pci: " Thomas Monjalon
@ 2025-08-13 15:25 ` Thomas Monjalon
2025-08-13 15:25 ` [PATCH 3/3] bbdev: wrong fix for " Thomas Monjalon
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2025-08-13 15:25 UTC (permalink / raw)
To: dev
Cc: stable, Dariusz Sosnowski, Viacheslav Ovsiienko, Bing Zhao,
Ori Kam, Suanming Mou, Matan Azrad, Tal Shnaiderman
After an upgrade to MinGW version 13, compilation breaks:
drivers/net/mlx5/windows/mlx5_ethdev_os.c:285:69: error:
'dev_link.<U1000>.<Uaf00>.link_autoneg' may be used uninitialized
This is because link_autoneg is never set in mlx5_link_update().
It can be set to the previous value (no change).
Also it does not make sense to check this value to return the update status
as it does not change.
Fixes: 6fbd73709ee4 ("net/mlx5: support link update on Windows")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
index 49f750be68..c82ce6cbda 100644
--- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
@@ -283,11 +283,11 @@ mlx5_link_update(struct rte_eth_dev *dev, int wait_to_complete)
dev_link.link_duplex = 1;
if (dev->data->dev_link.link_speed != dev_link.link_speed ||
dev->data->dev_link.link_duplex != dev_link.link_duplex ||
- dev->data->dev_link.link_autoneg != dev_link.link_autoneg ||
dev->data->dev_link.link_status != dev_link.link_status)
ret = 1;
else
ret = 0;
+ dev_link.link_autoneg = dev->data->dev_link.link_autoneg;
dev->data->dev_link = dev_link;
return ret;
}
--
2.47.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 3/3] bbdev: wrong fix for MinGW 13
2025-08-13 15:25 [PATCH 0/3] fix build with MinGW 13 Thomas Monjalon
2025-08-13 15:25 ` [PATCH 1/3] bus/pci: " Thomas Monjalon
2025-08-13 15:25 ` [PATCH 2/3] net/mlx5: " Thomas Monjalon
@ 2025-08-13 15:25 ` Thomas Monjalon
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2025-08-13 15:25 UTC (permalink / raw)
To: dev; +Cc: stable, Nicolas Chautru, Maxime Coquelin, Hemant Agrawal
After an upgrade to MinGW version 13, compilation breaks:
In function 'rte_bbdev_queue_ops_dump':
lib/bbdev/rte_bbdev.c:1269:63: error:
'%s' directive argument is null [-Werror=format-overflow=]
fprintf(f, " Enqueue Status Counters %s %" PRIu64 "\n",
The enqueue status string may be null if the index is too high,
because RTE_BBDEV_ENQ_STATUS_SIZE_MAX is defined to include
padding for future enum insertion.
This padding case must be checked
to avoid printing a dump of a non-existing status.
Fixes: 353e3639d458 ("bbdev: add queue debug dump")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
lib/bbdev/rte_bbdev.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index e0f8c8eb0d..d662a2b364 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -1248,6 +1248,7 @@ rte_bbdev_queue_ops_dump(uint16_t dev_id, uint16_t queue_id, FILE *f)
struct rte_bbdev_queue_data *q_data;
struct rte_bbdev_stats *stats;
uint16_t i;
+ const char *status_str;
struct rte_bbdev *dev = get_dev(dev_id);
VALID_DEV_OR_RET_ERR(dev, dev_id);
@@ -1264,11 +1265,15 @@ rte_bbdev_queue_ops_dump(uint16_t dev_id, uint16_t queue_id, FILE *f)
dev->data->name, queue_id);
fprintf(f, " Last Enqueue Status %s\n",
rte_bbdev_enqueue_status_str(q_data->enqueue_status));
- for (i = 0; i < RTE_BBDEV_ENQ_STATUS_SIZE_MAX; i++)
+ for (i = 0; i < RTE_BBDEV_ENQ_STATUS_SIZE_MAX; i++) {
+ status_str = rte_bbdev_enqueue_status_str(i);
+ if (status_str == NULL)
+ continue;
if (q_data->queue_stats.enqueue_status_count[i] > 0)
fprintf(f, " Enqueue Status Counters %s %" PRIu64 "\n",
- rte_bbdev_enqueue_status_str(i),
+ status_str,
q_data->queue_stats.enqueue_status_count[i]);
+ }
stats = &dev->data->queues[queue_id].queue_stats;
fprintf(f, " Enqueue Count %" PRIu64 " Warning %" PRIu64 " Error %" PRIu64 "\n",
--
2.47.1
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-08-13 15:29 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-13 15:25 [PATCH 0/3] fix build with MinGW 13 Thomas Monjalon
2025-08-13 15:25 ` [PATCH 1/3] bus/pci: " Thomas Monjalon
2025-08-13 15:25 ` [PATCH 2/3] net/mlx5: " Thomas Monjalon
2025-08-13 15:25 ` [PATCH 3/3] bbdev: wrong fix for " Thomas Monjalon
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).