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 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 Content-Transfer-Encoding: 8bit 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 -- 2.34.1