* [PATCH] eal/x86: don't export internal alignment macro
@ 2022-06-21 14:13 David Marchand
2022-06-21 14:28 ` Morten Brørup
0 siblings, 1 reply; 3+ messages in thread
From: David Marchand @ 2022-06-21 14:13 UTC (permalink / raw)
To: dev; +Cc: Morten Brørup, Bruce Richardson, Konstantin Ananyev
ALIGNMENT_MASK is only used internally.
Besides it lacks a DPDK-related prefix.
Hide it from external eyes.
Reported-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
lib/eal/x86/include/rte_memcpy.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/eal/x86/include/rte_memcpy.h b/lib/eal/x86/include/rte_memcpy.h
index 18aa4e43a7..b678b5c942 100644
--- a/lib/eal/x86/include/rte_memcpy.h
+++ b/lib/eal/x86/include/rte_memcpy.h
@@ -851,6 +851,8 @@ rte_memcpy(void *dst, const void *src, size_t n)
return rte_memcpy_generic(dst, src, n);
}
+#undef ALIGNMENT_MASK
+
#if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
#pragma GCC diagnostic pop
#endif
--
2.36.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] eal/x86: don't export internal alignment macro
2022-06-21 14:13 [PATCH] eal/x86: don't export internal alignment macro David Marchand
@ 2022-06-21 14:28 ` Morten Brørup
2022-06-22 9:32 ` Thomas Monjalon
0 siblings, 1 reply; 3+ messages in thread
From: Morten Brørup @ 2022-06-21 14:28 UTC (permalink / raw)
To: David Marchand, dev; +Cc: Bruce Richardson, Konstantin Ananyev
> From: David Marchand [mailto:david.marchand@redhat.com]
> Sent: Tuesday, 21 June 2022 16.13
>
> ALIGNMENT_MASK is only used internally.
> Besides it lacks a DPDK-related prefix.
> Hide it from external eyes.
>
> Reported-by: Morten Brørup <mb@smartsharesystems.com>
> Signed-off-by: David Marchand <david.marchand@redhat.com>
> ---
> lib/eal/x86/include/rte_memcpy.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/lib/eal/x86/include/rte_memcpy.h
> b/lib/eal/x86/include/rte_memcpy.h
> index 18aa4e43a7..b678b5c942 100644
> --- a/lib/eal/x86/include/rte_memcpy.h
> +++ b/lib/eal/x86/include/rte_memcpy.h
> @@ -851,6 +851,8 @@ rte_memcpy(void *dst, const void *src, size_t n)
> return rte_memcpy_generic(dst, src, n);
> }
>
> +#undef ALIGNMENT_MASK
> +
> #if defined(RTE_TOOLCHAIN_GCC) && (GCC_VERSION >= 100000)
> #pragma GCC diagnostic pop
> #endif
> --
> 2.36.1
>
You could consider also giving another name with a lower risk of collision.
However, I think the risk is very low, since it can only collide with other headers being included before this header file, so this suffices.
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] eal/x86: don't export internal alignment macro
2022-06-21 14:28 ` Morten Brørup
@ 2022-06-22 9:32 ` Thomas Monjalon
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2022-06-22 9:32 UTC (permalink / raw)
To: David Marchand
Cc: dev, Bruce Richardson, Konstantin Ananyev, Morten Brørup
21/06/2022 16:28, Morten Brørup:
> > From: David Marchand [mailto:david.marchand@redhat.com]
> > Sent: Tuesday, 21 June 2022 16.13
> >
> > ALIGNMENT_MASK is only used internally.
> > Besides it lacks a DPDK-related prefix.
> > Hide it from external eyes.
> >
> > Reported-by: Morten Brørup <mb@smartsharesystems.com>
> > Signed-off-by: David Marchand <david.marchand@redhat.com>
> > ---
> > --- a/lib/eal/x86/include/rte_memcpy.h
> > +++ b/lib/eal/x86/include/rte_memcpy.h
> > +#undef ALIGNMENT_MASK
>
> You could consider also giving another name with a lower risk of collision.
> However, I think the risk is very low, since it can only collide with other headers being included before this header file, so this suffices.
>
> Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Fixes: f5472703c0bd ("eal: optimize aligned memcpy on x86")
Cc: stable@dpdk.org
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-06-22 9:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-21 14:13 [PATCH] eal/x86: don't export internal alignment macro David Marchand
2022-06-21 14:28 ` Morten Brørup
2022-06-22 9:32 ` 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).