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 A0B7DA04C2; Wed, 12 Aug 2020 11:52:05 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 96CAD1C11A; Wed, 12 Aug 2020 11:52:04 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id 6B6AC1C10B for ; Wed, 12 Aug 2020 11:52:03 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 07C9jcoF022573; Wed, 12 Aug 2020 02:52:02 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=pfpt0220; bh=+iTID9tyPcmzW0BPsbra2Ma0JSTJWlkOrwVaQOychGk=; b=GRxGMELWklXAX1Owg53M7d7MCxWa1ctLCgvRZ1WRHeHbOysWufBjzN4ylBZduvQtpTjU H6kefHXPqg5Ow/kp7s2OdN/9vripUuQbMY8vszvNv5naBCdmdhSuGmiPSpp6LDmhrqzE J2MZBoHTSNIckE2O/3ZKDLCIrPK5I5V4bimHpwkVK0rvRJaubkwvDk3LCMn1LrkaNzkn lJnzIFL4Nt4GEZPNAKpWAwy8HFlby/s8mh/N/r+rGe+HGSDlkkHijy0eQaELisSRm61h Nos8GYJUiNrmcWCzT/wYhn3e9B7lWmbqP6/jI3WNR9+aeKAWkWPQq5Gy8zhpzeyQhiOx IQ== Received: from sc-exch02.marvell.com ([199.233.58.182]) by mx0b-0016f401.pphosted.com with ESMTP id 32tgpkv8fs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Wed, 12 Aug 2020 02:52:02 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by SC-EXCH02.marvell.com (10.93.176.82) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 12 Aug 2020 02:52:00 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Wed, 12 Aug 2020 02:52:00 -0700 Received: from localhost.localdomain (unknown [10.28.34.25]) by maili.marvell.com (Postfix) with ESMTP id E923F3F703F; Wed, 12 Aug 2020 02:51:58 -0700 (PDT) From: To: Jerin Jacob , Sunil Kumar Kori CC: , Pawel Wodkowski Date: Wed, 12 Aug 2020 15:21:50 +0530 Message-ID: <20200812095150.1486443-1-skori@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200810203610.29470-1-pawelwod@gmail.com> References: <20200810203610.29470-1-pawelwod@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-08-12_03:2020-08-11, 2020-08-12 signatures=0 Subject: [dpdk-dev] [PATCH v3] trace: 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" From: Pawel Wodkowski 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 *'. Fixes: ebaee6409702 ("trace: simplify trace point headers") Signed-off-by: Pawel Wodkowski --- v3: - fix subject. v2: - Update proper typecasting. lib/librte_eal/include/rte_trace_point.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/include/rte_trace_point.h b/lib/librte_eal/include/rte_trace_point.h index b03960277..6446f2f0f 100644 --- a/lib/librte_eal/include/rte_trace_point.h +++ b/lib/librte_eal/include/rte_trace_point.h @@ -298,13 +298,14 @@ 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.25.1