[00/16] remove use of VLAs for Windows built code

Message ID 1713397319-26135-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
Headers
Series remove use of VLAs for Windows built code |

Message

Tyler Retzlaff April 17, 2024, 11:41 p.m. UTC
  As per guidance technical board meeting 2024/04/17. This series
removes the use of VLAs from code built for Windows for all 3
toolchains. If there are additional opportunities to convert VLAs
to regular C arrays please provide the details for incorporation
into the series.

MSVC does not support VLAs, replace VLAs with standard C arrays
or alloca(). alloca() is available for all toolchain/platform
combinations officially supported by DPDK.

Tyler Retzlaff (16):
  eal: include header required for alloca
  hash: remove use of VLAs for Windows built code
  ethdev: remove use of VLAs for Windows built code
  gro: remove use of VLAs for Windows built code
  latencystats: remove use of VLAs for Windows built code
  lpm: remove use of VLAs for Windows built code
  rcu: remove use of VLAs for Windows built code
  app/testpmd: remove use of VLAs for Windows built code
  test: remove use of VLAs for Windows built code
  common/idpf: remove use of VLAs for Windows built code
  net/i40e: remove use of VLAs for Windows built code
  net/ice: remove use of VLAs for Windows built code
  net/ixgbe: remove use of VLAs for Windows built code
  common/mlx5: remove use of VLAs for Windows built code
  net/mlx5: remove use of VLAs for Windows built code
  build: enable vla warnings on Windows built code

 app/test-pmd/cmdline.c                        |  2 +-
 app/test-pmd/cmdline_flow.c                   |  9 +++--
 app/test-pmd/config.c                         | 16 +++++----
 app/test-pmd/shared_rxq_fwd.c                 |  2 +-
 app/test/test.c                               |  2 +-
 app/test/test_cmdline_string.c                |  2 +-
 app/test/test_cryptodev.c                     | 32 +++++++++---------
 app/test/test_cryptodev_blockcipher.c         |  4 +--
 app/test/test_cryptodev_crosscheck.c          |  2 +-
 app/test/test_dmadev.c                        |  9 +++--
 app/test/test_hash.c                          |  8 ++---
 app/test/test_mempool.c                       | 25 +++++++-------
 app/test/test_reassembly_perf.c               |  4 +--
 app/test/test_reorder.c                       | 48 +++++++++++++++------------
 app/test/test_service_cores.c                 |  9 +++--
 app/test/test_thash.c                         |  7 ++--
 config/meson.build                            |  4 +++
 drivers/common/idpf/idpf_common_rxtx.c        |  2 +-
 drivers/common/idpf/idpf_common_rxtx_avx512.c |  6 ++--
 drivers/common/mlx5/mlx5_common.h             |  4 +--
 drivers/common/mlx5/mlx5_devx_cmds.c          |  7 ++--
 drivers/net/i40e/i40e_testpmd.c               |  5 ++-
 drivers/net/ice/ice_rxtx.c                    |  2 +-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  5 +--
 drivers/net/ixgbe/ixgbe_rxtx_vec_common.h     |  2 +-
 drivers/net/mlx5/mlx5.c                       |  5 ++-
 drivers/net/mlx5/mlx5_flow.c                  |  6 ++--
 lib/eal/linux/include/rte_os.h                |  1 +
 lib/eal/windows/include/rte_os.h              |  1 +
 lib/ethdev/rte_ethdev.c                       |  9 ++---
 lib/gro/rte_gro.c                             |  4 +--
 lib/hash/rte_cuckoo_hash.c                    |  4 +--
 lib/hash/rte_thash.c                          |  2 +-
 lib/latencystats/rte_latencystats.c           |  2 +-
 lib/lpm/rte_lpm.h                             |  2 +-
 lib/rcu/rte_rcu_qsbr.c                        |  6 ++--
 36 files changed, 137 insertions(+), 123 deletions(-)
  

Comments

Morten Brørup April 18, 2024, 6:49 a.m. UTC | #1
> From: Tyler Retzlaff [mailto:roretzla@linux.microsoft.com]
> Sent: Thursday, 18 April 2024 01.42
> 
> As per guidance technical board meeting 2024/04/17. This series
> removes the use of VLAs from code built for Windows for all 3
> toolchains. If there are additional opportunities to convert VLAs
> to regular C arrays please provide the details for incorporation
> into the series.
> 
> MSVC does not support VLAs, replace VLAs with standard C arrays
> or alloca(). alloca() is available for all toolchain/platform
> combinations officially supported by DPDK.

Series-acked-by: Morten Brørup <mb@smartsharesystems.com>

Two comments sent in individual mails, don't affect this Ack.
  
Konstantin Ananyev April 18, 2024, 12:11 p.m. UTC | #2
Hi Tyler,

> As per guidance technical board meeting 2024/04/17. This series
> removes the use of VLAs from code built for Windows for all 3
> toolchains. If there are additional opportunities to convert VLAs
> to regular C arrays please provide the details for incorporation
> into the series.

I submitted the RFC series:
https://patchwork.dpdk.org/project/dpdk/list/?series=31781
that provides alternate approach to VLA removal (without alloca())
for core libs.
Feel free to re-use whatever is appropriate in your series. 
If time permits, I'll try to look to other libs from your series
(probably next week or so).
Konstantin

> 
> MSVC does not support VLAs, replace VLAs with standard C arrays
> or alloca(). alloca() is available for all toolchain/platform
> combinations officially supported by DPDK.
> 
> Tyler Retzlaff (16):
>   eal: include header required for alloca
>   hash: remove use of VLAs for Windows built code
>   ethdev: remove use of VLAs for Windows built code
>   gro: remove use of VLAs for Windows built code
>   latencystats: remove use of VLAs for Windows built code
>   lpm: remove use of VLAs for Windows built code
>   rcu: remove use of VLAs for Windows built code
>   app/testpmd: remove use of VLAs for Windows built code
>   test: remove use of VLAs for Windows built code
>   common/idpf: remove use of VLAs for Windows built code
>   net/i40e: remove use of VLAs for Windows built code
>   net/ice: remove use of VLAs for Windows built code
>   net/ixgbe: remove use of VLAs for Windows built code
>   common/mlx5: remove use of VLAs for Windows built code
>   net/mlx5: remove use of VLAs for Windows built code
>   build: enable vla warnings on Windows built code
> 
>  app/test-pmd/cmdline.c                        |  2 +-
>  app/test-pmd/cmdline_flow.c                   |  9 +++--
>  app/test-pmd/config.c                         | 16 +++++----
>  app/test-pmd/shared_rxq_fwd.c                 |  2 +-
>  app/test/test.c                               |  2 +-
>  app/test/test_cmdline_string.c                |  2 +-
>  app/test/test_cryptodev.c                     | 32 +++++++++---------
>  app/test/test_cryptodev_blockcipher.c         |  4 +--
>  app/test/test_cryptodev_crosscheck.c          |  2 +-
>  app/test/test_dmadev.c                        |  9 +++--
>  app/test/test_hash.c                          |  8 ++---
>  app/test/test_mempool.c                       | 25 +++++++-------
>  app/test/test_reassembly_perf.c               |  4 +--
>  app/test/test_reorder.c                       | 48 +++++++++++++++------------
>  app/test/test_service_cores.c                 |  9 +++--
>  app/test/test_thash.c                         |  7 ++--
>  config/meson.build                            |  4 +++
>  drivers/common/idpf/idpf_common_rxtx.c        |  2 +-
>  drivers/common/idpf/idpf_common_rxtx_avx512.c |  6 ++--
>  drivers/common/mlx5/mlx5_common.h             |  4 +--
>  drivers/common/mlx5/mlx5_devx_cmds.c          |  7 ++--
>  drivers/net/i40e/i40e_testpmd.c               |  5 ++-
>  drivers/net/ice/ice_rxtx.c                    |  2 +-
>  drivers/net/ixgbe/ixgbe_ethdev.c              |  5 +--
>  drivers/net/ixgbe/ixgbe_rxtx_vec_common.h     |  2 +-
>  drivers/net/mlx5/mlx5.c                       |  5 ++-
>  drivers/net/mlx5/mlx5_flow.c                  |  6 ++--
>  lib/eal/linux/include/rte_os.h                |  1 +
>  lib/eal/windows/include/rte_os.h              |  1 +
>  lib/ethdev/rte_ethdev.c                       |  9 ++---
>  lib/gro/rte_gro.c                             |  4 +--
>  lib/hash/rte_cuckoo_hash.c                    |  4 +--
>  lib/hash/rte_thash.c                          |  2 +-
>  lib/latencystats/rte_latencystats.c           |  2 +-
>  lib/lpm/rte_lpm.h                             |  2 +-
>  lib/rcu/rte_rcu_qsbr.c                        |  6 ++--
>  36 files changed, 137 insertions(+), 123 deletions(-)
> 
> --
> 1.8.3.1
  
Tyler Retzlaff April 18, 2024, 3:15 p.m. UTC | #3
On Thu, Apr 18, 2024 at 12:11:35PM +0000, Konstantin Ananyev wrote:
> Hi Tyler,
> 
> > As per guidance technical board meeting 2024/04/17. This series
> > removes the use of VLAs from code built for Windows for all 3
> > toolchains. If there are additional opportunities to convert VLAs
> > to regular C arrays please provide the details for incorporation
> > into the series.
> 
> I submitted the RFC series:
> https://patchwork.dpdk.org/project/dpdk/list/?series=31781
> that provides alternate approach to VLA removal (without alloca())
> for core libs.
> Feel free to re-use whatever is appropriate in your series. 
> If time permits, I'll try to look to other libs from your series
> (probably next week or so).
> Konstantin

if there is no objection i'm happy to drop changes in my series and
integrate your changes into my series with your signoff.

let me know and i'll roll them together into v2.

thank you!
  
Konstantin Ananyev April 18, 2024, 3:35 p.m. UTC | #4
> On Thu, Apr 18, 2024 at 12:11:35PM +0000, Konstantin Ananyev wrote:
> > Hi Tyler,
> >
> > > As per guidance technical board meeting 2024/04/17. This series
> > > removes the use of VLAs from code built for Windows for all 3
> > > toolchains. If there are additional opportunities to convert VLAs
> > > to regular C arrays please provide the details for incorporation
> > > into the series.
> >
> > I submitted the RFC series:
> > https://patchwork.dpdk.org/project/dpdk/list/?series=31781
> > that provides alternate approach to VLA removal (without alloca())
> > for core libs.
> > Feel free to re-use whatever is appropriate in your series.
> > If time permits, I'll try to look to other libs from your series
> > (probably next week or so).
> > Konstantin
> 
> if there is no objection i'm happy to drop changes in my series and
> integrate your changes into my series with your signoff.
> 
> let me know and i'll roll them together into v2.

Yes absolutely, feel free to go ahead with that.
Thanks
Konstantin

> 
> thank you!