From patchwork Tue Jun 14 12:29:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 112723 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 093DBA0093; Tue, 14 Jun 2022 14:29:20 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EB05542802; Tue, 14 Jun 2022 14:29:19 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id C4C814069C for ; Tue, 14 Jun 2022 14:29:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655209758; x=1686745758; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TtFC1tHZZDNFRPKShA+GIeLVdkbHGJeHMwBq7lHI0Vk=; b=SQSlyY0GBltRzU9WW0eNSYs78KTBYMksznbX0oOr6Dogz51jg0RvNiio OZ9yBRI8KoZIbsOV9PoYq65DndDUfr61KyAOsdj22QNVlgWEtNOKf1Gp3 /QwOKov5As4l3ekpu0Wrx6FZySfVdPD+Byd4XO52/iZLfs45r/wQfjuZq c0OzXS3lrsY/Ahb921Q6ne2YiBHdsckCATudvorj4o0MDSl/IDlWBdm1r v2iFtQgfvstzzyw2rP56bBpK7quQpTG91uMRB5LmW1VfwNanoDym9Pv2/ Ou8SF0DQY6wDBpV3U03LKhFimH6m/vjbREGUMEcqYXErqgCG3c7LJQ+i2 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="258437303" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="258437303" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 05:29:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="617977180" Received: from silpixa00401385.ir.intel.com (HELO silpixa00401385.ger.corp.intel.com.) ([10.237.223.181]) by orsmga001.jf.intel.com with ESMTP; 14 Jun 2022 05:29:16 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 1/2] examples/l3fwd: add include for macro definition Date: Tue, 14 Jun 2022 13:29:03 +0100 Message-Id: <20220614122904.159946-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220614122904.159946-1-bruce.richardson@intel.com> References: <20220614122904.159946-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 The header files "l3fwd_em.h" and "l3fwd_em_sequential.h" use the "__rte_always_inline" macro but don't directly include "rte_common.h" to get the definition of it. This inclusion is not necessary for compilation, but the lack of it can confuse some indexers - such as those in eclipse, which reports the lines: "static __rte_always_inline uint16_t" as possible definitions of a variable called "uint16_t". This confusion leads to uint16_t being flagged as an unknown type in all other parts of the project being indexed, e.g. across all of DPDK code. Adding in the include of rte_common.h makes it clear to the indexer that those lines are part of a function definition, and that allows eclipse to correctly recognise uint16_t as a type from stdint.h Signed-off-by: Bruce Richardson --- examples/l3fwd/l3fwd_em.h | 2 ++ examples/l3fwd/l3fwd_em_sequential.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/examples/l3fwd/l3fwd_em.h b/examples/l3fwd/l3fwd_em.h index 11bd951858..fe2ee59f6a 100644 --- a/examples/l3fwd/l3fwd_em.h +++ b/examples/l3fwd/l3fwd_em.h @@ -5,6 +5,8 @@ #ifndef __L3FWD_EM_H__ #define __L3FWD_EM_H__ +#include + static __rte_always_inline uint16_t l3fwd_em_handle_ipv4(struct rte_mbuf *m, uint16_t portid, struct rte_ether_hdr *eth_hdr, struct lcore_conf *qconf) diff --git a/examples/l3fwd/l3fwd_em_sequential.h b/examples/l3fwd/l3fwd_em_sequential.h index f426c508ef..d2f75edb8a 100644 --- a/examples/l3fwd/l3fwd_em_sequential.h +++ b/examples/l3fwd/l3fwd_em_sequential.h @@ -5,6 +5,8 @@ #ifndef __L3FWD_EM_SEQUENTIAL_H__ #define __L3FWD_EM_SEQUENTIAL_H__ +#include + /** * @file * This is an optional implementation of packet classification in Exact-Match From patchwork Tue Jun 14 12:29:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 112724 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17918A0093; Tue, 14 Jun 2022 14:29:25 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CDBD94281C; Tue, 14 Jun 2022 14:29:22 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 55D2C4281B for ; Tue, 14 Jun 2022 14:29:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655209761; x=1686745761; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=FMsT7d33MoBI5O/V1TWgqDPqxwLQ0zy8NlczyA4SVNM=; b=XvQR4XO4s9nJbemrrdW34dGNTxCMvU2L6++PEVJbtk/24Ek4kKKxhrz6 8SW5i/rlFhuYiiiVsL7IN/2cSk9Kg5xKy6qKxPwpsGvP9iUCcc2Y4HfIr fy6RWf30VOd37yPwETYlh7l/C3axNbtMBJVOQ/zjTJqznTQy4MAM4Ri2n 7a4hq5Zcv+HJSGBl7DgdbdkKI4FRypEeGecBSTxYfNN0BeoHn1ic3l7Ub 0XyvfC9eRVK/gCVgB9eqbi1bVn5luIvO/waqmj3o1GP3qAwDqwWCrew9b jcUCkhOvUd4tUM+XcMgOdOmGiZi1P/KxJzBYj1uPhE0FtNNJotpJip7xH g==; X-IronPort-AV: E=McAfee;i="6400,9594,10377"; a="258437322" X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="258437322" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jun 2022 05:29:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,300,1647327600"; d="scan'208";a="617977191" Received: from silpixa00401385.ir.intel.com (HELO silpixa00401385.ger.corp.intel.com.) ([10.237.223.181]) by orsmga001.jf.intel.com with ESMTP; 14 Jun 2022 05:29:19 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao Subject: [PATCH 2/2] common/cnxk: add include for macro definition Date: Tue, 14 Jun 2022 13:29:04 +0100 Message-Id: <20220614122904.159946-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220614122904.159946-1-bruce.richardson@intel.com> References: <20220614122904.159946-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 The header file "roc_io.h" uses the "__plt_always_inline" macro but don't include "roc_platform.h" to get the definition of it. This inclusion is not necessary for compilation, but the lack of it can confuse some indexers - such as those in eclipse, which reports the lines: "static __plt_always_inline uint64_t" as possible definitions of a variable called "uint64_t". This confusion leads to uint64_t being flagged as an unknown type in all other parts of the project being indexed, e.g. across all of DPDK code. Adding in the include of rte_common.h makes it clear to the indexer that those lines are part of a function definition, and that allows eclipse to correctly recognise uint64_t as a type from stdint.h Signed-off-by: Bruce Richardson --- drivers/common/cnxk/roc_io.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/common/cnxk/roc_io.h b/drivers/common/cnxk/roc_io.h index 62e98d9d00..9d73e263f7 100644 --- a/drivers/common/cnxk/roc_io.h +++ b/drivers/common/cnxk/roc_io.h @@ -5,6 +5,8 @@ #ifndef _ROC_IO_H_ #define _ROC_IO_H_ +#include "roc_platform.h" /* for __plt_always_inline macro */ + #define ROC_LMT_BASE_ID_GET(lmt_addr, lmt_id) \ do { \ /* 32 Lines per core */ \