[PATCH v3 4/7] gpudev: fix driver header for Windows
Bruce Richardson
bruce.richardson at intel.com
Thu Sep 25 09:53:00 CEST 2025
On Wed, Sep 24, 2025 at 07:25:32PM +0200, David Marchand wrote:
> Use rte_os.h and its RTE_TAILQ_HEAD definition compatible with BSD
> sys/queue.h
>
> Fixes: 18cb07563165 ("gpudev: add event notification")
>
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
> lib/gpudev/gpudev.c | 1 +
> lib/gpudev/gpudev_driver.h | 4 ++--
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c
> index 0473d9ffb3..4a2335834c 100644
> --- a/lib/gpudev/gpudev.c
> +++ b/lib/gpudev/gpudev.c
> @@ -3,6 +3,7 @@
> */
>
> #include <stdlib.h>
> +#include <sys/queue.h>
>
> #include <eal_export.h>
> #include <rte_eal.h>
A bit confused. Why do we add sys/queue.h here but replace it below with
rte_os.h?
> diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
> index 37b6ae3149..b7621f6e5a 100644
> --- a/lib/gpudev/gpudev_driver.h
> +++ b/lib/gpudev/gpudev_driver.h
> @@ -12,11 +12,11 @@
> #define RTE_GPUDEV_DRIVER_H
>
> #include <stdint.h>
> -#include <sys/queue.h>
>
> #include <dev_driver.h>
>
> #include <rte_compat.h>
> +#include <rte_os.h>
> #include "rte_gpudev.h"
>
> #ifdef __cplusplus
> @@ -80,7 +80,7 @@ struct __rte_cache_aligned rte_gpu {
> /* Driver functions. */
> struct rte_gpu_ops ops;
> /* Event callback list. */
> - TAILQ_HEAD(rte_gpu_callback_list, rte_gpu_callback) callbacks;
> + RTE_TAILQ_HEAD(rte_gpu_callback_list, rte_gpu_callback) callbacks;
> /* Current state (used or not) in the running process. */
> enum rte_gpu_state process_state; /* Updated by this library. */
> /* Driver-specific private data for the running process. */
> --
> 2.51.0
>
More information about the dev
mailing list