Re: [dpdk-dev] [PATCH v3 1/2] eal: fix side effects in align mul macros

2023-07-04 Thread Stephen Hemminger
On Tue, 11 May 2021 01:10:06 +0530 wrote: > Avoid expanding parameters inside the macro multiple times. > For example: > RTE_ALIGN_MUL_NEAR(rte_rdtsc() - start, CYC_PER_10MHZ); > Here rte_rdtsc() call is expanded multiple times in the macro > causing it to return different values that leads

[dpdk-dev] [PATCH v3 1/2] eal: fix side effects in align mul macros

2021-05-10 Thread pbhagavatula
From: Pavan Nikhilesh Avoid expanding parameters inside the macro multiple times. For example: RTE_ALIGN_MUL_NEAR(rte_rdtsc() - start, CYC_PER_10MHZ); Here rte_rdtsc() call is expanded multiple times in the macro causing it to return different values that leads to unintended side effects.