[v3,0/3] remove __typeof__ from expansion of per lcore macros

Message ID 1707851523-27998-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
Headers
Series remove __typeof__ from expansion of per lcore macros |

Message

Tyler Retzlaff Feb. 13, 2024, 7:12 p.m. UTC
  The design of the macros requires a type to be provided to the macro.

By expanding the type parameter inside of typeof it also inadvertently
allows an expression to be used which appears not to have been intended
after evaluating the parameter name and existing macro use.

Technically this is an API break but only for applications that were
using these macros outside of the original design intent.

v3:
  * provide notice in release_24_03.rst about change in macro
    expansion.
v2:
  * add additional patch to adjust usage for crypto/ipsec_mb

Tyler Retzlaff (3):
  eal: provide type to per lcore macro
  crypto/ipsec_mb: provide type to per lcore macro
  eal: remove typeof from per lcore macros

 doc/guides/rel_notes/release_24_03.rst       | 5 +++++
 drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h | 2 +-
 lib/eal/common/eal_common_errno.c            | 2 +-
 lib/eal/include/rte_per_lcore.h              | 8 ++++----
 4 files changed, 11 insertions(+), 6 deletions(-)
  

Comments

David Marchand Feb. 14, 2024, 8:19 a.m. UTC | #1
On Tue, Feb 13, 2024 at 8:12 PM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> The design of the macros requires a type to be provided to the macro.
>
> By expanding the type parameter inside of typeof it also inadvertently
> allows an expression to be used which appears not to have been intended
> after evaluating the parameter name and existing macro use.
>
> Technically this is an API break but only for applications that were
> using these macros outside of the original design intent.
>
> v3:
>   * provide notice in release_24_03.rst about change in macro
>     expansion.
> v2:
>   * add additional patch to adjust usage for crypto/ipsec_mb
>
> Tyler Retzlaff (3):
>   eal: provide type to per lcore macro
>   crypto/ipsec_mb: provide type to per lcore macro
>   eal: remove typeof from per lcore macros
>
>  doc/guides/rel_notes/release_24_03.rst       | 5 +++++
>  drivers/crypto/ipsec_mb/pmd_aesni_gcm_priv.h | 2 +-
>  lib/eal/common/eal_common_errno.c            | 2 +-
>  lib/eal/include/rte_per_lcore.h              | 8 ++++----
>  4 files changed, 11 insertions(+), 6 deletions(-)

Thanks Tyler.
Series applied.