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 A1804A0540 for ; Wed, 21 Sep 2022 14:04:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8F9FF4281E; Wed, 21 Sep 2022 14:04:25 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 56A6E427FF for ; Wed, 21 Sep 2022 14:04:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663761863; 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=QPIgeAEAwURhrVwGe7e5/yxVR60R5iJ12jR363Dl88Q=; b=Ld6unSxb/lgacB6HSbC/Jiw+GA14TsFILsoTcbdIbV96DMTt4XRAChhFXMo3UPMi0kUX1M mSJg10G+VwwZ6arVNjpm7IHhDzmTqdiCH62ClLtiBqSqj2/VWdv17s1eJqrPsVddetR3Gl xiAqvYVd/CyLx+AHIxBMh2/2tbLyswI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-169-p8EDuT-lNSKSaD2AU5mWIQ-1; Wed, 21 Sep 2022 08:04:19 -0400 X-MC-Unique: p8EDuT-lNSKSaD2AU5mWIQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 37CB580280B; Wed, 21 Sep 2022 12:04:19 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.194.61]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4BDE62027062; Wed, 21 Sep 2022 12:04:18 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Jerin Jacob , Sunil Kumar Kori Subject: [PATCH 2/8] trace: fix mode change Date: Wed, 21 Sep 2022 14:03:53 +0200 Message-Id: <20220921120359.2201131-3-david.marchand@redhat.com> In-Reply-To: <20220921120359.2201131-1-david.marchand@redhat.com> References: <20220921120359.2201131-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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 --- 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 f3ae4f7922..1db28a441d 100644 --- a/lib/eal/common/eal_common_trace.c +++ b/lib/eal/common/eal_common_trace.c @@ -126,9 +126,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