From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id D1D9DA0547;
	Wed, 12 Oct 2022 11:56:24 +0200 (CEST)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 7AC1642D6E;
	Wed, 12 Oct 2022 11:56:24 +0200 (CEST)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [170.10.133.124])
 by mails.dpdk.org (Postfix) with ESMTP id 64E6F42B6D
 for <dev@dpdk.org>; Wed, 12 Oct 2022 11:56:23 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1665568582;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 in-reply-to:in-reply-to:references:references;
 bh=ZAm5ADB7Eyh6H/9bCQVXOC46ZBC8ecxr+uIXycBCQhU=;
 b=STawmdfa4yVLSc9EZ1TDJAYXxnI6At80N/aSeH/9mzzSCc25jF59ClrDXaY6VGqRJP8XKe
 uxlQ2qT2WHYZcS+JMPyGQnrhx5ozj9t3vxpZ3/hOx0238OJLWzw3EnsJrCgPXVXaFHNEhl
 0t1E/ZeycE+FWQ3hamjxUuOtq9xfpS0=
Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com
 [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS
 (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id
 us-mta-624-8jOr-A96NziUhcomRJHyWg-1; Wed, 12 Oct 2022 05:56:21 -0400
X-MC-Unique: 8jOr-A96NziUhcomRJHyWg-1
Received: by mail-pl1-f197.google.com with SMTP id
 i17-20020a170902cf1100b00183e2a963f5so2465080plg.5
 for <dev@dpdk.org>; Wed, 12 Oct 2022 02:56:21 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=ZAm5ADB7Eyh6H/9bCQVXOC46ZBC8ecxr+uIXycBCQhU=;
 b=OSzbTiwfpZONBpuAo9ErltnueD09ex3/H5VLKSnuTkh5ja6SvR/dCDCDIIIBH88tag
 JjGSPaYEeonydyt4FEUHvDMciuJ+ns3SQMotvU/HKMSxXww0RI10/aFobT3kPDE/8gPS
 PI6eVVfbm16BKpQxLi2VYAZKJpckazwbka186U5MspP/j+nddUSoC18MzQwfuDSoR8U2
 GllXAUkT4S1JX6Ve+ckILeegd8btUrakUlTvT3eLiPeeaA34spFt2DM6qrnnYCS/iErN
 FMkO8JbUT7w7KODmO28yvttFisZAHbuNCXYXP75LfLrx0828NyFp3GeHMB2qB9LXTzjm
 LtOg==
X-Gm-Message-State: ACrzQf01OHsCwis+DMur2+/EErNJGDw6EzcgfuOvAzWznnF3OGrbWCiF
 aDvAJIPwqYGhfotSjENDS4dhlkfg+Rp593ArjwWehNuwMLvGI6sR/CQs/jnFgJifiWpk5RWroAg
 TnkHZzfxNah7SQuHfo9c=
X-Received: by 2002:a63:2a97:0:b0:457:23e9:586d with SMTP id
 q145-20020a632a97000000b0045723e9586dmr24627460pgq.190.1665568580604; 
 Wed, 12 Oct 2022 02:56:20 -0700 (PDT)
X-Google-Smtp-Source: AMsMyM4np8dLXWZa7BZIWoEP3NtBLHSsmoKYDPeDfsYAIl10Q8zF9U/F+mjgUubvyjuHv2vkoMe+5p5tJLB8mjEHzrg=
X-Received: by 2002:a63:2a97:0:b0:457:23e9:586d with SMTP id
 q145-20020a632a97000000b0045723e9586dmr24627438pgq.190.1665568580340; Wed, 12
 Oct 2022 02:56:20 -0700 (PDT)
MIME-Version: 1.0
References: <20220804134430.6192-1-adwivedi@marvell.com>
 <20220929102936.5490-1-adwivedi@marvell.com>
 <20220929102936.5490-2-adwivedi@marvell.com>
 <6bee8943-408e-a930-f053-541af8bed6d0@oktetlabs.ru>
 <CO3PR18MB5005A1CEE3C4C96F2BA959CDDD5C9@CO3PR18MB5005.namprd18.prod.outlook.com>
 <7369fc89-6588-8898-ed2d-91329248e2b6@oktetlabs.ru>
 <CO3PR18MB5005976190B11D76E8F041F8DD5C9@CO3PR18MB5005.namprd18.prod.outlook.com>
 <df3b641c-8969-957d-ecf8-06de73ea3cf6@oktetlabs.ru>
 <CAJFAV8wA98+2=L-5xhPdoUJW350+0ggYsS6C3KTBj+Hg6DFA=Q@mail.gmail.com>
 <CALBAE1OVA1xiAJqhjSoK0q-RAzzJ091zWZn12qvUG9dQKi8GVQ@mail.gmail.com>
In-Reply-To: <CALBAE1OVA1xiAJqhjSoK0q-RAzzJ091zWZn12qvUG9dQKi8GVQ@mail.gmail.com>
From: David Marchand <david.marchand@redhat.com>
Date: Wed, 12 Oct 2022 11:56:08 +0200
Message-ID: <CAJFAV8xQ2=C8Yu_3EGm7avtLm-jkZLFA3GaovwOwh76QLSh4wA@mail.gmail.com>
Subject: Re: [EXT] Re: [PATCH v2 1/4] ethdev: add trace points
To: Jerin Jacob <jerinjacobk@gmail.com>
Cc: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>, 
 Jerin Jacob Kollanukkaran <jerinj@marvell.com>,
 Ankur Dwivedi <adwivedi@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>, 
 Thomas Monjalon <thomas@monjalon.net>, Ferruh Yigit <ferruh.yigit@amd.com>,
 Ray Kinsella <mdr@ashroe.eu>
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Wed, Oct 12, 2022 at 11:50 AM Jerin Jacob <jerinjacobk@gmail.com> wrote:
> On Thu, Oct 6, 2022 at 1:27 PM David Marchand <david.marchand@redhat.com> wrote:
> > On Thu, Oct 6, 2022 at 9:50 AM Andrew Rybchenko
> > <andrew.rybchenko@oktetlabs.ru> wrote:
> > > >>>>> diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map index
> > > >>>>> 3def7bfd24..e3d603cc9a 100644
> > > >>>>> --- a/lib/ethdev/version.map
> > > >>>>> +++ b/lib/ethdev/version.map
> > > >>>>> @@ -288,6 +288,150 @@ EXPERIMENTAL {
> > > >>>>>
> > > >>>>>           # added in 22.11
> > > >>>>>           rte_flow_async_action_handle_query;
> > > >>>>> + __rte_eth_trace_add_first_rx_callback;
> > > >>>>
> > > >>>> Why is it in EXPERIMENTAL section, but not INTERNAL?
> > > >>> [Ankur] Because the functions for which trace is added are not internal
> > > >> functions.
> > > >>
> > > >> Sorry, but I don't understand. I agree that tracing of public inline functions
> > > >> must be part of ABI, but why everything else should be a part of ABI?
> > > > [Ankur] I see that there are some already existing trace functions added in EXPERIMENTAL in version.map like __rte_ethdev_trace_configure, __rte_ethdev_trace_rxq_setup. So not sure will it be internal or experimental.
> > > >
> > > > But you are right the trace function will not be called as a public api. Should I make the newly added trace as internal then?
> > >
> > > @David, do I understand correctly that trace points in
> > > EXPERIMENTAL is a mistake in majority of cases?
> >
> > The trace point global variables (__rte_trace_foo)  are only exposed
> > for inline helpers that might call their associated trace point helper
> > (rte_trace_foo()).
> > An application is not supposed to directly manipulate them.
> > Any tp manipulation should be through the rte_trace_point_* API.
> >
> > Jerin, do you see any other uses for them?
>
> No.  Expect the following ones, which can be used by application directly.
>
>         __rte_eal_trace_generic_float;
>         __rte_eal_trace_generic_func;
>         __rte_eal_trace_generic_i16;
>         __rte_eal_trace_generic_i32;
>         __rte_eal_trace_generic_i64;
>         __rte_eal_trace_generic_i8;
>         __rte_eal_trace_generic_int;
>         __rte_eal_trace_generic_long;
>         __rte_eal_trace_generic_ptr;
>         __rte_eal_trace_generic_str;
>         __rte_eal_trace_generic_u16;
>         __rte_eal_trace_generic_u32;
>         __rte_eal_trace_generic_u64;
>         __rte_eal_trace_generic_u8;

Indeed, that's something I discussed offlist after with Andrew but
forgot to put back on the mailing list.
As long as the trace point is called from a helper in a header exposed
to applications, we can't mark the trace point variable internal.


-- 
David Marchand