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 3EAF8A00C4; Wed, 12 Oct 2022 14:31:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 49DFB43074; Wed, 12 Oct 2022 14:31:44 +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 D5E6843070 for ; Wed, 12 Oct 2022 14:31:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665577901; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EX6bedBJRMIFWwVTXxurdlnS3wy6PWSviCKn1ubkE7Y=; b=E+JGMP03pN3QpySBWG/zbZ2q6K7awJ7Cb9AbahQl0xGwClipjhEmqsSRcBdLvQyL02doPY 1g7uxslRwRgBwEwPSeH4Mls+61YQ4rhvwwqZR5NYbsIdKcdMH97aVNfS9yNPYBlU1mbUwK zU5ziuM1yHF/1YNPHPikWkUkDmrhS7s= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-614-ROx5gBNKPN63wH6tJm36gg-1; Wed, 12 Oct 2022 08:31:35 -0400 X-MC-Unique: ROx5gBNKPN63wH6tJm36gg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4FB02382ECE0; Wed, 12 Oct 2022 12:31:34 +0000 (UTC) Received: from localhost.localdomain (ovpn-193-115.brq.redhat.com [10.40.193.115]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BB98C8E40E; Wed, 12 Oct 2022 12:31:33 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: jerinj@marvell.com, skori@marvell.com, stable@dpdk.org Subject: [PATCH v3 2/9] trace: fix mode change Date: Wed, 12 Oct 2022 14:31:05 +0200 Message-Id: <20221012123112.2951802-3-david.marchand@redhat.com> In-Reply-To: <20221012123112.2951802-1-david.marchand@redhat.com> References: <20220921120359.2201131-1-david.marchand@redhat.com> <20221012123112.2951802-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true 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 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 Acked-by: Sunil Kumar Kori --- app/test/test_trace.c | 3 --- lib/eal/common/eal_common_trace.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/app/test/test_trace.c b/app/test/test_trace.c index 76af79162b..44ac38a4fa 100644 --- a/app/test/test_trace.c +++ b/app/test/test_trace.c @@ -126,9 +126,6 @@ test_trace_mode(void) current = rte_trace_mode_get(); - if (!rte_trace_is_enabled()) - return TEST_SKIPPED; - rte_trace_mode_set(RTE_TRACE_MODE_DISCARD); if (rte_trace_mode_get() != RTE_TRACE_MODE_DISCARD) goto failed; 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; - STAILQ_FOREACH(tp, &tp_list, next) trace_mode_set(tp->handle, mode); -- 2.37.3