* [PATCH 1/3] bus/pci: fix build with MinGW 13 [not found] <20250813152829.457463-1-thomas@monjalon.net> @ 2025-08-13 15:25 ` Thomas Monjalon 2025-08-13 15:25 ` [PATCH 2/3] net/mlx5: " Thomas Monjalon ` (3 subsequent siblings) 4 siblings, 0 replies; 14+ 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] 14+ messages in thread
* [PATCH 2/3] net/mlx5: fix build with MinGW 13 [not found] <20250813152829.457463-1-thomas@monjalon.net> 2025-08-13 15:25 ` [PATCH 1/3] bus/pci: fix build with MinGW 13 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 ` (2 subsequent siblings) 4 siblings, 1 reply; 14+ 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] 14+ 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; 14+ 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] 14+ messages in thread
* [PATCH 3/3] bbdev: wrong fix for MinGW 13 [not found] <20250813152829.457463-1-thomas@monjalon.net> 2025-08-13 15:25 ` [PATCH 1/3] bus/pci: fix build with MinGW 13 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 [not found] ` <20250827151759.1448018-1-thomas@monjalon.net> [not found] ` <20250908212034.699713-1-thomas@monjalon.net> 4 siblings, 1 reply; 14+ 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] 14+ 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; 14+ 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] 14+ messages in thread
[parent not found: <20250827151759.1448018-1-thomas@monjalon.net>]
* [PATCH v2 1/3] bus/pci: fix build with MinGW 13 [not found] ` <20250827151759.1448018-1-thomas@monjalon.net> @ 2025-08-27 15:16 ` Thomas Monjalon 2025-08-27 15:16 ` [PATCH v2 2/3] net/mlx5: " Thomas Monjalon 2025-08-27 15:16 ` [PATCH v2 3/3] bbdev: wrong fix for " Thomas Monjalon 2 siblings, 0 replies; 14+ 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] 14+ messages in thread
* [PATCH v2 2/3] net/mlx5: fix build with MinGW 13 [not found] ` <20250827151759.1448018-1-thomas@monjalon.net> 2025-08-27 15:16 ` [PATCH v2 1/3] bus/pci: fix build with " Thomas Monjalon @ 2025-08-27 15:16 ` Thomas Monjalon 2025-08-27 15:16 ` [PATCH v2 3/3] bbdev: wrong fix for " Thomas Monjalon 2 siblings, 0 replies; 14+ 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] 14+ messages in thread
* [PATCH v2 3/3] bbdev: wrong fix for MinGW 13 [not found] ` <20250827151759.1448018-1-thomas@monjalon.net> 2025-08-27 15:16 ` [PATCH v2 1/3] bus/pci: fix build with " 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 2 siblings, 1 reply; 14+ 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] 14+ messages in thread
* Re: [PATCH v2 3/3] bbdev: wrong fix for MinGW 13 2025-08-27 15:16 ` [PATCH v2 3/3] bbdev: wrong fix for " Thomas Monjalon @ 2025-08-29 5:36 ` Hemant Agrawal 0 siblings, 0 replies; 14+ messages in thread From: Hemant Agrawal @ 2025-08-29 5:36 UTC (permalink / raw) To: Thomas Monjalon, dev Cc: bruce.richardson, stable, Nicolas Chautru, Maxime Coquelin, Hemant Agrawal Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com> ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <20250908212034.699713-1-thomas@monjalon.net>]
* [PATCH v3 1/3] bus/pci: fix build with MinGW 13 [not found] ` <20250908212034.699713-1-thomas@monjalon.net> @ 2025-09-08 21:17 ` Thomas Monjalon 2025-09-10 12:59 ` 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, 1 reply; 14+ 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] 14+ messages in thread
* Re: [PATCH v3 1/3] bus/pci: fix build with MinGW 13 2025-09-08 21:17 ` [PATCH v3 1/3] bus/pci: fix build with " Thomas Monjalon @ 2025-09-10 12:59 ` Thomas Monjalon 0 siblings, 0 replies; 14+ messages in thread From: Thomas Monjalon @ 2025-09-10 12:59 UTC (permalink / raw) To: dev Cc: stable, bruce.richardson, Chenbo Xia, Nipun Gupta, Ranjit Menon, Dmitry Kozlyuk, Tyler Retzlaff 08/09/2025 23:17, Thomas Monjalon: > 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. [...] > -#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. ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v3 2/3] net/mlx5: fix build with MinGW 13 [not found] ` <20250908212034.699713-1-thomas@monjalon.net> 2025-09-08 21:17 ` [PATCH v3 1/3] bus/pci: fix build with " 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; 14+ 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] 14+ messages in thread
* [PATCH v3 3/3] bbdev: fix build with MinGW 13 [not found] ` <20250908212034.699713-1-thomas@monjalon.net> 2025-09-08 21:17 ` [PATCH v3 1/3] bus/pci: fix build with " Thomas Monjalon 2025-09-08 21:17 ` [PATCH v3 2/3] net/mlx5: " Thomas Monjalon @ 2025-09-08 21:17 ` Thomas Monjalon 2025-09-10 13:00 ` Thomas Monjalon 2 siblings, 1 reply; 14+ 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] 14+ messages in thread
* Re: [PATCH v3 3/3] bbdev: fix build with MinGW 13 2025-09-08 21:17 ` [PATCH v3 3/3] bbdev: " Thomas Monjalon @ 2025-09-10 13:00 ` Thomas Monjalon 0 siblings, 0 replies; 14+ messages in thread From: Thomas Monjalon @ 2025-09-10 13:00 UTC (permalink / raw) To: dev Cc: stable, bruce.richardson, Hemant Agrawal, Nicolas Chautru, Maxime Coquelin 08/09/2025 23:17, Thomas Monjalon: > + 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. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2025-09-10 13:00 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <20250813152829.457463-1-thomas@monjalon.net> 2025-08-13 15:25 ` [PATCH 1/3] bus/pci: fix build with MinGW 13 Thomas Monjalon 2025-08-13 15:25 ` [PATCH 2/3] net/mlx5: " Thomas Monjalon 2025-08-14 9:50 ` Dariusz Sosnowski 2025-08-13 15:25 ` [PATCH 3/3] bbdev: wrong fix for " Thomas Monjalon 2025-08-19 13:51 ` Bruce Richardson [not found] ` <20250827151759.1448018-1-thomas@monjalon.net> 2025-08-27 15:16 ` [PATCH v2 1/3] bus/pci: fix build with " Thomas Monjalon 2025-08-27 15:16 ` [PATCH v2 2/3] net/mlx5: " Thomas Monjalon 2025-08-27 15:16 ` [PATCH v2 3/3] bbdev: wrong fix for " Thomas Monjalon 2025-08-29 5:36 ` Hemant Agrawal [not found] ` <20250908212034.699713-1-thomas@monjalon.net> 2025-09-08 21:17 ` [PATCH v3 1/3] bus/pci: fix build with " Thomas Monjalon 2025-09-10 12:59 ` 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 2025-09-10 13:00 ` 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).