[dpdk-dev] [PATCH v1 7/8] net/mlx5: add mlx5 header file specific to Linux
Ophir Munk
ophirmu at mellanox.com
Tue Jun 9 16:49:19 CEST 2020
> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at intel.com>
> Sent: Tuesday, June 9, 2020 2:49 PM
> To: Ophir Munk <ophirmu at mellanox.com>; dev at dpdk.org; Matan Azrad
> <matan at mellanox.com>; Raslan Darawsheh <rasland at mellanox.com>
> Subject: Re: [dpdk-dev] [PATCH v1 7/8] net/mlx5: add mlx5 header file
> specific to Linux
> <...>
> >> On 6/3/2020 4:06 PM, Ophir Munk wrote:
> >>> File drivers/net/linux/mlx5_os.h is added. It includes specific
> >>> Linux definitions such as PCI driver flags, link state changes
> >>> interrupts, link removal interrupts, etc.
> >>>
> >>> Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
> >>> Acked-by: Matan Azrad <matan at mellanox.com>
> >>
> >> <...>
> >>
> >>> diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index
> >>> f5d9aad..eca4472 100644
> >>> --- a/drivers/net/mlx5/mlx5.h
> >>> +++ b/drivers/net/mlx5/mlx5.h
> >>> @@ -41,6 +41,7 @@
> >>>
> >>> #include "mlx5_defs.h"
> >>> #include "mlx5_utils.h"
> >>> +#include "mlx5_os.h"
> >>
> >> Assuming that you will have multiple "mlx5_os.h", one for each OS,
> >> like "linux/mlx5_os.h" & "windows/mlx5_os.h", doesn't it make sense
> >> to include it as "#include linux/mlx5_os.h", and remove relevant "-I"
> >> from CFLAGS in makefile?
> >
> > IMO it doesn't make sense.
> > mlx5.h is a shared file that will be compiled under Windows as well.
> > It wouldn't be possible if I used #include linux/mlx5_os.h
> >
>
> It is possible with an #ifdef around include. (#ifdef Linux)
>
> But if you keep as #include "mlx5_os.h" and have this header for multiple OS,
> than you will have to have the ifdef in the build files.
>
> Right now you are not doing both since there is only one platform support, I
> am OK to proceed and postpone the second platform support until it is ready.
Please note that Windows dpdk will only be built with the meson build system (no Makefile usage under Windows).
More information about the dev
mailing list