From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id EF389A0350;
	Fri,  4 Feb 2022 19:12:43 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id BEAA44013F;
	Fri,  4 Feb 2022 19:12:43 +0100 (CET)
Received: from mail-pl1-f176.google.com (mail-pl1-f176.google.com
 [209.85.214.176])
 by mails.dpdk.org (Postfix) with ESMTP id D451E40041
 for <dev@dpdk.org>; Fri,  4 Feb 2022 19:12:42 +0100 (CET)
Received: by mail-pl1-f176.google.com with SMTP id k17so5860893plk.0
 for <dev@dpdk.org>; Fri, 04 Feb 2022 10:12:42 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=Cu/AAQZlo3n3cGvaXO3Jw72WG+IgMeDhyNawuX1vs44=;
 b=RjzwjWplz+AmSbmDKNjWcxUazM9/NfIhhwYAPFOB8sB4fSiVVwVAVIHYea9HUL5aQk
 cmFOJ/F+p4SeuY42xNzGORc4j7JZpPOm60W6JEvAnpnkrLB1TXGzXke6WPePEdYHdRRg
 8ildgJg7NRq1MMHlvUXwaV/1qXfl0eXWVH1JjEapa+k5ztE9+HdoZikv6swrqQ+/BGDM
 GnCZ8z3edU861g6EH7FyNj8zlZZrQxy05FruzAHFqoU6mjPam5L4yHpkWXzC0ik0GDPT
 q0/baJjk6SHPv8gmUZYEPp1UUEkR8RC1WkTHgDxEDs57XbLZDFXg+TQ7EhJLWepeBYcC
 z7rw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=Cu/AAQZlo3n3cGvaXO3Jw72WG+IgMeDhyNawuX1vs44=;
 b=IRbHHI6u5whc/NKAraiGefzjABZRoSVHk3xBh+G5SjHgmeo2TGS1r9GthkIRxL5aiI
 ttL/WmrT4ANH36d/VLk/3WkaGRea1bBfDrRhs6ZwPMEIJA6dWckuEQsr453x04TDZDiS
 JmQlTUruPnGubK8IPijQ/fzdSDODMhxrZGixfCIvNanOZBARLxGDvSanU7T8tsMjaqh7
 b25YfMrrugy1DBB0VQParR+FL7H2frOLcLgqky5IjFjE4o1DHZf4WjBfKRGuMKy1ATgT
 8O83Hdieh5QIIYO9UWaMCOzDy7ZTw4RYFNoXq0CrGwDdm0kSoN25E3lhl5jPmm2edgvU
 eoSg==
X-Gm-Message-State: AOAM531M3sb3dHnhKwCguomWWemCOlHcF42nQ860ljAwjzLOkv5I6eYM
 FIOJnkENsZN0h3vmkvmqqyWNQQ==
X-Google-Smtp-Source: ABdhPJysBKui5yhq4OmyUcsRqbIi+ZdMX6IZda2zJOK9OOAJbRIKlOi+AvqF72WdmfOM+sbxek0QrA==
X-Received: by 2002:a17:903:2282:: with SMTP id
 b2mr4404646plh.91.1643998361956; 
 Fri, 04 Feb 2022 10:12:41 -0800 (PST)
Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199])
 by smtp.gmail.com with ESMTPSA id
 p4sm3173337pfw.133.2022.02.04.10.12.41
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 04 Feb 2022 10:12:41 -0800 (PST)
Date: Fri, 4 Feb 2022 10:12:39 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Bruce Richardson <bruce.richardson@intel.com>
Cc: dev@dpdk.org, Jerin Jacob <jerinj@marvell.com>, Kiran Kumar K
 <kirankumark@marvell.com>, Nithin Dabilpuram <ndabilpuram@marvell.com>
Subject: Re: [PATCH 3/7] graph: add explicit cast to allow C++ build
Message-ID: <20220204101239.0417f105@hermes.local>
In-Reply-To: <20220204174209.440207-4-bruce.richardson@intel.com>
References: <20220204174209.440207-1-bruce.richardson@intel.com>
 <20220204174209.440207-4-bruce.richardson@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Fri,  4 Feb 2022 17:42:05 +0000
Bruce Richardson <bruce.richardson@intel.com> wrote:

> C++ does not have automatic casting to/from void pointers, so need
> explicit cast if header is to be included in C++ code
> 
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
>  lib/graph/rte_graph_worker.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/graph/rte_graph_worker.h b/lib/graph/rte_graph_worker.h
> index eef77f732a..0c0b9c095a 100644
> --- a/lib/graph/rte_graph_worker.h
> +++ b/lib/graph/rte_graph_worker.h
> @@ -155,7 +155,7 @@ rte_graph_walk(struct rte_graph *graph)
>  	 *	+-----+ <= cir_start + mask
>  	 */
>  	while (likely(head != graph->tail)) {
> -		node = RTE_PTR_ADD(graph, cir_start[(int32_t)head++]);
> +		node = (struct rte_node *)RTE_PTR_ADD(graph, cir_start[(int32_t)head++]);
>  		RTE_ASSERT(node->fence == RTE_GRAPH_FENCE);
>  		objs = node->objs;
>  		rte_prefetch0(objs);

Having to do this raises the other question.
Why is this code inline? It should not be in critical path.