DPDK patches and discussions
 help / color / mirror / Atom feed
From: Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
To: dev@dpdk.org
Cc: thomas@monjalon.net, ferruh.yigit@amd.com,
	andrew.rybchenko@oktetlabs.ru, yipeng1.wang@intel.com,
	sameh.gobriel@intel.com, bruce.richardson@intel.com,
	vladimir.medvedkin@intel.com, honnappa.nagarahalli@arm.com,
	roretzla@linux.microsoft.com,
	Konstantin Ananyev <konstantin.ananyev@huawei.com>
Subject: [RFC 0/6] core libs: remove VLA warnings
Date: Thu, 18 Apr 2024 11:33:08 +0100	[thread overview]
Message-ID: <20240418103314.40705-1-konstantin.v.ananyev@yandex.ru> (raw)

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


             reply	other threads:[~2024-04-18 10:33 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-18 10:33 Konstantin Ananyev [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240418103314.40705-1-konstantin.v.ananyev@yandex.ru \
    --to=konstantin.v.ananyev@yandex.ru \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@amd.com \
    --cc=honnappa.nagarahalli@arm.com \
    --cc=konstantin.ananyev@huawei.com \
    --cc=roretzla@linux.microsoft.com \
    --cc=sameh.gobriel@intel.com \
    --cc=thomas@monjalon.net \
    --cc=vladimir.medvedkin@intel.com \
    --cc=yipeng1.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).