From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id A2D4C9A8A for ; Tue, 16 Feb 2016 11:17:32 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 16 Feb 2016 02:17:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,454,1449561600"; d="scan'208";a="885895852" Received: from rhorton-mobl.ger.corp.intel.com (HELO [163.33.229.34]) ([163.33.229.34]) by orsmga001.jf.intel.com with ESMTP; 16 Feb 2016 02:16:36 -0800 Message-ID: <56C2F703.2020801@intel.com> Date: Tue, 16 Feb 2016 10:16:35 +0000 From: Remy Horton Organization: Intel Shannon Limited User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Thomas Monjalon , pablo.de.lara.guarch@intel.com, declan.doherty@intel.com References: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> <1455606865-22680-1-git-send-email-thomas.monjalon@6wind.com> <1455606865-22680-2-git-send-email-thomas.monjalon@6wind.com> In-Reply-To: <1455606865-22680-2-git-send-email-thomas.monjalon@6wind.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 1/3] eal: fix keep alive header for C++ X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Feb 2016 10:17:33 -0000 Suspect this will introduce an extra indirection and call/return into the generated code, but can't think of any alternative that doesn't potentially break source compatibility.. On 16/02/2016 07:14, Thomas Monjalon wrote: > When built in a C++ application, the keepalive include fails: > > rte_keepalive.h:142:41: error: ‘ALIVE’ was not declared in this scope > keepcfg->state_flags[rte_lcore_id()] = ALIVE; > ^ > C++ requires to use a scope operator to access an enum inside a struct. > There was also a namespace issue for the values (no RTE prefix). > The solution is to move the struct and related code out of the header file. > > Fixes: 75583b0d1efd ("eal: add keep alive monitoring") > > Signed-off-by: Thomas Monjalon Acked-by: Remy Horton