[0/9] use C11 alignof

Message ID 1706138276-28224-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
Headers
Series use C11 alignof |

Message

Tyler Retzlaff Jan. 24, 2024, 11:17 p.m. UTC
  Replace use of __alignof__(T) and __alignof__(e) with C11 alignof(T)
and alignof(typeof(e)) respectively to improve portability of the code
between toolchains.

Tyler Retzlaff (9):
  ring: use C11 alignof
  mbuf: use C11 alignof
  ethdev: use C11 alignof
  eventdev: use C11 alignof
  stack: use C11 alignof
  node: use C11 alignof
  pdcp: use C11 alignof
  reorder: use C11 alignof
  security: use C11 alignof

 lib/ethdev/ethdev_driver.c  | 3 ++-
 lib/ethdev/rte_flow.c       | 3 ++-
 lib/eventdev/rte_eventdev.c | 3 ++-
 lib/mbuf/rte_mbuf_dyn.c     | 3 ++-
 lib/node/node_private.h     | 4 +++-
 lib/pdcp/rte_pdcp.c         | 4 +++-
 lib/reorder/rte_reorder.c   | 3 ++-
 lib/ring/rte_ring.c         | 3 ++-
 lib/security/rte_security.c | 5 +++--
 lib/stack/rte_stack.c       | 3 ++-
 10 files changed, 23 insertions(+), 11 deletions(-)
  

Comments

Morten Brørup Jan. 25, 2024, 7:19 a.m. UTC | #1
> From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com]
> Sent: Thursday, 25 January 2024 00.18
> 
> Replace use of __alignof__(T) and __alignof__(e) with C11 alignof(T)
> and alignof(typeof(e)) respectively to improve portability of the code
> between toolchains.
> 
> Tyler Retzlaff (9):
>   ring: use C11 alignof
>   mbuf: use C11 alignof
>   ethdev: use C11 alignof
>   eventdev: use C11 alignof
>   stack: use C11 alignof
>   node: use C11 alignof
>   pdcp: use C11 alignof
>   reorder: use C11 alignof
>   security: use C11 alignof
> 
>  lib/ethdev/ethdev_driver.c  | 3 ++-
>  lib/ethdev/rte_flow.c       | 3 ++-
>  lib/eventdev/rte_eventdev.c | 3 ++-
>  lib/mbuf/rte_mbuf_dyn.c     | 3 ++-
>  lib/node/node_private.h     | 4 +++-
>  lib/pdcp/rte_pdcp.c         | 4 +++-
>  lib/reorder/rte_reorder.c   | 3 ++-
>  lib/ring/rte_ring.c         | 3 ++-
>  lib/security/rte_security.c | 5 +++--
>  lib/stack/rte_stack.c       | 3 ++-
>  10 files changed, 23 insertions(+), 11 deletions(-)
> 
> --

Series-Acked-by: Morten Brørup <mb@smartsharesystems.com>
  
fengchengwen Jan. 25, 2024, 12:51 p.m. UTC | #2
Series-acked-by: Chengwen Feng <fengchengwen@huawei.com>

On 2024/1/25 7:17, Tyler Retzlaff wrote:
> Replace use of __alignof__(T) and __alignof__(e) with C11 alignof(T)
> and alignof(typeof(e)) respectively to improve portability of the code
> between toolchains.
> 
> Tyler Retzlaff (9):
>   ring: use C11 alignof
>   mbuf: use C11 alignof
>   ethdev: use C11 alignof
>   eventdev: use C11 alignof
>   stack: use C11 alignof
>   node: use C11 alignof
>   pdcp: use C11 alignof
>   reorder: use C11 alignof
>   security: use C11 alignof
> 
>  lib/ethdev/ethdev_driver.c  | 3 ++-
>  lib/ethdev/rte_flow.c       | 3 ++-
>  lib/eventdev/rte_eventdev.c | 3 ++-
>  lib/mbuf/rte_mbuf_dyn.c     | 3 ++-
>  lib/node/node_private.h     | 4 +++-
>  lib/pdcp/rte_pdcp.c         | 4 +++-
>  lib/reorder/rte_reorder.c   | 3 ++-
>  lib/ring/rte_ring.c         | 3 ++-
>  lib/security/rte_security.c | 5 +++--
>  lib/stack/rte_stack.c       | 3 ++-
>  10 files changed, 23 insertions(+), 11 deletions(-)
>
  
David Marchand Feb. 13, 2024, 11:04 a.m. UTC | #3
On Thu, Jan 25, 2024 at 12:18 AM Tyler Retzlaff
<roretzla@linux.microsoft.com> wrote:
>
> Replace use of __alignof__(T) and __alignof__(e) with C11 alignof(T)
> and alignof(typeof(e)) respectively to improve portability of the code
> between toolchains.
>
> Tyler Retzlaff (9):
>   ring: use C11 alignof
>   mbuf: use C11 alignof
>   ethdev: use C11 alignof
>   eventdev: use C11 alignof
>   stack: use C11 alignof
>   node: use C11 alignof
>   pdcp: use C11 alignof
>   reorder: use C11 alignof
>   security: use C11 alignof
>
>  lib/ethdev/ethdev_driver.c  | 3 ++-
>  lib/ethdev/rte_flow.c       | 3 ++-
>  lib/eventdev/rte_eventdev.c | 3 ++-
>  lib/mbuf/rte_mbuf_dyn.c     | 3 ++-
>  lib/node/node_private.h     | 4 +++-
>  lib/pdcp/rte_pdcp.c         | 4 +++-
>  lib/reorder/rte_reorder.c   | 3 ++-
>  lib/ring/rte_ring.c         | 3 ++-
>  lib/security/rte_security.c | 5 +++--
>  lib/stack/rte_stack.c       | 3 ++-
>  10 files changed, 23 insertions(+), 11 deletions(-)

The change is trivial, but without a check in checkpatches.sh, I
imagine new occurence to be introduced in the future.
Btw, as it is trivial, please apply this change to the whole tree.