From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0ADFAA0350; Mon, 29 Jun 2020 11:26:08 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E9A71BE0C; Mon, 29 Jun 2020 11:26:08 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 7EC671023 for ; Mon, 29 Jun 2020 11:26:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593422766; 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=Xq3Z3+6mALw3p5a9uDFiIFpt3UmiZZfRmUMMtw59ses=; b=dXeGeC3aGJnNfViswcaYvPKYeXoiGafkGecweYa5e2IcLOKSBSbb4WZCQXIOpDB6ZDAVNh acekjc+/jW20T8BHjTUU1qCjswCEUesr7H337a4ixrM3tWgIqG39wILGOCws/9t5bBVG+Z UnRjhvinc3E6o8gLX3aL6s+t2XmSDNQ= Received: from mail-vs1-f70.google.com (mail-vs1-f70.google.com [209.85.217.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-212-OaJ5cIESNhC54jeMK03ebQ-1; Mon, 29 Jun 2020 05:26:02 -0400 X-MC-Unique: OaJ5cIESNhC54jeMK03ebQ-1 Received: by mail-vs1-f70.google.com with SMTP id p124so885149vsp.4 for ; Mon, 29 Jun 2020 02:26:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Xq3Z3+6mALw3p5a9uDFiIFpt3UmiZZfRmUMMtw59ses=; b=q9cplaG2KyTcdumahyuAWZZlwgq8hNiIZOWlbRhzbYMmplUolSQAcy90MG3iY0i85y 6bLAC9S4i5rO21B27o4VzXTaEkqinZ/O1BdlCzC52PvoO4/G0t4dnZ8goXDiiT9Z2W+v xRio0fqCxQ4YFHRLzapBm9wjFv+jY7Wr0GXFXNzfegeEqPshn/hcpjCmca3shB9iNi9q E05gWAFngZ9tkuZugqofUCrdufGz7LY+hPXNMzI7ZCGKgOOziHOKptVE7Afea8tejuTk 7X7NRofRmxxnqVzN6svrW5yBqpj2gh9h/tuRJ10boYkO8b42HxxENkA1RnGXWUZZmSk1 uE6Q== X-Gm-Message-State: AOAM530pee6d5D/JAm5E95cJtLusumIvpE4EwqiD4Fuq7/mqoI/8gbbN zw6GJfGhtLONwZXcLy5r0jfMmRSRTT/SMlQBOX4DIRv8jDQ5H9xmf0uj2SeNcReiFHsCUHDd65k qsfRHKBWp3RjvxUb8k4c= X-Received: by 2002:ab0:e2:: with SMTP id 89mr9936606uaj.86.1593422761478; Mon, 29 Jun 2020 02:26:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxx3PYtwdTHZ9jTsHXNSo1Tpjoyds8l4OzYmRFFwiC5qK/LM+Nw3HWin9JiHiOqIex4/BoWAZw3Y+wchn4Ni/4= X-Received: by 2002:ab0:e2:: with SMTP id 89mr9936598uaj.86.1593422761268; Mon, 29 Jun 2020 02:26:01 -0700 (PDT) MIME-Version: 1.0 References: <20200610144506.30505-1-david.marchand@redhat.com> <20200626144736.11011-1-david.marchand@redhat.com> <20200626144736.11011-5-david.marchand@redhat.com> In-Reply-To: From: David Marchand Date: Mon, 29 Jun 2020 11:25:49 +0200 Message-ID: To: Sunil Kumar Kori Cc: "dev@dpdk.org" , "jerinjacobk@gmail.com" , "bruce.richardson@intel.com" , "mdr@ashroe.eu" , "thomas@monjalon.net" , "arybchenko@solarflare.com" , "ktraynor@redhat.com" , "ian.stokes@intel.com" , "i.maximets@ovn.org" , Jerin Jacob Kollanukkaran , Neil Horman , Harini Ramakrishnan , Omar Cardona , Pallavi Kadam , Ranjit Menon X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [EXT] [PATCH v4 4/9] eal: introduce thread uninit helper X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, Jun 29, 2020 at 10:59 AM Sunil Kumar Kori wrote: > >diff --git a/lib/librte_eal/common/eal_common_thread.c > >b/lib/librte_eal/common/eal_common_thread.c > >index afb30236c5..3b30cc99d9 100644 > >--- a/lib/librte_eal/common/eal_common_thread.c > >+++ b/lib/librte_eal/common/eal_common_thread.c > >@@ -20,6 +20,7 @@ > > #include "eal_internal_cfg.h" > > #include "eal_private.h" > > #include "eal_thread.h" > >+#include "eal_trace.h" > > > > RTE_DEFINE_PER_LCORE(unsigned int, _lcore_id) = LCORE_ID_ANY; > >RTE_DEFINE_PER_LCORE(int, _thread_id) = -1; @@ -161,6 +162,14 @@ > >rte_thread_init(unsigned int lcore_id, rte_cpuset_t *cpuset) > > __rte_trace_mem_per_thread_alloc(); > > } > > > >+void > >+rte_thread_uninit(void) > >+{ > > Need to check whether trace is enabled or not similar to trace_mem_free(). The internal trace api abstracts this. It should be in the trace code itself, in the same way it is done for allocating the trace buffer. But is an additional check needed? The check on the trace buffer being initialised in __rte_trace_mem_per_thread_free should be enough. -- David Marchand