From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: [PATCH 1/3] eal: fix keep alive header for C++ Date: Fri, 5 Feb 2016 18:06:07 +0100 Message-ID: <1454691969-25734-2-git-send-email-thomas.monjalon@6wind.com> References: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: dev@dpdk.org To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, remy.horton@intel.com Return-path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id EEAEFC336 for ; Fri, 5 Feb 2016 18:08:15 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id p63so36074556wmp.1 for ; Fri, 05 Feb 2016 09:08:15 -0800 (PST) In-Reply-To: <1454691969-25734-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" When built in a C++ application, the keepalive include fails: rte_keepalive.h:142:41: error: =E2=80=98ALIVE=E2=80=99 was not declared i= n this scope keepcfg->state_flags[rte_lcore_id()] =3D ALIVE; ^ Fixes: 75583b0d1efd ("eal: add keep alive monitoring") Signed-off-by: Thomas Monjalon --- lib/librte_eal/common/include/rte_keepalive.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/librte_eal/common/include/rte_keepalive.h b/lib/librte_e= al/common/include/rte_keepalive.h index 02472c0..3418c60 100644 --- a/lib/librte_eal/common/include/rte_keepalive.h +++ b/lib/librte_eal/common/include/rte_keepalive.h @@ -60,18 +60,21 @@ typedef void (*rte_keepalive_failure_callback_t)( const int id_core); =20 =20 +enum rte_keepalive_state { + ALIVE =3D 1, + MISSING =3D 0, + DEAD =3D 2, + GONE =3D 3 +}; + /** * Keepalive state structure. * @internal */ struct rte_keepalive { /** Core Liveness. */ - enum { - ALIVE =3D 1, - MISSING =3D 0, - DEAD =3D 2, - GONE =3D 3 - } __rte_cache_aligned state_flags[RTE_KEEPALIVE_MAXCORES]; + enum rte_keepalive_state __rte_cache_aligned + state_flags[RTE_KEEPALIVE_MAXCORES]; =20 /** Last-seen-alive timestamps */ uint64_t last_alive[RTE_KEEPALIVE_MAXCORES]; --=20 2.7.0