From: Thomas Monjalon <thomas@monjalon.net>
To: Tomasz Duszynski <tduszynski@marvell.com>
Cc: David Marchand <david.marchand@redhat.com>,
bruce.richardson@intel.com, dev@dpdk.org, jerinj@marvell.com,
mb@smartsharesystems.com, stephen@networkplumber.org
Subject: Re: [PATCH v10 03/10] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs
Date: Fri, 17 Oct 2025 11:04:59 +0200 [thread overview]
Message-ID: <4661587.2iPT33SAM4@thomas> (raw)
In-Reply-To: <CAJFAV8wGnXv4gO+0pf3e6gw0ahFH7q0JbMfiaGDjY9hBBX=_Pw@mail.gmail.com>
Hello Tomasz,
Recently David has improved the checks on headers.
We would like to see a new revision
(with the approach described below by David)
passing in the CI with the new checks.
Thanks
17/10/2025 10:45, David Marchand:
> On Fri, 17 Oct 2025 at 08:58, Tomasz Duszynski <tduszynski@marvell.com> wrote:
> >
> > > > > > Add a dummy rte_pmu_read() definition for chkincs when
> > > > > > ALLOW_EXPERIMENTAL_API is not defined to suppress warnings from
> > > > > > use of experimental APIs in tracepoints.
> > > > > >
> > > > > > Fixes: 960c43184c4d ("pmu: introduce library for reading PMU events")
> > > > > >
> > > > > > Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
> > > > > > ---
> > > > > > lib/pmu/rte_pmu.h | 4 ++++
> > > > > > 1 file changed, 4 insertions(+)
> > > > > >
> > > > > > diff --git a/lib/pmu/rte_pmu.h b/lib/pmu/rte_pmu.h
> > > > > > index 57b634ecd8..84a5d522d1 100644
> > > > > > --- a/lib/pmu/rte_pmu.h
> > > > > > +++ b/lib/pmu/rte_pmu.h
> > > > > > @@ -232,6 +232,10 @@ rte_pmu_read(unsigned int index)
> > > > > >
> > > > > > return __rte_pmu_read_userpage(group->mmap_pages[index]);
> > > > > > }
> > > > > > +/* quiesce warnings produced by chkincs */
> > > > > > +#ifndef ALLOW_EXPERIMENTAL_API
> > > > > > +#define rte_pmu_read(pc) ({ RTE_SET_USED(pc); 0; })
> > > > > > +#endif
> > > > >
> > > > > Seems like an awkward solution I would rather that fix chkincs
> > > > > or restructure this.
> > > > >
> > > > > The way you are doing it will cause the checks for use
> > > > > of experimental API to not work.
> > > >
> > > > No matter how I shuffle things around, the experimental API keeps getting called from
> > > > non-experimental code, so those warnings will show up.. Fixing chkincs would mean telling it to
> > > > skip checks for this library, which is basically what I'm already doing here.
> > > >
> > > > Dropping experimental tag feels too soon. The library still needs some time to bake.
> > > >
> > > > So, unless anyone has got other ideas, which is the better trade off here: yanking experimental
> > > > tags or tweaking chkincs to ignore the library checks?
> > >
>
> What we have been doing in other libraries is to hide calls to
> experimental symbols in inline helpers, which is the issue here,
> right?
> Then add a RTE_VERIFY(false) so that an abort is triggered at runtime
> in case an application called this helper.
>
> See a3e126fd58d1 ("bitset: fix build for GCC without experimental
> API") for example.
>
>
> I see the same #define hiding for __rte_pmu_enable_group and
> __rte_pmu_read_userpage.
> Something like below should be applied on main before looking at this
> new series.
>
> $ git diff
> diff --git a/lib/pmu/rte_pmu.h b/lib/pmu/rte_pmu.h
> index 57b634ecd8..fcf125a908 100644
> --- a/lib/pmu/rte_pmu.h
> +++ b/lib/pmu/rte_pmu.h
> @@ -31,6 +31,7 @@
> #include <rte_branch_prediction.h>
> #include <rte_common.h>
> #include <rte_compat.h>
> +#include <rte_debug.h>
> #include <rte_lcore.h>
>
> #define RTE_PMU_SUPPORTED
> @@ -181,12 +182,6 @@ __rte_experimental
> int
> rte_pmu_add_event(const char *name);
>
> -/* quiesce warnings produced by chkincs caused by calling internal
> functions directly */
> -#ifndef ALLOW_EXPERIMENTAL_API
> -#define __rte_pmu_enable_group(group) ({ RTE_SET_USED(group); 0; })
> -#define __rte_pmu_read_userpage(pc) ({ RTE_SET_USED(pc); 0; })
> -#endif
> -
> /**
> * @warning
> * @b EXPERIMENTAL: this API may change without prior notice.
> @@ -211,6 +206,7 @@ __rte_experimental
> static __rte_always_inline uint64_t
> rte_pmu_read(unsigned int index)
> {
> +#ifdef ALLOW_EXPERIMENTAL_API
> unsigned int lcore_id = rte_lcore_id();
> struct rte_pmu_event_group *group;
>
> @@ -231,6 +227,10 @@ rte_pmu_read(unsigned int index)
> }
>
> return __rte_pmu_read_userpage(group->mmap_pages[index]);
> +#else
> + RTE_SET_USED(index);
> + RTE_VERIFY(false);
> +#endif
> }
>
> #ifdef __cplusplus
next prev parent reply other threads:[~2025-10-17 9:05 UTC|newest]
Thread overview: 117+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 6:53 [PATCH 0/6] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-16 6:53 ` [PATCH 1/6] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-16 6:53 ` [PATCH 2/6] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-16 6:53 ` [PATCH 3/6] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-16 7:03 ` Thomas Monjalon
2025-06-16 9:54 ` Tomasz Duszynski
2025-06-16 6:53 ` [PATCH 4/6] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-16 7:08 ` Thomas Monjalon
2025-06-16 10:53 ` Tomasz Duszynski
2025-06-16 6:53 ` [PATCH 5/6] test/pmu: enable fast test Tomasz Duszynski
2025-06-16 6:53 ` [PATCH 6/6] trace: add PMU Tomasz Duszynski
2025-06-16 7:13 ` Thomas Monjalon
2025-06-16 9:49 ` Tomasz Duszynski
2025-06-16 10:32 ` Bruce Richardson
2025-06-16 13:18 ` Morten Brørup
2025-06-18 6:56 ` [PATCH v2 0/6] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-18 6:56 ` [PATCH v2 1/6] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-18 6:56 ` [PATCH v2 2/6] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-18 6:56 ` [PATCH v2 3/6] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-18 6:56 ` [PATCH v2 4/6] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-18 6:56 ` [PATCH v2 5/6] test/pmu: enable fast test Tomasz Duszynski
2025-06-18 6:56 ` [PATCH v2 6/6] trace: add PMU Tomasz Duszynski
2025-06-18 7:16 ` Morten Brørup
2025-06-18 9:47 ` Thomas Monjalon
2025-06-18 10:28 ` Bruce Richardson
2025-06-18 11:30 ` Morten Brørup
2025-06-18 10:23 ` Tomasz Duszynski
2025-06-18 10:37 ` Morten Brørup
2025-06-20 12:05 ` [PATCH v3 0/7] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-20 12:05 ` [PATCH v3 1/7] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-20 12:05 ` [PATCH v3 2/7] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-20 12:05 ` [PATCH v3 3/7] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-20 12:05 ` [PATCH v3 4/7] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-20 12:05 ` [PATCH v3 5/7] test/pmu: enable fast test Tomasz Duszynski
2025-06-20 12:05 ` [PATCH v3 6/7] trace: add PMU Tomasz Duszynski
2025-06-20 12:05 ` [PATCH v3 7/7] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-06-24 12:29 ` [PATCH v4 0/7] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-24 12:29 ` [PATCH v4 1/7] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-24 12:29 ` [PATCH v4 2/7] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-24 12:29 ` [PATCH v4 3/7] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-06-24 12:29 ` [PATCH v4 4/7] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-24 12:29 ` [PATCH v4 5/7] test/pmu: enable fast test Tomasz Duszynski
2025-06-24 12:29 ` [PATCH v4 6/7] trace: add PMU Tomasz Duszynski
2025-06-24 12:29 ` [PATCH v4 7/7] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 6/8] test/pmu: enable fast test Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 7/8] trace: add PMU Tomasz Duszynski
2025-06-25 4:47 ` [PATCH v5 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 6/8] test/pmu: enable test Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 7/8] trace: add PMU Tomasz Duszynski
2025-06-27 10:57 ` [PATCH v6 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-06-27 15:40 ` [PATCH v7 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-06-27 15:41 ` [PATCH v7 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-06-27 15:41 ` [PATCH v7 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-06-27 15:41 ` [PATCH v7 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-06-27 15:41 ` [PATCH v7 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-06-27 15:41 ` [PATCH v7 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-06-27 15:41 ` [PATCH v7 6/8] test/pmu: enable test Tomasz Duszynski
2025-06-27 15:41 ` [PATCH v7 7/8] trace: add PMU Tomasz Duszynski
2025-07-01 13:33 ` David Marchand
2025-07-21 10:24 ` Tomasz Duszynski
2025-07-21 10:45 ` Thomas Monjalon
2025-07-22 10:10 ` Morten Brørup
2025-07-22 11:06 ` Tomasz Duszynski
2025-06-27 15:41 ` [PATCH v7 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 6/8] test/pmu: enable test Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 7/8] trace: add PMU Tomasz Duszynski
2025-07-22 12:00 ` [PATCH v8 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-07-23 4:41 ` [PATCH v9 0/8] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-07-23 4:41 ` [PATCH v9 1/8] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-07-23 14:27 ` Stephen Hemminger
2025-08-01 9:37 ` Tomasz Duszynski
2025-08-01 21:57 ` Stephen Hemminger
2025-07-23 4:41 ` [PATCH v9 2/8] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-07-23 4:41 ` [PATCH v9 3/8] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-07-23 4:41 ` [PATCH v9 4/8] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-07-23 4:41 ` [PATCH v9 5/8] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-07-23 4:41 ` [PATCH v9 6/8] test/pmu: enable test Tomasz Duszynski
2025-07-23 4:41 ` [PATCH v9 7/8] trace: add PMU Tomasz Duszynski
2025-07-23 4:41 ` [PATCH v9 8/8] lib/pmu: fix out-of-bound access Tomasz Duszynski
2025-08-01 10:20 ` [PATCH v10 00/10] lib/pmu: cleanups and trace integration Tomasz Duszynski
2025-08-01 10:21 ` [PATCH v10 01/10] trace: change scope of conditional block Tomasz Duszynski
2025-08-01 10:21 ` [PATCH v10 02/10] lib/pmu: fix build error if ALLOW_EXPERIMENAL_API is undefined Tomasz Duszynski
2025-08-01 10:21 ` [PATCH v10 03/10] lib/pmu: quiesce rte_pmu_read deprecation warning in chkincs Tomasz Duszynski
2025-08-01 21:47 ` Stephen Hemminger
2025-08-04 10:09 ` Tomasz Duszynski
2025-08-08 11:27 ` Tomasz Duszynski
2025-10-17 6:58 ` Tomasz Duszynski
2025-10-17 8:45 ` David Marchand
2025-10-17 9:04 ` Thomas Monjalon [this message]
2025-08-01 10:21 ` [PATCH v10 04/10] lib/pmu: export only necessary arch headers Tomasz Duszynski
2025-08-01 10:21 ` [PATCH v10 05/10] lib/pmu: reimplement per-arch ops as callbacks Tomasz Duszynski
2025-08-01 10:21 ` [PATCH v10 06/10] lib/pmu: do not try enabling perf counter access on arm64 Tomasz Duszynski
2025-08-01 21:49 ` Stephen Hemminger
2025-08-04 8:32 ` Tomasz Duszynski
2025-08-04 17:12 ` Wathsala Vithanage
2025-08-01 10:21 ` [PATCH v10 07/10] lib/pmu: use build system defined RTE_LIB_PMU macro Tomasz Duszynski
2025-08-01 10:21 ` [PATCH v10 08/10] test/pmu: enable test Tomasz Duszynski
2025-08-01 10:21 ` [PATCH v10 09/10] trace: add PMU Tomasz Duszynski
2025-08-01 10:21 ` [PATCH v10 10/10] lib/pmu: fix out-of-bound access Tomasz Duszynski
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=4661587.2iPT33SAM4@thomas \
--to=thomas@monjalon.net \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=mb@smartsharesystems.com \
--cc=stephen@networkplumber.org \
--cc=tduszynski@marvell.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).