From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 56AE5A0545; Tue, 11 Oct 2022 16:20:47 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0358642DE1; Tue, 11 Oct 2022 16:20:47 +0200 (CEST) Received: from mail-qk1-f177.google.com (mail-qk1-f177.google.com [209.85.222.177]) by mails.dpdk.org (Postfix) with ESMTP id 8290142B7D; Tue, 11 Oct 2022 16:20:45 +0200 (CEST) Received: by mail-qk1-f177.google.com with SMTP id a18so5642711qko.0; Tue, 11 Oct 2022 07:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=ESLHu9BUW+9ccQRHHBben/eQrEmPtxFjXkG8HUCBBfQ=; b=BmXAS2OZfiNrJKVrLWurQ/JV8tYAj7RnqZV9fv89NmBd/eAOBKfJacprTuE1DSxMwj W3GwviL30ozPtbf4gvwKF/VW953fgmviQvGvsEghr6of5uMLHMGzTs6XgKDUPKj3y9vT ybRYb00WN596/BBSIHtnFCV1raVZtdYfJpZ/mxNIU2zgbtGgbwNnu6YeDpGhYsCz/1Hx d4Stwl+6NyC2gPZvsF8sJ0vVdXV2HuP1CPgKAcgs5P7jOajgHqtKSyBniK4gD0ydMefT +GS0YGPJyVGcw0TqsvvuNrBMsV5JLGSKZJ8zGSWQ2FBQ5hvxuydncqLhCAs+6albpZ0n 8dbA== 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=ESLHu9BUW+9ccQRHHBben/eQrEmPtxFjXkG8HUCBBfQ=; b=7eS3ZFS7eKUruKIzFQW0OIEKjMqm47iDFV/bowxsQzApS4soPYX9O2Iol4E1FDLiSe /649PJkg8ufjrFCkbtlGVgIDrm/L6bKtyZ7guMNcA8CImInOOjv2zduL1qJkwzRKhRkx 5BnbYss0T9Y0Kux4wbN65ac/yf/wyzHwDKqxpsmNbPZBB2+vDe15n352qlJA484VUjwH Yjy24MwpA1w+qFmyqRbGzak+EU1WTzJoOIzaVlnifDAhxghEEs+DCWrYEQA0TE23T6vI YyT6X037sC4er1/nSEiWaRmhAIHJvXDlzWZ0C48Q1L5fFwMuuklN41ZGfenRtJ20Uyl8 INgQ== X-Gm-Message-State: ACrzQf1XW+mEx0AFoOpBHewk1c7RFaFGAMwJlYnnqgDINZuASMkoVzh3 YvM2zLLtqxnWhb1LunDnwLafdEfHLv/9mwFwU0E= X-Google-Smtp-Source: AMsMyM6zv9RQhR3DWl1dtj9XY7op5zjzT2pw6V7LS17C4qdRWMRQmkGwOPB1mZwRruH79PJVtwPlFGdJmoVCPqm8xWI= X-Received: by 2002:a05:620a:1986:b0:6ec:fc63:1dce with SMTP id bm6-20020a05620a198600b006ecfc631dcemr7116554qkb.90.1665498044836; Tue, 11 Oct 2022 07:20:44 -0700 (PDT) MIME-Version: 1.0 References: <20220921120359.2201131-1-david.marchand@redhat.com> <20221004094418.196544-1-david.marchand@redhat.com> <20221004094418.196544-3-david.marchand@redhat.com> In-Reply-To: <20221004094418.196544-3-david.marchand@redhat.com> From: Jerin Jacob Date: Tue, 11 Oct 2022 19:50:19 +0530 Message-ID: Subject: Re: [PATCH v2 2/9] trace: fix mode change To: David Marchand Cc: dev@dpdk.org, skori@mavell.com, jerinj@marvell.com, stable@dpdk.org, Sunil Kumar Kori 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Tue, Oct 4, 2022 at 3:15 PM David Marchand wrote: > > The API does not state that changing mode should be refused if no trace > point is enabled. Remove this limitation. > > Fixes: 84c4fae4628f ("trace: implement operation APIs") > Cc: stable@dpdk.org > > Signed-off-by: David Marchand > --- > app/test/test_trace.c | 3 --- > lib/eal/common/eal_common_trace.c | 3 --- > 2 files changed, 6 deletions(-) > > diff --git a/lib/eal/common/eal_common_trace.c b/lib/eal/common/eal_common_trace.c > index d5dbc7d667..1b86f5d2d2 100644 > --- a/lib/eal/common/eal_common_trace.c > +++ b/lib/eal/common/eal_common_trace.c > @@ -127,9 +127,6 @@ rte_trace_mode_set(enum rte_trace_mode mode) > { > struct trace_point *tp; > > - if (!rte_trace_is_enabled()) > - return; Just added pre check to avoid going through this linked list as an optimization. Since it is in slowpath, your changes are OK. > - > STAILQ_FOREACH(tp, &tp_list, next) > trace_mode_set(tp->handle, mode); > > -- > 2.37.3 >