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 B1AD8A0352; Mon, 7 Feb 2022 10:42:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9FFF7410F7; Mon, 7 Feb 2022 10:42:06 +0100 (CET) Received: from mail-il1-f182.google.com (mail-il1-f182.google.com [209.85.166.182]) by mails.dpdk.org (Postfix) with ESMTP id C564F410F7 for ; Mon, 7 Feb 2022 10:42:05 +0100 (CET) Received: by mail-il1-f182.google.com with SMTP id 15so10519850ilg.8 for ; Mon, 07 Feb 2022 01:42:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mvqN6E5XEfR+OCbE9Y3SA50Q7B2VacrQHXjh0v/gFYs=; b=FoYvbAFDmG0+cUk6oqIB9AqdjkeRmTRYmdYk50lJaCKjd28qrJID1W2PPy0DqaCodr lvFYc/oaymaNnkD17rfj28PgHqbjbK6g+l/tcE5lCuuDlVYkNqmnjIa063JC0Q86Ubin CTEJga5XWXZrrV8/Flu1c3wVBz7Hoa3ABTh5ygjoA7YQyKkqMijoiVPltIcvXVahr8yu d7wRGEb6AoTRX28uIQeGdCsEagSzfAuufbyUeeR15LPfw6KT/SXx9Jk6FeKCYg5SCAw7 TDKJKUD7naeeaj22SScPr+HrCrAacZU1mPTzYmH39ybPwFv+86Urlad6/UIuODuGjYTX fdcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mvqN6E5XEfR+OCbE9Y3SA50Q7B2VacrQHXjh0v/gFYs=; b=AmUwaPYYSBGEYmU2Nf8ZoFyWswo5iWX/HSV4Z86e6X+4msYychEuI3Pq0KCfYpX1Ku 27dx/OZlHsEKmSO1IXhT2en9po+k72SaHx2PyZwCuShm31SDK62FhvjFa5JC506/z4tD sB7eH6IAT1IZRyrq/45lTHJ8lq1SSPEngQ7SZrMCD+YPkFcocEIVgknM6aAL+uZN8MyJ /MnKBZbMDWBdqvLLZoA6bbI9icOvs3vRymzm0/wpKsdHDgXe6uuu2VYZORV5tGC0d/rV gEsgA/5zUAfdzvWVG8utvpReJZDBeLGGR3Ipu0CMUJMkqEsgAjTGfCtl0GCRg1SW5Shd Hz9w== X-Gm-Message-State: AOAM530tKyj+njVxiO/jx8Qq4M06UldBTLyy+j7bWPGGM9lG2AocwScI 8Iw6j6NFZEM+Ztd8DN0wZo5FgMzL8mzyvvmvzxQ= X-Google-Smtp-Source: ABdhPJybGQW75GWgDPYkjcxVv3ZifPysX484mszx37g5xnBJJRNIPBQbdtXC2eE6s6qOzYhf0HVNWOYipU37vwYfwGI= X-Received: by 2002:a05:6e02:18c9:: with SMTP id s9mr5844113ilu.294.1644226925032; Mon, 07 Feb 2022 01:42:05 -0800 (PST) MIME-Version: 1.0 References: <20220204174209.440207-1-bruce.richardson@intel.com> <20220204174209.440207-4-bruce.richardson@intel.com> <20220204101239.0417f105@hermes.local> In-Reply-To: <20220204101239.0417f105@hermes.local> From: Jerin Jacob Date: Mon, 7 Feb 2022 15:11:39 +0530 Message-ID: Subject: Re: [PATCH 3/7] graph: add explicit cast to allow C++ build To: Stephen Hemminger Cc: Bruce Richardson , dpdk-dev , Jerin Jacob , Kiran Kumar K , Nithin Dabilpuram Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Feb 4, 2022 at 11:42 PM Stephen Hemminger wrote: > > On Fri, 4 Feb 2022 17:42:05 +0000 > Bruce Richardson 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 > > --- > > 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. rte_graph_walk() is a fastpath function.Slowpath and fasthpath functions are separated by rte_graph.h and rte_graph_worker.h Acked-by: Jerin Jacob