Message ID | 20240904180954.104473-1-stephen@networkplumber.org (mailing list archive) |
---|---|
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id AFC6845905; Wed, 4 Sep 2024 20:10:06 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74E4242797; Wed, 4 Sep 2024 20:10:06 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 496134275A for <dev@dpdk.org>; Wed, 4 Sep 2024 20:10:05 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7141feed424so5457291b3a.2 for <dev@dpdk.org>; Wed, 04 Sep 2024 11:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1725473404; x=1726078204; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=q2xMIzIoOw+R2hBbrjBF9zA8MkOdsgfSj1Zz95HIrgk=; b=NkRCVWGsiSsCVPxkFBEJ3cgPZ0OC0IaMaBnPxoQofDKJwxEBPOuDLswM+QVnXIS9B3 AwUcjAk9WYrf+urHZ6uBs1A6rzQbbfHAOdJO6BX8N3HxQFsepp2y3I2sIHTrW22Lb9KQ Fs9Tt1n2VsnR/6bv5rv0K4TzbpLvAohyDcmXhK8mZER/l1bUI7XizydzHqDxjRBrDP0y 449VwUo1kh/1ua3G1oFirZgf+ZaztnD5ouoe9Rt0d4Ku32Q3TdG9nDMRGZS5HlVa3Eaf 1og0Wg+ydlZykYQ3XnPyQ5dqvH6WWgt3YjKysih/IThqaJhyFCkoGNrVVkKh00pS+uyF 3lGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725473404; x=1726078204; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=q2xMIzIoOw+R2hBbrjBF9zA8MkOdsgfSj1Zz95HIrgk=; b=b1Zd/1C9n4d1y0JgAjbP7yyDfzd8ZvUPH3VgBywcX5Gsvq0CMOMaxhBwvwhBAtSZYB 3FLoRxTkH7tni2ex3Htiax+c/xzpdSqNzoXrktrDsoeBlAm6ERGxkS/oWlmd3e+CVAMM PesP0E5qKOtuoRAXZ8tf1pdh+akdSSzzfnYb8JcdLY/TIwVv+edG45b0GLz/anw2EIfz 2L3eUkwgostCR15nkSlQ032rT144roYGODEQXCzITB0D+VSTCn8jSzYxqxvkGrjuYjnx 4gslAPuD9wYvho1leqldCrWQtlMoXbguxfOY6MSvisjuMOc/k01tVk0Rh0grFPyAQH6V qM+A== X-Gm-Message-State: AOJu0Yz5DdQy7cZhSf2dpkJJXMmkQOkEHJexzRp3V/sSbFnXq5lOEXyK 6eE1cEdxzfki5f8Txxio2Hn4zAIJ96YJc0skBx+C1RP2USLHkOAEVi87W5gtYmSmQqbShTN5nG2 IYjk= X-Google-Smtp-Source: AGHT+IF2vu7OTB+pVpHcJ0vbiL0p6XWhRC5+WwM1CsEY/zohSovZga7JucSfMGSL4npp0u2aaLtqaA== X-Received: by 2002:a05:6a21:6b0c:b0:1c2:8d33:af69 with SMTP id adf61e73a8af0-1cece5d1678mr16244753637.41.1725473403997; Wed, 04 Sep 2024 11:10:03 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-7178562ca29sm704737b3a.169.2024.09.04.11.10.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Sep 2024 11:10:03 -0700 (PDT) From: Stephen Hemminger <stephen@networkplumber.org> To: dev@dpdk.org Cc: Stephen Hemminger <stephen@networkplumber.org> Subject: [PATCH 0/3] eal: mark API's as stable Date: Wed, 4 Sep 2024 11:08:43 -0700 Message-ID: <20240904180954.104473-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 |
Series | eal: mark API's as stable | |
Message
Stephen Hemminger
Sept. 4, 2024, 6:08 p.m. UTC
The API's in ethtool from before 23.11 should be marked stable. Should probably include the trace api's but that is more complex change. Stephen Hemminger (3): eal: make rte_cpu_get_intrinsics_support stable eal: mark rte_lcore_register_usage_cb stable eal: mark rte_memzone_max_get/set stable lib/eal/include/generic/rte_cpuflags.h | 4 ---- lib/eal/include/rte_lcore.h | 4 ---- lib/eal/include/rte_memzone.h | 8 -------- lib/eal/version.map | 10 ++++------ 4 files changed, 4 insertions(+), 22 deletions(-)
Comments
> From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Wednesday, 4 September 2024 20.09 > > The API's in ethtool from before 23.11 should be marked stable. > Should probably include the trace api's but that is more complex change. For the series, Acked-by: Morten Brørup <mb@smartsharesystems.com>
On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger <stephen@networkplumber.org> wrote: > > The API's in ethtool from before 23.11 should be marked stable. EAL* ? > Should probably include the trace api's but that is more complex change. On the trace API itself it should be ok. The problem is with the tracepoint variables themselves, and I don't think we should mark them stable.
> From: David Marchand [mailto:david.marchand@redhat.com] > Sent: Thursday, 5 September 2024 09.59 > > On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > <stephen@networkplumber.org> wrote: > > > > The API's in ethtool from before 23.11 should be marked stable. > > EAL* ? > > > Should probably include the trace api's but that is more complex change. > > On the trace API itself it should be ok. No! Trace must remain experimental until controlled by a meson option, e.g. "enable_trace", whereby trace can be completely disabled and omitted from the compiled application/libraries/drivers at build time. <rant> Furthermore, I would prefer having trace as a separate library, not part of the EAL bloat. The EAL should - as its name says - provide hardware and O/S abstractions, not a collection of features. </rant> > The problem is with the tracepoint variables themselves, and I don't > think we should mark them stable. Agree. They are only there - as a middle step - to assist generating the trace output, so I don't see any benefit in marking them stable. We could introduce a means to mark their trace output format as stable; but only if some trace output processors actually benefit from this. And it introduces extra work for maintaining trace points and adding new trace points.
On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> wrote: > > > From: David Marchand [mailto:david.marchand@redhat.com] > > Sent: Thursday, 5 September 2024 09.59 > > > > On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > > <stephen@networkplumber.org> wrote: > > > > > > The API's in ethtool from before 23.11 should be marked stable. > > > > EAL* ? > > > > > Should probably include the trace api's but that is more complex change. > > > > On the trace API itself it should be ok. > > No! *sigh* > > Trace must remain experimental until controlled by a meson option, e.g. "enable_trace", whereby trace can be completely disabled and omitted from the compiled application/libraries/drivers at build time. This seems unrelated to marking the API stable as regardless of the API state at the moment, this code is always present. Patches welcome if you want it stripped.
> From: David Marchand [mailto:david.marchand@redhat.com] > Sent: Thursday, 5 September 2024 11.03 > > On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> > wrote: > > > > > From: David Marchand [mailto:david.marchand@redhat.com] > > > Sent: Thursday, 5 September 2024 09.59 > > > > > > On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > > > <stephen@networkplumber.org> wrote: > > > > > > > > The API's in ethtool from before 23.11 should be marked stable. > > > > > > EAL* ? > > > > > > > Should probably include the trace api's but that is more complex change. > > > > > > On the trace API itself it should be ok. > > > > No! > > *sigh* > > > > > Trace must remain experimental until controlled by a meson option, e.g. > "enable_trace", whereby trace can be completely disabled and omitted from the > compiled application/libraries/drivers at build time. > > This seems unrelated to marking the API stable as regardless of the > API state at the moment, this code is always present. I cannot foresee if disabling trace at build time will require changes to the trace API. So I'm being cautious here. However, if Jerin (as author of the trace subsystem) foresees that it will be possible to disable trace at build time without affecting the trace API, I don't object to marking the trace API (or some of it) stable. Before doing that, rte_trace_mode_get/set() and the accompanying enum rte_trace_mode should be changed to rte_trace_config_get/set() using a new struct rte_trace_config (containing the enum rte_trace_mode, and expandable with new fields as the need arises). This will prepare for e.g. tracing to other destinations than system memory, such as a remote trace collector on the network, like SYSLOG. > Patches welcome if you want it stripped. Don't have time myself, so I suggested it as a code challenge instead. :-)
On Thu, Sep 5, 2024 at 3:14 PM Morten Brørup <mb@smartsharesystems.com> wrote: > > > From: David Marchand [mailto:david.marchand@redhat.com] > > Sent: Thursday, 5 September 2024 11.03 > > > > On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> > > wrote: > > > > > > > From: David Marchand [mailto:david.marchand@redhat.com] > > > > Sent: Thursday, 5 September 2024 09.59 > > > > > > > > On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > > > > <stephen@networkplumber.org> wrote: > > > > > > > > > > The API's in ethtool from before 23.11 should be marked stable. > > > > > > > > EAL* ? > > > > > > > > > Should probably include the trace api's but that is more complex change. > > > > > > > > On the trace API itself it should be ok. > > > > > > No! > > > > *sigh* > > > > > > > > Trace must remain experimental until controlled by a meson option, e.g. > > "enable_trace", whereby trace can be completely disabled and omitted from the > > compiled application/libraries/drivers at build time. > > > > This seems unrelated to marking the API stable as regardless of the > > API state at the moment, this code is always present. > > I cannot foresee if disabling trace at build time will require changes to the trace API. So I'm being cautious here. > > However, if Jerin (as author of the trace subsystem) foresees that it will be possible to disable trace at build time without affecting the trace API, I don't object to marking the trace API (or some of it) stable. I don't for foresee any ABI changes when adding disabling trace compile time support. However, I don't understand why we need to do that. In the sense, fast path functions are already having an option to compile out. Slow path functions can be disabled at runtime at the cost of 1 cycle as instrumentation cost. Having said that, I don't have any concern about disabling trace as an option. > > Before doing that, rte_trace_mode_get/set() and the accompanying enum rte_trace_mode should be changed to rte_trace_config_get/set() using a new struct rte_trace_config (containing the enum rte_trace_mode, and expandable with new fields as the need arises). This will prepare for e.g. tracing to other destinations than system memory, such as a remote trace collector on the network, like SYSLOG. > > > Patches welcome if you want it stripped. > > Don't have time myself, so I suggested it as a code challenge instead. :-) >
> From: Jerin Jacob [mailto:jerinjacobk@gmail.com] > Sent: Thursday, 5 September 2024 16.02 > > On Thu, Sep 5, 2024 at 3:14 PM Morten Brørup <mb@smartsharesystems.com> wrote: > > > > > From: David Marchand [mailto:david.marchand@redhat.com] > > > Sent: Thursday, 5 September 2024 11.03 > > > > > > On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> > > > wrote: > > > > > > > > > From: David Marchand [mailto:david.marchand@redhat.com] > > > > > Sent: Thursday, 5 September 2024 09.59 > > > > > > > > > > On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > > > > > <stephen@networkplumber.org> wrote: > > > > > > > > > > > > The API's in ethtool from before 23.11 should be marked stable. > > > > > > > > > > EAL* ? > > > > > > > > > > > Should probably include the trace api's but that is more complex > change. > > > > > > > > > > On the trace API itself it should be ok. > > > > > > > > No! > > > > > > *sigh* > > > > > > > > > > > Trace must remain experimental until controlled by a meson option, e.g. > > > "enable_trace", whereby trace can be completely disabled and omitted from > the > > > compiled application/libraries/drivers at build time. > > > > > > This seems unrelated to marking the API stable as regardless of the > > > API state at the moment, this code is always present. > > > > I cannot foresee if disabling trace at build time will require changes to > the trace API. So I'm being cautious here. > > > > However, if Jerin (as author of the trace subsystem) foresees that it will > be possible to disable trace at build time without affecting the trace API, I > don't object to marking the trace API (or some of it) stable. > > I don't for foresee any ABI changes when adding disabling trace > compile time support. Based on Jerin's feedback, I'm retracting my objection. > However, I don't understand why we need to do > that. To reduce code size. Relevant for embedded/memory-constrained systems. > In the sense, fast path functions are already having an option > to compile out. > Slow path functions can be disabled at runtime at the cost of 1 cycle > as instrumentation cost. Having said that, I don't have any concern > about disabling trace as an option. Great. > > > > > > Before doing that, rte_trace_mode_get/set() and the accompanying enum > rte_trace_mode should be changed to rte_trace_config_get/set() using a new > struct rte_trace_config (containing the enum rte_trace_mode, and expandable > with new fields as the need arises). This will prepare for e.g. tracing to > other destinations than system memory, such as a remote trace collector on the > network, like SYSLOG. I'm also retracting this precondition... If the need for further trace configuration should ever arise, rte_trace_config_get/set() can be added later. And rte_trace_mode_get/set(), if not marked as experimental anymore, will be kept for backwards compatibility. > > > > > Patches welcome if you want it stripped. > > > > Don't have time myself, so I suggested it as a code challenge instead. :-) > >
On 9/5/2024 3:01 PM, Jerin Jacob wrote: > On Thu, Sep 5, 2024 at 3:14 PM Morten Brørup <mb@smartsharesystems.com> wrote: >> >>> From: David Marchand [mailto:david.marchand@redhat.com] >>> Sent: Thursday, 5 September 2024 11.03 >>> >>> On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> >>> wrote: >>>> >>>>> From: David Marchand [mailto:david.marchand@redhat.com] >>>>> Sent: Thursday, 5 September 2024 09.59 >>>>> >>>>> On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger >>>>> <stephen@networkplumber.org> wrote: >>>>>> >>>>>> The API's in ethtool from before 23.11 should be marked stable. >>>>> >>>>> EAL* ? >>>>> >>>>>> Should probably include the trace api's but that is more complex change. >>>>> >>>>> On the trace API itself it should be ok. >>>> >>>> No! >>> >>> *sigh* >>> >>>> >>>> Trace must remain experimental until controlled by a meson option, e.g. >>> "enable_trace", whereby trace can be completely disabled and omitted from the >>> compiled application/libraries/drivers at build time. >>> >>> This seems unrelated to marking the API stable as regardless of the >>> API state at the moment, this code is always present. >> >> I cannot foresee if disabling trace at build time will require changes to the trace API. So I'm being cautious here. >> >> However, if Jerin (as author of the trace subsystem) foresees that it will be possible to disable trace at build time without affecting the trace API, I don't object to marking the trace API (or some of it) stable. > > I don't for foresee any ABI changes when adding disabling trace > compile time support. However, I don't understand why we need to do > that. In the sense, fast path functions are already having an option > to compile out. > Slow path functions can be disabled at runtime at the cost of 1 cycle > as instrumentation cost. Having said that, I don't have any concern > about disabling trace as an option. > I agree with Jerin, I don't see motivation to disable slow path traces when they can be disabled in runtime. And fast path traces already have compile flag to disable them. Build time configurations in long term has problems too, so I am for not using them unless we don't have to. > >> >> Before doing that, rte_trace_mode_get/set() and the accompanying enum rte_trace_mode should be changed to rte_trace_config_get/set() using a new struct rte_trace_config (containing the enum rte_trace_mode, and expandable with new fields as the need arises). This will prepare for e.g. tracing to other destinations than system memory, such as a remote trace collector on the network, like SYSLOG. >> >>> Patches welcome if you want it stripped. >> >> Don't have time myself, so I suggested it as a code challenge instead. :-) >>
On 9/5/2024 8:58 AM, David Marchand wrote: > On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > <stephen@networkplumber.org> wrote: >> >> The API's in ethtool from before 23.11 should be marked stable. > > EAL* ? > >> Should probably include the trace api's but that is more complex change. > > On the trace API itself it should be ok. > The problem is with the tracepoint variables themselves, and I don't > think we should mark them stable. > We cleaned tracepoint variables from ethdev map file, why they exist for 'eal'? I can see .map file has bunch of "__rte_eal_trace_generic_*", I think they exists to support 'rte_eal_trace_generic_*()' APIs which can be called from other libraries. Do we really need them? Why not whoever calls them directly call 'rte_trace_point_emit_*' instead? As these rte_eal_trace_generic_*()' not used at all, I assume this is what done already. @Jerin, what do think to remove 'rte_eal_trace_generic_*()' APIs, so trace always keeps local to library, and don't bloat the eal .map file?
On Fri, Sep 6, 2024 at 11:34 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote: > > On the trace API itself it should be ok. > > The problem is with the tracepoint variables themselves, and I don't > > think we should mark them stable. > > > > We cleaned tracepoint variables from ethdev map file, why they exist for > 'eal'? > > I can see .map file has bunch of "__rte_eal_trace_generic_*", I think > they exists to support 'rte_eal_trace_generic_*()' APIs which can be > called from other libraries. > > Do we really need them? > Why not whoever calls them directly call 'rte_trace_point_emit_*' instead? > As these rte_eal_trace_generic_*()' not used at all, I assume this is > what done already. > > @Jerin, > what do think to remove 'rte_eal_trace_generic_*()' APIs, so trace > always keeps local to library, and don't bloat the eal .map file? IIRC, we still need to export them for inline helpers.
> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] > Sent: Friday, 6 September 2024 10.54 > > On 9/5/2024 3:01 PM, Jerin Jacob wrote: > > On Thu, Sep 5, 2024 at 3:14 PM Morten Brørup <mb@smartsharesystems.com> > wrote: > >> > >>> From: David Marchand [mailto:david.marchand@redhat.com] > >>> Sent: Thursday, 5 September 2024 11.03 > >>> > >>> On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> > >>> wrote: > >>>> > >>>>> From: David Marchand [mailto:david.marchand@redhat.com] > >>>>> Sent: Thursday, 5 September 2024 09.59 > >>>>> > >>>>> On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > >>>>> <stephen@networkplumber.org> wrote: > >>>>>> > >>>>>> The API's in ethtool from before 23.11 should be marked stable. > >>>>> > >>>>> EAL* ? > >>>>> > >>>>>> Should probably include the trace api's but that is more complex > change. > >>>>> > >>>>> On the trace API itself it should be ok. > >>>> > >>>> No! > >>> > >>> *sigh* > >>> > >>>> > >>>> Trace must remain experimental until controlled by a meson option, e.g. > >>> "enable_trace", whereby trace can be completely disabled and omitted from > the > >>> compiled application/libraries/drivers at build time. > >>> > >>> This seems unrelated to marking the API stable as regardless of the > >>> API state at the moment, this code is always present. > >> > >> I cannot foresee if disabling trace at build time will require changes to > the trace API. So I'm being cautious here. > >> > >> However, if Jerin (as author of the trace subsystem) foresees that it will > be possible to disable trace at build time without affecting the trace API, I > don't object to marking the trace API (or some of it) stable. > > > > I don't for foresee any ABI changes when adding disabling trace > > compile time support. However, I don't understand why we need to do > > that. In the sense, fast path functions are already having an option > > to compile out. > > Slow path functions can be disabled at runtime at the cost of 1 cycle > > as instrumentation cost. Having said that, I don't have any concern > > about disabling trace as an option. > > > > I agree with Jerin, I don't see motivation to disable slow path traces > when they can be disabled in runtime. > And fast path traces already have compile flag to disable them. > > Build time configurations in long term has problems too, so I am for not > using them unless we don't have to. For some use cases, trace is dead code, and should be omitted. You don't want dead code in production systems. Please remember that DPDK is also being used in highly optimized embedded systems, hardware appliances and other systems where memory is not abundant. DPDK is not only for cloud and distros. ;-) The CI only tests DPDK with a build time configuration expected to be usable for distros. I'm not asking to change that. I'm only asking for more build time configurability to support other use cases.
On 9/6/2024 10:48 AM, David Marchand wrote: > On Fri, Sep 6, 2024 at 11:34 AM Ferruh Yigit <ferruh.yigit@amd.com> wrote: >>> On the trace API itself it should be ok. >>> The problem is with the tracepoint variables themselves, and I don't >>> think we should mark them stable. >>> >> >> We cleaned tracepoint variables from ethdev map file, why they exist for >> 'eal'? >> >> I can see .map file has bunch of "__rte_eal_trace_generic_*", I think >> they exists to support 'rte_eal_trace_generic_*()' APIs which can be >> called from other libraries. >> >> Do we really need them? >> Why not whoever calls them directly call 'rte_trace_point_emit_*' instead? >> As these rte_eal_trace_generic_*()' not used at all, I assume this is >> what done already. >> >> @Jerin, >> what do think to remove 'rte_eal_trace_generic_*()' APIs, so trace >> always keeps local to library, and don't bloat the eal .map file? > > IIRC, we still need to export them for inline helpers. > As far as I can see they are only used for 'rte_eal_trace_generic_*()' trace helper APIs, but does eal really expose these helper APIs? Is there any other inline helpers I am missing?
On Fri, Sep 6, 2024 at 3:04 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote: > > On 9/5/2024 8:58 AM, David Marchand wrote: > > On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > > <stephen@networkplumber.org> wrote: > >> > >> The API's in ethtool from before 23.11 should be marked stable. > > > > EAL* ? > > > >> Should probably include the trace api's but that is more complex change. > > > > On the trace API itself it should be ok. > > The problem is with the tracepoint variables themselves, and I don't > > think we should mark them stable. > > > > We cleaned tracepoint variables from ethdev map file, why they exist for > 'eal'? > > I can see .map file has bunch of "__rte_eal_trace_generic_*", I think > they exists to support 'rte_eal_trace_generic_*()' APIs which can be > called from other libraries. > > Do we really need them? > Why not whoever calls them directly call 'rte_trace_point_emit_*' instead? > As these rte_eal_trace_generic_*()' not used at all, I assume this is > what done already. > > @Jerin, > what do think to remove 'rte_eal_trace_generic_*()' APIs, so trace > always keeps local to library, and don't bloat the eal .map file? The purpose of exposing rte_eal_trace_generic_* is that, applications can add generic trace points in the application. > >
On 9/6/2024 2:11 PM, Jerin Jacob wrote: > On Fri, Sep 6, 2024 at 3:04 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote: >> >> On 9/5/2024 8:58 AM, David Marchand wrote: >>> On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger >>> <stephen@networkplumber.org> wrote: >>>> >>>> The API's in ethtool from before 23.11 should be marked stable. >>> >>> EAL* ? >>> >>>> Should probably include the trace api's but that is more complex change. >>> >>> On the trace API itself it should be ok. >>> The problem is with the tracepoint variables themselves, and I don't >>> think we should mark them stable. >>> >> >> We cleaned tracepoint variables from ethdev map file, why they exist for >> 'eal'? >> >> I can see .map file has bunch of "__rte_eal_trace_generic_*", I think >> they exists to support 'rte_eal_trace_generic_*()' APIs which can be >> called from other libraries. >> >> Do we really need them? >> Why not whoever calls them directly call 'rte_trace_point_emit_*' instead? >> As these rte_eal_trace_generic_*()' not used at all, I assume this is >> what done already. >> >> @Jerin, >> what do think to remove 'rte_eal_trace_generic_*()' APIs, so trace >> always keeps local to library, and don't bloat the eal .map file? > > The purpose of exposing rte_eal_trace_generic_* is that, applications > can add generic trace points > in the application. > Can't applications use 'rte_trace_point_emit_*()' directly, as libraries does?
On 9/6/2024 11:04 AM, Morten Brørup wrote: >> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] >> Sent: Friday, 6 September 2024 10.54 >> >> On 9/5/2024 3:01 PM, Jerin Jacob wrote: >>> On Thu, Sep 5, 2024 at 3:14 PM Morten Brørup <mb@smartsharesystems.com> >> wrote: >>>> >>>>> From: David Marchand [mailto:david.marchand@redhat.com] >>>>> Sent: Thursday, 5 September 2024 11.03 >>>>> >>>>> On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> >>>>> wrote: >>>>>> >>>>>>> From: David Marchand [mailto:david.marchand@redhat.com] >>>>>>> Sent: Thursday, 5 September 2024 09.59 >>>>>>> >>>>>>> On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger >>>>>>> <stephen@networkplumber.org> wrote: >>>>>>>> >>>>>>>> The API's in ethtool from before 23.11 should be marked stable. >>>>>>> >>>>>>> EAL* ? >>>>>>> >>>>>>>> Should probably include the trace api's but that is more complex >> change. >>>>>>> >>>>>>> On the trace API itself it should be ok. >>>>>> >>>>>> No! >>>>> >>>>> *sigh* >>>>> >>>>>> >>>>>> Trace must remain experimental until controlled by a meson option, e.g. >>>>> "enable_trace", whereby trace can be completely disabled and omitted from >> the >>>>> compiled application/libraries/drivers at build time. >>>>> >>>>> This seems unrelated to marking the API stable as regardless of the >>>>> API state at the moment, this code is always present. >>>> >>>> I cannot foresee if disabling trace at build time will require changes to >> the trace API. So I'm being cautious here. >>>> >>>> However, if Jerin (as author of the trace subsystem) foresees that it will >> be possible to disable trace at build time without affecting the trace API, I >> don't object to marking the trace API (or some of it) stable. >>> >>> I don't for foresee any ABI changes when adding disabling trace >>> compile time support. However, I don't understand why we need to do >>> that. In the sense, fast path functions are already having an option >>> to compile out. >>> Slow path functions can be disabled at runtime at the cost of 1 cycle >>> as instrumentation cost. Having said that, I don't have any concern >>> about disabling trace as an option. >>> >> >> I agree with Jerin, I don't see motivation to disable slow path traces >> when they can be disabled in runtime. >> And fast path traces already have compile flag to disable them. >> >> Build time configurations in long term has problems too, so I am for not >> using them unless we don't have to. > > For some use cases, trace is dead code, and should be omitted. > You don't want dead code in production systems. > > Please remember that DPDK is also being used in highly optimized embedded systems, hardware appliances and other systems where memory is not abundant. > > DPDK is not only for cloud and distros. ;-) > > The CI only tests DPDK with a build time configuration expected to be usable for distros. > I'm not asking to change that. > I'm only asking for more build time configurability to support other use cases. > I see, but that build time configuration argument exists in multiple aspects. And with meson switch we lean to dynamic configuration approach. When a build time config introduced, again and again we are having cases that specific code enabled with compile time macro broken and nobody noticed. Having code enabled always and configured in runtime produces more robust deliverable. We are aware that DPDK is used in embedded device, but they are not mostly very resource restricted devices, is it really matter to have a few megabytes (I didn't check but I expect this the max binary size can increase with tracing code) larger DPDK binary, does it really makes any difference?
> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] > Sent: Friday, 6 September 2024 16.12 > > On 9/6/2024 11:04 AM, Morten Brørup wrote: > >> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] > >> Sent: Friday, 6 September 2024 10.54 > >> > >> On 9/5/2024 3:01 PM, Jerin Jacob wrote: > >>> On Thu, Sep 5, 2024 at 3:14 PM Morten Brørup <mb@smartsharesystems.com> > >> wrote: > >>>> > >>>>> From: David Marchand [mailto:david.marchand@redhat.com] > >>>>> Sent: Thursday, 5 September 2024 11.03 > >>>>> > >>>>> On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> > >>>>> wrote: > >>>>>> > >>>>>>> From: David Marchand [mailto:david.marchand@redhat.com] > >>>>>>> Sent: Thursday, 5 September 2024 09.59 > >>>>>>> > >>>>>>> On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > >>>>>>> <stephen@networkplumber.org> wrote: > >>>>>>>> > >>>>>>>> The API's in ethtool from before 23.11 should be marked stable. > >>>>>>> > >>>>>>> EAL* ? > >>>>>>> > >>>>>>>> Should probably include the trace api's but that is more complex > >> change. > >>>>>>> > >>>>>>> On the trace API itself it should be ok. > >>>>>> > >>>>>> No! > >>>>> > >>>>> *sigh* > >>>>> > >>>>>> > >>>>>> Trace must remain experimental until controlled by a meson option, e.g. > >>>>> "enable_trace", whereby trace can be completely disabled and omitted > from > >> the > >>>>> compiled application/libraries/drivers at build time. > >>>>> > >>>>> This seems unrelated to marking the API stable as regardless of the > >>>>> API state at the moment, this code is always present. > >>>> > >>>> I cannot foresee if disabling trace at build time will require changes to > >> the trace API. So I'm being cautious here. > >>>> > >>>> However, if Jerin (as author of the trace subsystem) foresees that it > will > >> be possible to disable trace at build time without affecting the trace API, > I > >> don't object to marking the trace API (or some of it) stable. > >>> > >>> I don't for foresee any ABI changes when adding disabling trace > >>> compile time support. However, I don't understand why we need to do > >>> that. In the sense, fast path functions are already having an option > >>> to compile out. > >>> Slow path functions can be disabled at runtime at the cost of 1 cycle > >>> as instrumentation cost. Having said that, I don't have any concern > >>> about disabling trace as an option. > >>> > >> > >> I agree with Jerin, I don't see motivation to disable slow path traces > >> when they can be disabled in runtime. > >> And fast path traces already have compile flag to disable them. > >> > >> Build time configurations in long term has problems too, so I am for not > >> using them unless we don't have to. > > > > For some use cases, trace is dead code, and should be omitted. > > You don't want dead code in production systems. > > > > Please remember that DPDK is also being used in highly optimized embedded > systems, hardware appliances and other systems where memory is not abundant. > > > > DPDK is not only for cloud and distros. ;-) > > > > The CI only tests DPDK with a build time configuration expected to be usable > for distros. > > I'm not asking to change that. > > I'm only asking for more build time configurability to support other use > cases. > > > > I see, but that build time configuration argument exists in multiple > aspects. And with meson switch we lean to dynamic configuration approach. It can be rte_config.h instead of Meson option. Either is perfectly fine with me. > > When a build time config introduced, again and again we are having cases > that specific code enabled with compile time macro broken and nobody > noticed. I acknowledge this risk. Trace doesn't interact with anything, so I consider the risk extremely low in this case. > Having code enabled always and configured in runtime produces more > robust deliverable. The same can be said about the Linux kernel, but yet it is configurable. > > We are aware that DPDK is used in embedded device, but they are not > mostly very resource restricted devices, is it really matter to have a > few megabytes (I didn't check but I expect this the max binary size can > increase with tracing code) larger DPDK binary, does it really makes any > difference? Code size also affects system boot time, because those superfluous megabytes take time to decompress when booting from FLASH memory. For reference, the size of our system image (including Linux kernel, OpenSSL, the DPDK application, webserver, GUI, CLI, SNMP and everything) is 12 MB compressed. From a security aspect, trace also increases the attack surface and can potentially assist a hacker trying to break into a system.
On Thu, 5 Sep 2024 16:18:13 +0200 Morten Brørup <mb@smartsharesystems.com> wrote: > > From: Jerin Jacob [mailto:jerinjacobk@gmail.com] > > Sent: Thursday, 5 September 2024 16.02 > > > > On Thu, Sep 5, 2024 at 3:14 PM Morten Brørup <mb@smartsharesystems.com> wrote: > > > > > > > From: David Marchand [mailto:david.marchand@redhat.com] > > > > Sent: Thursday, 5 September 2024 11.03 > > > > > > > > On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> > > > > wrote: > > > > > > > > > > > From: David Marchand [mailto:david.marchand@redhat.com] > > > > > > Sent: Thursday, 5 September 2024 09.59 > > > > > > > > > > > > On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > > > > > > <stephen@networkplumber.org> wrote: > > > > > > > > > > > > > > The API's in ethtool from before 23.11 should be marked stable. > > > > > > > > > > > > EAL* ? > > > > > > > > > > > > > Should probably include the trace api's but that is more complex > > change. > > > > > > > > > > > > On the trace API itself it should be ok. > > > > > > > > > > No! > > > > > > > > *sigh* > > > > > > > > > > > > > > Trace must remain experimental until controlled by a meson option, e.g. > > > > "enable_trace", whereby trace can be completely disabled and omitted from > > the > > > > compiled application/libraries/drivers at build time. > > > > > > > > This seems unrelated to marking the API stable as regardless of the > > > > API state at the moment, this code is always present. > > > > > > I cannot foresee if disabling trace at build time will require changes to > > the trace API. So I'm being cautious here. > > > > > > However, if Jerin (as author of the trace subsystem) foresees that it will > > be possible to disable trace at build time without affecting the trace API, I > > don't object to marking the trace API (or some of it) stable. > > > > I don't for foresee any ABI changes when adding disabling trace > > compile time support. > > Based on Jerin's feedback, I'm retracting my objection. > > > However, I don't understand why we need to do > > that. > > To reduce code size. > Relevant for embedded/memory-constrained systems. > > > In the sense, fast path functions are already having an option > > to compile out. > > Slow path functions can be disabled at runtime at the cost of 1 cycle > > as instrumentation cost. Having said that, I don't have any concern > > about disabling trace as an option. > > Great. > > > > > > > > > > > Before doing that, rte_trace_mode_get/set() and the accompanying enum > > rte_trace_mode should be changed to rte_trace_config_get/set() using a new > > struct rte_trace_config (containing the enum rte_trace_mode, and expandable > > with new fields as the need arises). This will prepare for e.g. tracing to > > other destinations than system memory, such as a remote trace collector on the > > network, like SYSLOG. > > I'm also retracting this precondition... > > If the need for further trace configuration should ever arise, rte_trace_config_get/set() can be added later. > And rte_trace_mode_get/set(), if not marked as experimental anymore, will be kept for backwards compatibility. > > > > > > > > Patches welcome if you want it stripped. > > > > > > Don't have time myself, so I suggested it as a code challenge instead. :-) > > > My feeling is that the the experimental flag is not intended as permanent "get out of ABI compatiablity"
On Fri, Sep 6, 2024 at 7:33 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote: > > On 9/6/2024 2:11 PM, Jerin Jacob wrote: > > On Fri, Sep 6, 2024 at 3:04 PM Ferruh Yigit <ferruh.yigit@amd.com> wrote: > >> > >> On 9/5/2024 8:58 AM, David Marchand wrote: > >>> On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > >>> <stephen@networkplumber.org> wrote: > >>>> > >>>> The API's in ethtool from before 23.11 should be marked stable. > >>> > >>> EAL* ? > >>> > >>>> Should probably include the trace api's but that is more complex change. > >>> > >>> On the trace API itself it should be ok. > >>> The problem is with the tracepoint variables themselves, and I don't > >>> think we should mark them stable. > >>> > >> > >> We cleaned tracepoint variables from ethdev map file, why they exist for > >> 'eal'? > >> > >> I can see .map file has bunch of "__rte_eal_trace_generic_*", I think > >> they exists to support 'rte_eal_trace_generic_*()' APIs which can be > >> called from other libraries. > >> > >> Do we really need them? > >> Why not whoever calls them directly call 'rte_trace_point_emit_*' instead? > >> As these rte_eal_trace_generic_*()' not used at all, I assume this is > >> what done already. > >> > >> @Jerin, > >> what do think to remove 'rte_eal_trace_generic_*()' APIs, so trace > >> always keeps local to library, and don't bloat the eal .map file? > > > > The purpose of exposing rte_eal_trace_generic_* is that, applications > > can add generic trace points > > in the application. > > > > Can't applications use 'rte_trace_point_emit_*()' directly, as libraries > does? It is two different usages. 'rte_eal_trace_generic_ case is more like, application wants to simply emit int via generic trace API but not add any _new_ trace point.
On Fri, Sep 6, 2024 at 8:12 PM Morten Brørup <mb@smartsharesystems.com> wrote: > > > From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] > > Sent: Friday, 6 September 2024 16.12 > > > > On 9/6/2024 11:04 AM, Morten Brørup wrote: > > >> From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] > > >> Sent: Friday, 6 September 2024 10.54 > > >> > > >> On 9/5/2024 3:01 PM, Jerin Jacob wrote: > > >>> On Thu, Sep 5, 2024 at 3:14 PM Morten Brørup <mb@smartsharesystems.com> > > >> wrote: > > >>>> > > >>>>> From: David Marchand [mailto:david.marchand@redhat.com] > > >>>>> Sent: Thursday, 5 September 2024 11.03 > > >>>>> > > >>>>> On Thu, Sep 5, 2024 at 10:55 AM Morten Brørup <mb@smartsharesystems.com> > > >>>>> wrote: > > >>>>>> > > >>>>>>> From: David Marchand [mailto:david.marchand@redhat.com] > > >>>>>>> Sent: Thursday, 5 September 2024 09.59 > > >>>>>>> > > >>>>>>> On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger > > >>>>>>> <stephen@networkplumber.org> wrote: > > >>>>>>>> > > >>>>>>>> The API's in ethtool from before 23.11 should be marked stable. > > >>>>>>> > > >>>>>>> EAL* ? > > >>>>>>> > > >>>>>>>> Should probably include the trace api's but that is more complex > > >> change. > > >>>>>>> > > >>>>>>> On the trace API itself it should be ok. > > >>>>>> > > >>>>>> No! > > >>>>> > > >>>>> *sigh* > > >>>>> > > >>>>>> > > >>>>>> Trace must remain experimental until controlled by a meson option, e.g. > > >>>>> "enable_trace", whereby trace can be completely disabled and omitted > > from > > >> the > > >>>>> compiled application/libraries/drivers at build time. > > >>>>> > > >>>>> This seems unrelated to marking the API stable as regardless of the > > >>>>> API state at the moment, this code is always present. > > >>>> > > >>>> I cannot foresee if disabling trace at build time will require changes to > > >> the trace API. So I'm being cautious here. > > >>>> > > >>>> However, if Jerin (as author of the trace subsystem) foresees that it > > will > > >> be possible to disable trace at build time without affecting the trace API, > > I > > >> don't object to marking the trace API (or some of it) stable. > > >>> > > >>> I don't for foresee any ABI changes when adding disabling trace > > >>> compile time support. However, I don't understand why we need to do > > >>> that. In the sense, fast path functions are already having an option > > >>> to compile out. > > >>> Slow path functions can be disabled at runtime at the cost of 1 cycle > > >>> as instrumentation cost. Having said that, I don't have any concern > > >>> about disabling trace as an option. > > >>> > > >> > > >> I agree with Jerin, I don't see motivation to disable slow path traces > > >> when they can be disabled in runtime. > > >> And fast path traces already have compile flag to disable them. > > >> > > >> Build time configurations in long term has problems too, so I am for not > > >> using them unless we don't have to. > > > > > > For some use cases, trace is dead code, and should be omitted. > > > You don't want dead code in production systems. > > > > > > Please remember that DPDK is also being used in highly optimized embedded > > systems, hardware appliances and other systems where memory is not abundant. > > > > > > DPDK is not only for cloud and distros. ;-) > > > > > > The CI only tests DPDK with a build time configuration expected to be usable > > for distros. > > > I'm not asking to change that. > > > I'm only asking for more build time configurability to support other use > > cases. > > > > > > > I see, but that build time configuration argument exists in multiple > > aspects. And with meson switch we lean to dynamic configuration approach. > > It can be rte_config.h instead of Meson option. Either is perfectly fine with me. > > > > > When a build time config introduced, again and again we are having cases > > that specific code enabled with compile time macro broken and nobody > > noticed. > > I acknowledge this risk. if we use if (0) { } scheme instead of #ifdef scheme. The compiler will check this leg even it is not active. > > Trace doesn't interact with anything, so I consider the risk extremely low in this case. > > > Having code enabled always and configured in runtime produces more > > robust deliverable. > > The same can be said about the Linux kernel, but yet it is configurable. > > > > > We are aware that DPDK is used in embedded device, but they are not > > mostly very resource restricted devices, is it really matter to have a > > few megabytes (I didn't check but I expect this the max binary size can > > increase with tracing code) larger DPDK binary, does it really makes any > > difference? > > Code size also affects system boot time, because those superfluous megabytes take time to decompress when booting from FLASH memory. > For reference, the size of our system image (including Linux kernel, OpenSSL, the DPDK application, webserver, GUI, CLI, SNMP and everything) is 12 MB compressed. > > From a security aspect, trace also increases the attack surface and can potentially assist a hacker trying to break into a system. >
On Wed, Sep 4, 2024 at 8:10 PM Stephen Hemminger <stephen@networkplumber.org> wrote: > > The API's in ethtool from before 23.11 should be marked stable. > Should probably include the trace api's but that is more complex change. > > Stephen Hemminger (3): > eal: make rte_cpu_get_intrinsics_support stable > eal: mark rte_lcore_register_usage_cb stable > eal: mark rte_memzone_max_get/set stable > > lib/eal/include/generic/rte_cpuflags.h | 4 ---- > lib/eal/include/rte_lcore.h | 4 ---- > lib/eal/include/rte_memzone.h | 8 -------- > lib/eal/version.map | 10 ++++------ > 4 files changed, 4 insertions(+), 22 deletions(-) Series applied, thanks Stephen.