DPDK patches and discussions
 help / color / mirror / Atom feed
* [RFC 0/7] Introduce FreeBSD macros for SAFE iteration
@ 2025-01-27 18:03 Stephen Hemminger
  2025-01-27 18:03 ` [RFC 1/7] eal: add queue macro extensions from FreeBSD Stephen Hemminger
                   ` (7 more replies)
  0 siblings, 8 replies; 13+ messages in thread
From: Stephen Hemminger @ 2025-01-27 18:03 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

This series adds common macros for safe iteration over lists.
It is a subset copy of the macros from FreeBSD that are
missing from the Linux header sys/queue.h

Chose this over several other options:
  - let each driver define their own as needed.
    One Intel driver got it wrong, others will as well.
  - rename all the queue macros to RTE_XXX variants.
    Seems like useless renaming and confusion.
  - Several distros have libbsd package with the correct macros.
    But adding yet another dependency to DPDK would be annoying
    for something this basic.

There are more macros in FreeBSD header that could be useful,
but we can add those later as needed here.

Stephen Hemminger (7):
  eal: add queue macro extensions from FreeBSD
  net/qede: fix use after free
  bus/fslmc: fix use after free
  net/bnxt: fix use after free
  net/iavf: replace local version of TAILQ_FOREACH_SAFE
  vhost: replace open coded TAILQ_FOREACH_SAFE
  raw/ifpga: use EAL version of TAILQ_FOREACH_SAFE

 drivers/bus/fslmc/portal/dpaa2_hw_dpio.c |   5 +-
 drivers/net/bnxt/bnxt_filter.c           |   8 +-
 drivers/net/iavf/iavf_vchnl.c            |   8 +-
 drivers/net/qede/qede_ethdev.h           |   3 +-
 drivers/net/qede/qede_filter.c           |  13 +-
 drivers/raw/ifpga/base/opae_osdep.h      |   1 +
 lib/eal/include/meson.build              |   3 +-
 lib/eal/include/rte_queue.h              | 174 +++++++++++++++++++++++
 lib/vhost/socket.c                       |  11 +-
 9 files changed, 193 insertions(+), 33 deletions(-)
 create mode 100644 lib/eal/include/rte_queue.h

-- 
2.45.2


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

end of thread, other threads:[~2025-01-27 23:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-01-27 18:03 [RFC 0/7] Introduce FreeBSD macros for SAFE iteration Stephen Hemminger
2025-01-27 18:03 ` [RFC 1/7] eal: add queue macro extensions from FreeBSD Stephen Hemminger
2025-01-27 18:03 ` [RFC 2/7] net/qede: fix use after free Stephen Hemminger
2025-01-27 18:03 ` [RFC 3/7] bus/fslmc: " Stephen Hemminger
2025-01-27 18:03 ` [RFC 4/7] net/bnxt: " Stephen Hemminger
2025-01-27 19:25   ` Ajit Khaparde
2025-01-27 18:03 ` [RFC 5/7] net/iavf: replace local version of TAILQ_FOREACH_SAFE Stephen Hemminger
2025-01-27 18:04 ` [RFC 6/7] vhost: replace open coded TAILQ_FOREACH_SAFE Stephen Hemminger
2025-01-27 18:04 ` [RFC 7/7] raw/ifpga: use EAL version of TAILQ_FOREACH_SAFE Stephen Hemminger
2025-01-27 18:16 ` [RFC 0/7] Introduce FreeBSD macros for SAFE iteration Bruce Richardson
2025-01-27 18:43   ` Stephen Hemminger
2025-01-27 19:29     ` Morten Brørup
2025-01-27 23:14       ` Stephen Hemminger

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