* [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
` (5 subsequent siblings)
6 siblings, 0 replies; 19+ 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] 19+ 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-14 9:50 ` Dariusz Sosnowski
2025-08-13 15:25 ` [PATCH 3/3] bbdev: wrong fix for " Thomas Monjalon
` (4 subsequent siblings)
6 siblings, 1 reply; 19+ 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] 19+ messages in thread
* Re: [PATCH 2/3] net/mlx5: fix build with MinGW 13
2025-08-13 15:25 ` [PATCH 2/3] net/mlx5: " Thomas Monjalon
@ 2025-08-14 9:50 ` Dariusz Sosnowski
0 siblings, 0 replies; 19+ messages in thread
From: Dariusz Sosnowski @ 2025-08-14 9:50 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, stable, Viacheslav Ovsiienko, Bing Zhao, Ori Kam,
Suanming Mou, Matan Azrad, Tal Shnaiderman
On Wed, Aug 13, 2025 at 05:25:24PM +0200, Thomas Monjalon wrote:
> 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>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Best regards,
Dariusz Sosnowski
^ permalink raw reply [flat|nested] 19+ 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
2025-08-19 13:51 ` Bruce Richardson
2025-08-15 15:22 ` [PATCH 0/3] fix build with " Patrick Robb
` (3 subsequent siblings)
6 siblings, 1 reply; 19+ 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] 19+ messages in thread
* Re: [PATCH 3/3] bbdev: wrong fix for MinGW 13
2025-08-13 15:25 ` [PATCH 3/3] bbdev: wrong fix for " Thomas Monjalon
@ 2025-08-19 13:51 ` Bruce Richardson
0 siblings, 0 replies; 19+ messages in thread
From: Bruce Richardson @ 2025-08-19 13:51 UTC (permalink / raw)
To: Thomas Monjalon
Cc: dev, stable, Nicolas Chautru, Maxime Coquelin, Hemant Agrawal
On Wed, Aug 13, 2025 at 05:25:25PM +0200, Thomas Monjalon wrote:
> 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;
Minor nit, but I'd suggest defining this inside the for loop at first use.
> 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] 19+ messages in thread
* Re: [PATCH 0/3] fix build with MinGW 13
2025-08-13 15:25 [PATCH 0/3] fix build with MinGW 13 Thomas Monjalon
` (2 preceding siblings ...)
2025-08-13 15:25 ` [PATCH 3/3] bbdev: wrong fix for " Thomas Monjalon
@ 2025-08-15 15:22 ` Patrick Robb
2025-08-19 13:54 ` Bruce Richardson
` (2 subsequent siblings)
6 siblings, 0 replies; 19+ messages in thread
From: Patrick Robb @ 2025-08-15 15:22 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
[-- Attachment #1: Type: text/plain, Size: 784 bytes --]
Sending a CI testing retest for this series because of a suspected false
failure on the dynamic config testsuite.
On Wed, Aug 13, 2025 at 11:28 AM Thomas Monjalon <thomas@monjalon.net>
wrote:
> 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
>
>
[-- Attachment #2: Type: text/html, Size: 1142 bytes --]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH 0/3] fix build with MinGW 13
2025-08-13 15:25 [PATCH 0/3] fix build with MinGW 13 Thomas Monjalon
` (3 preceding siblings ...)
2025-08-15 15:22 ` [PATCH 0/3] fix build with " Patrick Robb
@ 2025-08-19 13:54 ` Bruce Richardson
2025-08-27 15:16 ` [PATCH v2 " Thomas Monjalon
2025-09-08 21:17 ` [PATCH v3 " Thomas Monjalon
6 siblings, 0 replies; 19+ messages in thread
From: Bruce Richardson @ 2025-08-19 13:54 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev
On Wed, Aug 13, 2025 at 05:25:22PM +0200, Thomas Monjalon wrote:
> 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(-)
>
I don't see these issues with mingw 13.2 on OpenSUSE Tumbleweed, but
perhaps I'm just missing some dependencies. No issue with the fixes
proposed:
Series-Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 0/3] fix build with MinGW 13
2025-08-13 15:25 [PATCH 0/3] fix build with MinGW 13 Thomas Monjalon
` (4 preceding siblings ...)
2025-08-19 13:54 ` Bruce Richardson
@ 2025-08-27 15:16 ` Thomas Monjalon
2025-08-27 15:16 ` [PATCH v2 1/3] bus/pci: " Thomas Monjalon
` (3 more replies)
2025-09-08 21:17 ` [PATCH v3 " Thomas Monjalon
6 siblings, 4 replies; 19+ messages in thread
From: Thomas Monjalon @ 2025-08-27 15:16 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson
After an upgrade to MinGW version 13 on Arch Linux,
some compilation errors appear in PCI, mlx5 and bbdev code.
This series fixes them all.
Bruce doesn't see them with MinGW 13.2 on OpenSUSE Tumbleweed,
but perhaps just missing some dependencies.
Thomas Monjalon (3):
bus/pci: fix build with MinGW 13
net/mlx5: fix build with MinGW 13
bbdev: wrong fix for MinGW 13
v2: make status_str variable local in bbdev patch
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 | 8 ++++++--
4 files changed, 10 insertions(+), 10 deletions(-)
--
2.47.1
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v2 1/3] bus/pci: fix build with MinGW 13
2025-08-27 15:16 ` [PATCH v2 " Thomas Monjalon
@ 2025-08-27 15:16 ` Thomas Monjalon
2025-08-27 15:16 ` [PATCH v2 2/3] net/mlx5: " Thomas Monjalon
` (2 subsequent siblings)
3 siblings, 0 replies; 19+ messages in thread
From: Thomas Monjalon @ 2025-08-27 15:16 UTC (permalink / raw)
To: dev
Cc: bruce.richardson, stable, Chenbo Xia, Nipun Gupta, Ranjit Menon,
Dmitry Kozlyuk, Tyler Retzlaff
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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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] 19+ messages in thread
* [PATCH v2 2/3] net/mlx5: fix build with MinGW 13
2025-08-27 15:16 ` [PATCH v2 " Thomas Monjalon
2025-08-27 15:16 ` [PATCH v2 1/3] bus/pci: " Thomas Monjalon
@ 2025-08-27 15:16 ` Thomas Monjalon
2025-08-27 15:16 ` [PATCH v2 3/3] bbdev: wrong fix for " Thomas Monjalon
2025-09-08 9:35 ` [PATCH v2 0/3] fix build with " Thomas Monjalon
3 siblings, 0 replies; 19+ messages in thread
From: Thomas Monjalon @ 2025-08-27 15:16 UTC (permalink / raw)
To: dev
Cc: bruce.richardson, 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>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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] 19+ messages in thread
* [PATCH v2 3/3] bbdev: wrong fix for MinGW 13
2025-08-27 15:16 ` [PATCH v2 " Thomas Monjalon
2025-08-27 15:16 ` [PATCH v2 1/3] bus/pci: " Thomas Monjalon
2025-08-27 15:16 ` [PATCH v2 2/3] net/mlx5: " Thomas Monjalon
@ 2025-08-27 15:16 ` Thomas Monjalon
2025-08-29 5:36 ` Hemant Agrawal
2025-09-08 9:35 ` [PATCH v2 0/3] fix build with " Thomas Monjalon
3 siblings, 1 reply; 19+ messages in thread
From: Thomas Monjalon @ 2025-08-27 15:16 UTC (permalink / raw)
To: dev
Cc: bruce.richardson, 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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v2: make status_str variable local
---
lib/bbdev/rte_bbdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index e0f8c8eb0d..e76124532d 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -1264,11 +1264,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++) {
+ const char *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] 19+ messages in thread
* Re: [PATCH v2 0/3] fix build with MinGW 13
2025-08-27 15:16 ` [PATCH v2 " Thomas Monjalon
` (2 preceding siblings ...)
2025-08-27 15:16 ` [PATCH v2 3/3] bbdev: wrong fix for " Thomas Monjalon
@ 2025-09-08 9:35 ` Thomas Monjalon
2025-09-08 12:18 ` Thomas Monjalon
3 siblings, 1 reply; 19+ messages in thread
From: Thomas Monjalon @ 2025-09-08 9:35 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson
27/08/2025 17:16, Thomas Monjalon:
> After an upgrade to MinGW version 13 on Arch Linux,
> some compilation errors appear in PCI, mlx5 and bbdev code.
> This series fixes them all.
>
> Bruce doesn't see them with MinGW 13.2 on OpenSUSE Tumbleweed,
> but perhaps just missing some dependencies.
>
> Thomas Monjalon (3):
> bus/pci: fix build with MinGW 13
> net/mlx5: fix build with MinGW 13
> bbdev: wrong fix for MinGW 13
>
> v2: make status_str variable local in bbdev patch
The patch for bbdev appears to be OK,
so change the title to "bbdev: fix build with MinGW 13",
and apply.
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [PATCH v2 0/3] fix build with MinGW 13
2025-09-08 9:35 ` [PATCH v2 0/3] fix build with " Thomas Monjalon
@ 2025-09-08 12:18 ` Thomas Monjalon
0 siblings, 0 replies; 19+ messages in thread
From: Thomas Monjalon @ 2025-09-08 12:18 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson
08/09/2025 11:35, Thomas Monjalon:
> 27/08/2025 17:16, Thomas Monjalon:
> > After an upgrade to MinGW version 13 on Arch Linux,
> > some compilation errors appear in PCI, mlx5 and bbdev code.
> > This series fixes them all.
> >
> > Bruce doesn't see them with MinGW 13.2 on OpenSUSE Tumbleweed,
> > but perhaps just missing some dependencies.
> >
> > Thomas Monjalon (3):
> > bus/pci: fix build with MinGW 13
> > net/mlx5: fix build with MinGW 13
> > bbdev: wrong fix for MinGW 13
> >
> > v2: make status_str variable local in bbdev patch
>
> The patch for bbdev appears to be OK,
> so change the title to "bbdev: fix build with MinGW 13",
> and apply.
Actually no, it cannot be applied because there is a failure in Windows:
..\drivers\bus\pci\windows/pci_netuio.h:10:13: error: redefinition of 'GUID_DEVCLASS_NETUIO'
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 0/3] fix build with MinGW 13
2025-08-13 15:25 [PATCH 0/3] fix build with MinGW 13 Thomas Monjalon
` (5 preceding siblings ...)
2025-08-27 15:16 ` [PATCH v2 " Thomas Monjalon
@ 2025-09-08 21:17 ` Thomas Monjalon
2025-09-08 21:17 ` [PATCH v3 1/3] bus/pci: " Thomas Monjalon
` (2 more replies)
6 siblings, 3 replies; 19+ messages in thread
From: Thomas Monjalon @ 2025-09-08 21:17 UTC (permalink / raw)
To: dev; +Cc: bruce.richardson
After an upgrade to MinGW version 13, some compilation errors appear
in PCI, mlx5 and bbdev code.
This series fixes them all.
v2: improve bbdev patch
v3: try to fix Windows build of PCI patch
Thomas Monjalon (3):
bus/pci: fix build with MinGW 13
net/mlx5: fix build with MinGW 13
bbdev: fix build with MinGW 13
drivers/bus/pci/windows/pci.c | 11 ++++++-----
drivers/bus/pci/windows/pci_netuio.c | 6 ------
drivers/bus/pci/windows/pci_netuio.h | 13 ++++++++++---
drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +-
lib/bbdev/rte_bbdev.c | 8 ++++++--
5 files changed, 23 insertions(+), 17 deletions(-)
--
2.51.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 1/3] bus/pci: fix build with MinGW 13
2025-09-08 21:17 ` [PATCH v3 " Thomas Monjalon
@ 2025-09-08 21:17 ` Thomas Monjalon
2025-09-08 21:17 ` [PATCH v3 2/3] net/mlx5: " Thomas Monjalon
2025-09-08 21:17 ` [PATCH v3 3/3] bbdev: " Thomas Monjalon
2 siblings, 0 replies; 19+ messages in thread
From: Thomas Monjalon @ 2025-09-08 21:17 UTC (permalink / raw)
To: dev
Cc: bruce.richardson, stable, Chenbo Xia, Nipun Gupta, Ranjit Menon,
Dmitry Kozlyuk, Tyler Retzlaff
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,
after including Windows headers.
Fixes: 6605c7f02e24 ("bus/pci: fix build with Windows SDK >= 10.0.20253")
Cc: stable@dpdk.org
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
v3: try to fix Windows build by moving includes
---
drivers/bus/pci/windows/pci.c | 11 ++++++-----
drivers/bus/pci/windows/pci_netuio.c | 6 ------
drivers/bus/pci/windows/pci_netuio.h | 13 ++++++++++---
3 files changed, 16 insertions(+), 14 deletions(-)
diff --git a/drivers/bus/pci/windows/pci.c b/drivers/bus/pci/windows/pci.c
index e7e449306e..6f6f368cb7 100644
--- a/drivers/bus/pci/windows/pci.c
+++ b/drivers/bus/pci/windows/pci.c
@@ -12,18 +12,19 @@
#include <rte_memory.h>
#include <rte_bus_pci.h>
-#include "private.h"
-#include "pci_netuio.h"
-
+/* DEVPKEY_Device_Numa_Node should be defined in devpkey.h */
#include <devpkey.h>
-#include <regstr.h>
-
#if defined RTE_TOOLCHAIN_GCC && (__MINGW64_VERSION_MAJOR < 8)
#include <devpropdef.h>
DEFINE_DEVPROPKEY(DEVPKEY_Device_Numa_Node, 0x540b947e, 0x8b40, 0x45bc,
0xa8, 0xa2, 0x6a, 0x0b, 0x89, 0x4c, 0xbd, 0xa2, 3);
#endif
+#include <regstr.h>
+
+#include "private.h"
+#include "pci_netuio.h"
+
/*
* This code is used to simulate a PCI probe by parsing information in
* the registry hive for PCI devices.
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..0421de3854 100644
--- a/drivers/bus/pci/windows/pci_netuio.h
+++ b/drivers/bus/pci/windows/pci_netuio.h
@@ -5,12 +5,19 @@
#ifndef _PCI_NETUIO_H_
#define _PCI_NETUIO_H_
-#if !defined(NTDDI_WIN10_FE) || NTDDI_VERSION < NTDDI_WIN10_FE
-/* GUID definition for device class netUIO */
+/* GUID_DEVCLASS_NETUIO should be defined in devguid.h */
+#ifndef GUID_DEVCLASS_NETUIO
DEFINE_GUID(GUID_DEVCLASS_NETUIO, 0x78912bc1, 0xcb8e, 0x4b28,
0xa3, 0x29, 0xf3, 0x22, 0xeb, 0xad, 0xbe, 0x0f);
+#endif
-/* GUID definition for the netuio device interface */
+/* GUID_DEVINTERFACE_NETUIO should be defined in ndisguid.h */
+#ifdef __MINGW32__
+#include <ddk/ndisguid.h>
+#else
+#include <ndisguid.h>
+#endif
+#ifndef GUID_DEVINTERFACE_NETUIO
DEFINE_GUID(GUID_DEVINTERFACE_NETUIO, 0x08336f60, 0x0679, 0x4c6c,
0x85, 0xd2, 0xae, 0x7c, 0xed, 0x65, 0xff, 0xf7);
#endif
--
2.51.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 2/3] net/mlx5: fix build with MinGW 13
2025-09-08 21:17 ` [PATCH v3 " Thomas Monjalon
2025-09-08 21:17 ` [PATCH v3 1/3] bus/pci: " Thomas Monjalon
@ 2025-09-08 21:17 ` Thomas Monjalon
2025-09-08 21:17 ` [PATCH v3 3/3] bbdev: " Thomas Monjalon
2 siblings, 0 replies; 19+ messages in thread
From: Thomas Monjalon @ 2025-09-08 21:17 UTC (permalink / raw)
To: dev
Cc: bruce.richardson, 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>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
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 32a9f599b2..e24ff367af 100644
--- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c
+++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c
@@ -311,11 +311,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.51.0
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH v3 3/3] bbdev: fix build with MinGW 13
2025-09-08 21:17 ` [PATCH v3 " Thomas Monjalon
2025-09-08 21:17 ` [PATCH v3 1/3] bus/pci: " Thomas Monjalon
2025-09-08 21:17 ` [PATCH v3 2/3] net/mlx5: " Thomas Monjalon
@ 2025-09-08 21:17 ` Thomas Monjalon
2 siblings, 0 replies; 19+ messages in thread
From: Thomas Monjalon @ 2025-09-08 21:17 UTC (permalink / raw)
To: dev
Cc: bruce.richardson, stable, Hemant Agrawal, Nicolas Chautru,
Maxime Coquelin
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>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
---
v2: make status_str variable local
---
lib/bbdev/rte_bbdev.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/bbdev/rte_bbdev.c b/lib/bbdev/rte_bbdev.c
index e0f8c8eb0d..e76124532d 100644
--- a/lib/bbdev/rte_bbdev.c
+++ b/lib/bbdev/rte_bbdev.c
@@ -1264,11 +1264,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++) {
+ const char *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.51.0
^ permalink raw reply [flat|nested] 19+ messages in thread