DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: "David Marchand" <david.marchand@redhat.com>, <dev@dpdk.org>
Cc: "Bruce Richardson" <bruce.richardson@intel.com>,
	"Konstantin Ananyev" <konstantin.v.ananyev@yandex.ru>
Subject: RE: [PATCH] eal/x86: don't export internal alignment macro
Date: Tue, 21 Jun 2022 16:28:29 +0200	[thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D8714C@smartserver.smartshare.dk> (raw)
In-Reply-To: <20220621141325.1955755-1-david.marchand@redhat.com>

> 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>


  reply	other threads:[~2022-06-21 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-21 14:13 David Marchand
2022-06-21 14:28 ` Morten Brørup [this message]
2022-06-22  9:32   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=98CBD80474FA8B44BF855DF32C47DC35D8714C@smartserver.smartshare.dk \
    --to=mb@smartsharesystems.com \
    --cc=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=konstantin.v.ananyev@yandex.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).