DPDK patches and discussions
 help / color / mirror / Atom feed
* [RFC 0/6] core libs: remove VLA warnings
@ 2024-04-18 10:33 Konstantin Ananyev
  2024-04-18 10:33 ` [RFC 1/6] eal/linux: " Konstantin Ananyev
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Konstantin Ananyev @ 2024-04-18 10:33 UTC (permalink / raw)
  To: dev
  Cc: thomas, ferruh.yigit, andrew.rybchenko, yipeng1.wang,
	sameh.gobriel, bruce.richardson, vladimir.medvedkin,
	honnappa.nagarahalli, roretzla, Konstantin Ananyev

From: Konstantin Ananyev <konstantin.ananyev@huawei.com>

This RFC is submitted as part of ongoing VLA removal discussion:
https://patchwork.dpdk.org/project/dpdk/list/?series=31680
The main aim is to explore amount of code changes that would be required for that,
plus explore alternate approaches instead of simple replacing VLAs with alloca() calls.
It touches core libraries only:
always_enable = [
        'cmdline',
        'eal',
        'ethdev',
        'hash',
        'kvargs',
        'log',
        'mbuf',
        'mempool',
        'meter',
        'net',
        'pci',
        'rcu',
        'ring',
        'stack',
        'telemetry',
 ]
For just these libs, we have reaonably small number of VLA warnings:
        1 ../lib/eal/common
	2 ../lib/eal/linux
 	2 ../lib/rcu
	3 ../lib/hash
	4 ../lib/ethdev

The series addresses them one by one, on individual basis.
Disclaimer: this is just an RFC, so some approaches might be questionable
(eal_interrupts).
Others (rcu) shall be treated as API change, so can be applied only for 24.11.
The main goal here is to start discussion and find the best possible approach.

Just as FYI, below is the number of VLA warnings per module for all libs and drivers on my machine
for linux 'default' build with gcc:

      1 ../drivers/crypto/cnxk
      1 ../drivers/crypto/octeontx
      1 ../drivers/crypto/scheduler
      1 ../drivers/net/dpaa
      1 ../drivers/net/failsafe
      1 ../drivers/net/gve
      1 ../drivers/net/i40e
      1 ../drivers/net/ice
      1 ../drivers/net/netvsc
      1 ../drivers/net/sfc
      1 ../lib/eventdev
      1 ../lib/latencystats
      1 ../lib/power
      2 ../drivers/common/mlx5
      2 ../drivers/crypto/ccp
      2 ../drivers/crypto/openssl
      2 ../drivers/net/nfp
      2 ../drivers/net/octeontx
      2 ../drivers/net/softnic
      2 ../drivers/net/vdev_netvsc
      2 ../lib/acl
      2 ../lib/dispatcher
      2 ../lib/eal/linux
      2 ../lib/gro
      2 ../lib/pdump
      2 ../lib/rcu
      3 ../drivers/common/cnxk
      3 ../drivers/common/idpf
      3 ../drivers/crypto/qat
      3 ../drivers/event/dsw
      3 ../drivers/net/bnxt
      3 ../drivers/net/cxgbe
      3 ../drivers/net/ixgbe
      3 ../lib/hash
      3 ../lib/pdcp
      3 ../lib/table
      4 ../drivers/net/bonding
      4 ../drivers/net/cnxk
      4 ../drivers/net/hns3
      4 ../drivers/net/tap
      4 ../lib/ethdev
      5 ../drivers/event/opdl
      5 ../drivers/net/dpaa2
      5 ../drivers/vdpa/mlx5
      5 ../lib/member
      6 ../drivers/event/cnxk
      6 ../lib/bpf
      6 ../lib/vhost
      7 ../drivers/common/mlx5/linux
      8 ../drivers/net/virtio
     10 ../drivers/net/mlx4
     11 ../drivers/net/mlx5
     13 ../drivers/event/sw
     17 ../drivers/net/mlx5/linux
     22 ../lib/lpm
     61 ../lib/ipsec

Konstantin Ananyev (6):
  eal/linux: remove VLA warnings
  eal/common: remove VLA warnings
  ethdev: remove VLA warnings
  hash: remove VLA warnings
  hash/thash: remove VLA warnings
  rcu: remove VLA warnings

 lib/eal/common/eal_common_proc.c |   5 +-
 lib/eal/linux/eal_interrupts.c   |  59 ++++++++--
 lib/ethdev/rte_ethdev.c          | 183 +++++++++++++++++++------------
 lib/hash/rte_cuckoo_hash.c       |   4 +-
 lib/hash/rte_thash.c             |   2 +-
 lib/hash/rte_thash.h             |   8 ++
 lib/rcu/rte_rcu_qsbr.c           |   7 +-
 lib/rcu/rte_rcu_qsbr.h           |   5 +
 8 files changed, 188 insertions(+), 85 deletions(-)

-- 
2.35.3


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-04-19 13:10 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-18 10:33 [RFC 0/6] core libs: remove VLA warnings Konstantin Ananyev
2024-04-18 10:33 ` [RFC 1/6] eal/linux: " Konstantin Ananyev
2024-04-19 12:23   ` Morten Brørup
2024-04-18 10:33 ` [RFC 2/6] eal/common: " Konstantin Ananyev
2024-04-19 11:54   ` Morten Brørup
2024-04-18 10:33 ` [RFC 3/6] ethdev: " Konstantin Ananyev
2024-04-19 12:06   ` Morten Brørup
2024-04-18 10:33 ` [RFC 4/6] hash: " Konstantin Ananyev
2024-04-19 12:08   ` Morten Brørup
2024-04-18 10:33 ` [RFC 5/6] hash/thash: " Konstantin Ananyev
2024-04-19 12:17   ` Morten Brørup
2024-04-19 12:53     ` Konstantin Ananyev
2024-04-19 13:10       ` Morten Brørup
2024-04-18 10:33 ` [RFC 6/6] rcu: " Konstantin Ananyev
2024-04-19 12:21   ` Morten Brørup

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