[PATCH] net/gve: replace typedefs with macros in gve osdep

David Marchand david.marchand at redhat.com
Fri Oct 18 09:00:10 CEST 2024


Hello Joshua,

On Fri, Oct 18, 2024 at 1:42 AM Joshua Washington <joshwash at google.com> wrote:
>
> Currently, a number of integer types are typedef'd to their
> corresponding upserspace or RTE values. This can be problematic if these
> types are already defined somewhere else, as it would cause type
> collisions. This patch changes the typedefs to #define macros which are
> only defined if the types are not defined already.
>
> Fixes: c9ba2caf6302 ("net/gve/base: add OS-specific implementation")
> Fixes: abf1242fbb84 ("net/gve: add struct members and typedefs for DQO")
> Cc: stable at dpdk.org
>
> Signed-off-by: Joshua Washington <joshwash at google.com>
> Suggested-by: David Marchand <david.marchand at redhat.com>

Re-reading /usr/include/linux/types.h, I suspect the #ifndef on each
type is unneeded (since always true: those types are not #define'd in
the first place).
But in any case, this looks ok to me.

Thanks for the fix, applied in main.


-- 
David Marchand



More information about the dev mailing list