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 C5915A0548; Wed, 15 Jun 2022 19:11:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CBCB142BA7; Wed, 15 Jun 2022 19:11:15 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id CB75642B92 for ; Wed, 15 Jun 2022 19:11:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655313073; x=1686849073; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TtFC1tHZZDNFRPKShA+GIeLVdkbHGJeHMwBq7lHI0Vk=; b=jF8tDCKtHByWrqpVyAuXYifSyYx2HaGLxi1KFSXY1hMwod9Jwbru76oP b12wqJ4krKgttPHSACLQN6Sslkz5xEtNPSTK4XlnI8FYXmQQ9TOiPWiV3 HRXy4lJj6ObNEbzjGDXOXsVs3xlBJW/ZB8NvsHjguYd0ZcZ5yPwubFlO8 jkbqo0yaudbbL1+1EaEGjZkCkxFcfPurxsdGJ+kDeKCgXai5cYk7GwUhI An4Z8v6S8auBpiYNnMcsNwjSUKY5afV44JqqNKweTLIWfNTQ9JdkBE7a1 lNij8oD+fDa3nW30SxVfPHo1MFDyC7Hi93fSZD5Dyp+XvtN9zYbUxkLSS Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10379"; a="276612810" X-IronPort-AV: E=Sophos;i="5.91,302,1647327600"; d="scan'208";a="276612810" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jun 2022 10:10:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,302,1647327600"; d="scan'208";a="713032195" Received: from silpixa00401385.ir.intel.com (HELO silpixa00401385.ger.corp.intel.com.) ([10.237.223.181]) by orsmga004.jf.intel.com with ESMTP; 15 Jun 2022 10:10:22 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 1/2] examples/l3fwd: add include for macro definition Date: Wed, 15 Jun 2022 18:10:12 +0100 Message-Id: <20220615171013.36426-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220615171013.36426-1-bruce.richardson@intel.com> References: <20220614122904.159946-1-bruce.richardson@intel.com> <20220615171013.36426-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