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 95523A04CC; Mon, 10 Aug 2020 22:36:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7E503F94; Mon, 10 Aug 2020 22:36:37 +0200 (CEST) Received: from mail-lf1-f46.google.com (mail-lf1-f46.google.com [209.85.167.46]) by dpdk.org (Postfix) with ESMTP id 69D9BF90 for ; Mon, 10 Aug 2020 22:36:35 +0200 (CEST) Received: by mail-lf1-f46.google.com with SMTP id i80so5430268lfi.13 for ; Mon, 10 Aug 2020 13:36:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=4NVJ9TlV+DsoaAjDIiBGBjaNXLV4TS90gWh1xCP0bj4=; b=pwGQ/6Or7RbH8/v1uWKHIaOexok4dzsXvAMh+eB8czP4xxIF1BrRqMKd54DhncMTM+ ezlOXbjO9YiItIw1HNMjjmD0BeRun1Q/IMFuzSKk/DT+LRNbHPJ9ur3HYzO9GgEGaMk1 9Ur6TUO2YhivrOoRl3DCBjRKYZsvHq9sZVi56OidvBjll5YEUkoORTZkeS2EULJ/147B /9OHElcHFFuuUuM1Eh2KoJJWoGn93qZf3reNdXQzkHcJ3X/fryud0eKi2U1FQEPbGbqk ULX/zG/fUfpvynIjQThqen00BPC0Q83JTI0MAaVO8PqXe74J6IOtM4TYM8snGM3CGO5x k3FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=4NVJ9TlV+DsoaAjDIiBGBjaNXLV4TS90gWh1xCP0bj4=; b=UERPNPDPiheN+QbHAGWHNOBp/AldvFUuvzF67kZ0YQKyHRseOX/L8Q25qr+suQgFa5 Jd+mWL+QaZ1HotfNnSVU1gbu7w7Pthc7IGhQqMHoYC0fBUu5EnXOh6L2lBmNY3Fu4uhi 9xKK19tGjeHyj8y0n3pT65wMRgZZGc5F8YCMRPY47qaNWfIVnA88xxaqYl1+AkZU76e5 5q29LMrCaZFSah0cILkpVEQXS2xLpUpi+DCZ40vGrJeqw08OgCtvSu8Mjk4/IrbHj4K8 /nFCVuhrIapxGAwxTc0oiyfVHcrkeyzCnEsJENpKuTjxB6m1thC4s81TKgTCZqfqgRYd ixZg== X-Gm-Message-State: AOAM530rnUtePa6pkMaq2YGpun20hCmAEh2+/FUbMtfbfrtaEfPe6Gz9 EhTSkQFEBs6bJffI3Rz07qua5RGnAFApkifp X-Google-Smtp-Source: ABdhPJwcwgl3e24hXL5XL48tYCmdbODpxS4+y1yuW375CEwsGzYWQKvSXJGEKFRo9Kq/FnqXXNmB0w== X-Received: by 2002:a19:814c:: with SMTP id c73mr1394445lfd.16.1597091794827; Mon, 10 Aug 2020 13:36:34 -0700 (PDT) Received: from machina.creanord.lan ([194.100.60.111]) by smtp.gmail.com with ESMTPSA id b15sm3396559lji.140.2020.08.10.13.36.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 10 Aug 2020 13:36:34 -0700 (PDT) From: Pawel Wodkowski To: dev@dpdk.org Cc: Pawel Wodkowski , david.marchand@redhat.com, Jerin Jacob , Sunil Kumar Kori Date: Mon, 10 Aug 2020 22:36:10 +0200 Message-Id: <20200810203610.29470-1-pawelwod@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200804175138.18543-1-pawelwod@gmail.com> References: <20200804175138.18543-1-pawelwod@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v2] tracepoint: fix compilation with C++ 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" trace_mem is declared as 'void *' which triggers following error: '...invalid conversion from ‘void*’ to ‘__rte_trace_header*’ [-fpermissive]...' Fix this by adding proper typecast to 'struct __rte_trace_header *'. Signed-off-by: Pawel Wodkowski Fixes: ebaee6409702 ("trace: simplify trace point headers") Cc: david.marchand@redhat.com --- lib/librte_eal/include/rte_trace_point.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/include/rte_trace_point.h b/lib/librte_eal/include/rte_trace_point.h index b45171275..875de195a 100644 --- a/lib/librte_eal/include/rte_trace_point.h +++ b/lib/librte_eal/include/rte_trace_point.h @@ -300,13 +300,13 @@ RTE_DECLARE_PER_LCORE(void *, trace_mem); static __rte_always_inline void * __rte_trace_mem_get(uint64_t in) { - struct __rte_trace_header *trace = RTE_PER_LCORE(trace_mem); + struct __rte_trace_header *trace = (struct __rte_trace_header *)RTE_PER_LCORE(trace_mem); const uint16_t sz = in & __RTE_TRACE_FIELD_SIZE_MASK; /* Trace memory is not initialized for this thread */ if (unlikely(trace == NULL)) { __rte_trace_mem_per_thread_alloc(); - trace = RTE_PER_LCORE(trace_mem); + trace = (struct __rte_trace_header *) RTE_PER_LCORE(trace_mem); if (unlikely(trace == NULL)) return NULL; } -- 2.17.1