fix build with MinGW 13
cover fix build with MinGW 13
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(-)
Signature · 1 line
2.47.1
PATCH 1/3 bus/pci: fix build with MinGW 13
After an upgrade to MinGW version 13, some compilation errors appear:
drivers/bus/pci/windows/pci.c:362:58:
error: 'GUID_DEVCLASS_NETUIO' undeclareddrivers/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.
--- drivers/bus/pci/windows/pci_netuio.c | 6 ------ drivers/bus/pci/windows/pci_netuio.h | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-)
drivers/bus/pci/windows/pci_netuio.c +0 -6
@@ -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"
drivers/bus/pci/windows/pci_netuio.h +3 -1
@@ -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 );
Signature · 1 line
2.47.1
PATCH 2/3 net/mlx5: fix build with MinGW 13
In reply to Thomas MonjalonAfter 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.
--- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/windows/mlx5_ethdev_os.c +1 -1
@@ -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; }
Signature · 1 line
2.47.1
Re: [PATCH 2/3] net/mlx5: fix build with MinGW 13
Quoted 10 lines · Thomas Monjalon
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 uninitializedThis is because
link_autonegis never set inmlx5_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.
Quoted 4 lines
Fixes 6fbd73709ee4 ("net/mlx5: support link update on Windows")Signed-off-by Thomas Monjalon <[email protected]>
Best regards,
Dariusz Sosnowski
PATCH 3/3 bbdev: wrong fix for MinGW 13
In reply to Thomas MonjalonAfter 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.
--- lib/bbdev/rte_bbdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
lib/bbdev/rte_bbdev.c +7 -2
@@ -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",
Signature · 1 line
2.47.1
Re: [PATCH 3/3] bbdev: wrong fix for MinGW 13
Quoted 26 lines · Thomas Monjalon
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_MAXis 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")Signed-off-by Thomas Monjalon <[email protected]>--- lib/bbdev/rte_bbdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)lib/bbdev/rte_bbdev.c +0
-0
lib/bbdev/rte_bbdev.c rte_bbdev_queue_ops_dump(uint16_t dev_id, uint16_t queue_id, FILE *f) · line 1251
Quoted 4 lines
lib/bbdev/rte_bbdev.c +1
-0@@ -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.
Quoted 24 lines
lib/bbdev/rte_bbdev.c +6
-2struct 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",Signature · 1 line
2.47.1
Sending a CI testing retest for this series because of a suspected false failure on the dynamic config testsuite.
Quoted 19 lines · Thomas Monjalon
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 13drivers/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
Quoted 9 lines · Thomas Monjalon
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
Quoted 6 lines
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:
v2 cover fix build with MinGW 13
In reply to Thomas MonjalonAfter 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(-)
Signature · 1 line
2.47.1
PATCH v2 1/3 bus/pci: fix build with MinGW 13
After an upgrade to MinGW version 13, some compilation errors appear:
drivers/bus/pci/windows/pci.c:362:58:
error: 'GUID_DEVCLASS_NETUIO' undeclareddrivers/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.
--- drivers/bus/pci/windows/pci_netuio.c | 6 ------ drivers/bus/pci/windows/pci_netuio.h | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-)
drivers/bus/pci/windows/pci_netuio.c +0 -6
@@ -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"
drivers/bus/pci/windows/pci_netuio.h +3 -1
@@ -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 );
Signature · 1 line
2.47.1
PATCH v2 2/3 net/mlx5: fix build with MinGW 13
In reply to Thomas MonjalonAfter 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.
--- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/windows/mlx5_ethdev_os.c +1 -1
@@ -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; }
Signature · 1 line
2.47.1
PATCH v2 3/3 bbdev: wrong fix for MinGW 13
In reply to Thomas MonjalonAfter 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.
---
v2: make status_str variable local
--- lib/bbdev/rte_bbdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
lib/bbdev/rte_bbdev.c +6 -2
@@ -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",
Signature · 1 line
2.47.1
Re: [PATCH v2 3/3] bbdev: wrong fix for MinGW 13
27/08/2025 17:16, Thomas Monjalon:
Quoted 7 lines
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.
Quoted 6 lines
Thomas Monjalon (3):
bus/pci: fix build with MinGW 13
net/mlx5: fix build with MinGW 13
bbdev: wrong fix for MinGW 13v2: make
status_strvariable 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.
08/09/2025 11:35, Thomas Monjalon:
Quoted 13 lines
27/08/2025 17:16, Thomas Monjalon:
Quoted 12 lines
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
Quoted 5 lines
Quoted 1 line
v2: make
status_strvariable local in bbdev patchThe 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'
v3 cover fix build with MinGW 13
In reply to Thomas MonjalonAfter 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(-)
Signature · 1 line
2.51.0
PATCH v3 1/3 bus/pci: fix build with MinGW 13
After an upgrade to MinGW version 13, some compilation errors appear:
drivers/bus/pci/windows/pci.c:362:58:
error: 'GUID_DEVCLASS_NETUIO' undeclareddrivers/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.
---
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(-)
drivers/bus/pci/windows/pci.c +6 -5
@@ -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 definedRTE_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.
drivers/bus/pci/windows/pci_netuio.c +0 -6
@@ -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"
drivers/bus/pci/windows/pci_netuio.h +10 -3
@@ -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
Signature · 1 line
2.51.0
Re: [PATCH v3 1/3] bus/pci: fix build with MinGW 13
08/09/2025 23:17, Thomas Monjalon:
Quoted 13 lines
After an upgrade to MinGW version 13, some compilation errors appear:
drivers/bus/pci/windows/pci.c:362:58:
error: 'GUID_DEVCLASS_NETUIO' undeclareddrivers/bus/pci/windows/pci_netuio.c:57:39:
error: 'GUID_DEVINTERFACE_NETUIO' undeclaredThe cause is MinGW has set
NTDDI_VERSIONto 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.
[...]
drivers/bus/pci/windows/pci_netuio.h line 12
Quoted 7 lines
drivers/bus/pci/windows/pci_netuio.h +3
-2-#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
Unfortunately it cannot work because DEFINE_GUID is declaring a variable, not a macro.
It is sad, we have to check Windows and MinGW versions.
PATCH v3 2/3 net/mlx5: fix build with MinGW 13
In reply to Thomas MonjalonAfter 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.
--- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/windows/mlx5_ethdev_os.c +1 -1
@@ -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; }
Signature · 1 line
2.51.0
PATCH v3 3/3 bbdev: fix build with MinGW 13
In reply to Thomas MonjalonAfter 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.
---
v2: make status_str variable local
--- lib/bbdev/rte_bbdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
lib/bbdev/rte_bbdev.c +6 -2
@@ -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",
Signature · 1 line
2.51.0
Re: [PATCH v3 3/3] bbdev: fix build with MinGW 13
08/09/2025 23:17, Thomas Monjalon:
lib/bbdev/rte_bbdev.c rte_bbdev_queue_ops_dump(uint16_t dev_id, uint16_t queue_id, FILE *f) · line 1274
Quoted 8 lines
lib/bbdev/rte_bbdev.c +4
-1+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]);
Coverity is raising another problem in this code,
which was already there:
i should be an enum, not an integer.
I can fix it in the next version.
Re: [PATCH v3 3/3] bbdev: fix build with MinGW 13
In reply to Thomas MonjalonFYI The DTS failure for this series on patchwork for the MTU testsuite is coming from a different patch than this one. Once I have that resolved, I will put in a retest for this series which will clear up that MTU testsuite failure.
Quoted 56 lines · Thomas Monjalon
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_MAXis 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")Signed-off-by Thomas Monjalon <[email protected]>Acked-by Bruce Richardson <[email protected]>Acked-by Hemant Agrawal <[email protected]>---
v2: makestatus_strvariable local--- lib/bbdev/rte_bbdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)lib/bbdev/rte_bbdev.c +5
-2@@ -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
Quoted 9 lines · Thomas Monjalon
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
Quoted 5 lines
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(-)
Tested on Fedora 42 with Fedora MinGW 14.2.1-4.fc42.
Thanks,
Ali
v4 cover fix build with MinGW 13
In reply to Thomas MonjalonAfter 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
v4: restore Windows build + fix Coverity warning for bbdev
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.h | 6 +++--- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- lib/bbdev/rte_bbdev.c | 10 +++++++--- 4 files changed, 17 insertions(+), 12 deletions(-)
Signature · 1 line
2.51.0
PATCH v4 1/3 bus/pci: fix build with MinGW 13
After an upgrade to MinGW version 13, some compilation errors appear:
drivers/bus/pci/windows/pci.c:362:58:
error: 'GUID_DEVCLASS_NETUIO' undeclareddrivers/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.
The case MinGW64 is added to define NetUIO constants.
Some comments are improved to better track includes requirements.
--- drivers/bus/pci/windows/pci.c | 11 ++++++----- drivers/bus/pci/windows/pci_netuio.h | 6 +++--- 2 files changed, 9 insertions(+), 8 deletions(-)
drivers/bus/pci/windows/pci.c +6 -5
@@ -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 definedRTE_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.
drivers/bus/pci/windows/pci_netuio.h +3 -3
@@ -5,12 +5,12 @@#ifndef _PCI_NETUIO_H_#define _PCI_NETUIO_H_ -#if !defined(NTDDI_WIN10_FE ) ||NTDDI_VERSION <NTDDI_WIN10_FE -/* GUID definition for device class netUIO */ +#if !defined(NTDDI_WIN10_FE ) ||NTDDI_VERSION <NTDDI_WIN10_FE || defined(__MINGW64__) +/* GUID_DEVCLASS_NETUIO should be defined in devguid.h */ DEFINE_GUID (GUID_DEVCLASS_NETUIO ,0x78912bc1 ,0xcb8e ,0x4b28 ,0xa3 ,0x29 ,0xf3 ,0x22 ,0xeb ,0xad ,0xbe ,0x0f ); -/* GUID definition for the netuio device interface */ +/* GUID_DEVINTERFACE_NETUIO should be defined in ndisguid.h */ DEFINE_GUID (GUID_DEVINTERFACE_NETUIO ,0x08336f60 ,0x0679 ,0x4c6c ,0x85 ,0xd2 ,0xae ,0x7c ,0xed ,0x65 ,0xff ,0xf7 );#endif
Signature · 1 line
2.51.0
PATCH v4 2/3 net/mlx5: fix build with MinGW 13
In reply to Thomas MonjalonAfter 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.
--- drivers/net/mlx5/windows/mlx5_ethdev_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/mlx5/windows/mlx5_ethdev_os.c +1 -1
@@ -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; }
Signature · 1 line
2.51.0
PATCH v4 3/3 bbdev: fix build with MinGW 13
In reply to Thomas MonjalonAfter 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.
The type of the variable i is also changed to the enum required by the function rte_bbdev_enqueue_status_str().
--- lib/bbdev/rte_bbdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
lib/bbdev/rte_bbdev.c +7 -3
@@ -1247,7 +1247,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; +enum rte_bbdev_enqueue_status i;struct rte_bbdev *dev =get_dev (dev_id);VALID_DEV_OR_RET_ERR (dev, dev_id);
@@ -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",
Signature · 1 line
2.51.0
Thomas Monjalon
Applied14/10/2025 11:13, Thomas Monjalon:
Quoted 4 lines
After an upgrade to MinGW version 13, some compilation errors appear in PCI, mlx5 and bbdev code.
This series fixes them all.
Quoted 8 lines
v2: improve bbdev patch
v3: try to fix Windows build of PCI patch
v4: restore Windows build + fix Coverity warning for bbdevThomas Monjalon (3):
bus/pci: fix build with MinGW 13
net/mlx5: fix build with MinGW 13
bbdev: fix build with MinGW 13
Applied