From mboxrd@z Thu Jan 1 00:00:00 1970 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=9i6F1GqMTVBck91qh6Wy2Gr7aqaMcwXD9jqDtX0wWDo=; b=Icb+DaCA5kIpJaCK38ZKaEkqeNKGru6AhS+9ZRP8V+xARCbQSimZ753+JBTV2u+gmb IIjLJ4jeHxR5UmJQ2r+NdN+4eNYvN7oZ6W1xgO/ARnnl8pO0ynNck6cACyUfW97d6t81 ISE9vpyi++kkE5pnh0ZX9X1zstHJAgBaTOJgNB8856+chlta8SfoTjgbb7V9R7ctKv9O SMjX84sxLByqnp8B+DfQs7B8QQmsview34+B0ny/+97hlL2+lXjyrwapDoQsI813Mtmc QSdaGZ9nIIwwubjzAfdIhadi1fvvgNdWYuM08sCYHI9YhQUi4g5Wvg3QL6762vdmt7xb xcNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=9i6F1GqMTVBck91qh6Wy2Gr7aqaMcwXD9jqDtX0wWDo=; b=KjiUjQmdcfGYEYM1nVDZ5w0rScGXDMMO58ikpKV+eIAIfdcQnJnej+IPSK1tPiVnWi nBrqu4R1UsAUlb5goLxbuQtgA+DtXhc1xB0dcpPgS7hjRpj8gMuPT2xmRDUA8DqDN7Ar wN4xRJq0TgrQTfHsUn+SFn4+j5I99nDQtJmP4Jc68Tkxb8MCDGoaePTsYvi4Z06econA /ArTF49CZGjBBafzhiE6u9WP7UFfvjoHYl7hNJEx5+e2audpIguqpzasbKIu3mFbwOAJ HTSHfn3Cq/ZMc3QgQKIZkOqdg5/RiRJ4xvONdJIdKM5o1NJnAn4+AoRAtseT+iD0020z wR9A== X-Gm-Message-State: AG10YOSU2Gc+s4xowwQwlV3k+HJKcoB0B5cJby28FOfoQlzhruZ0lsdOAQvh6GDmWMezBtNg X-Received: by 10.28.63.200 with SMTP id m191mr16862673wma.21.1454692095764; Fri, 05 Feb 2016 09:08:15 -0800 (PST) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id u191sm31712660wmd.4.2016.02.05.09.08.14 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 05 Feb 2016 09:08:15 -0800 (PST) From: Thomas Monjalon To: pablo.de.lara.guarch@intel.com, declan.doherty@intel.com, remy.horton@intel.com Date: Fri, 5 Feb 2016 18:06:07 +0100 Message-Id: <1454691969-25734-2-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454691969-25734-1-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: 8bit Cc: dev@dpdk.org Subject: [dpdk-dev] [PATCH 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: Fri, 05 Feb 2016 17:08:16 -0000 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; ^ 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_eal/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); +enum rte_keepalive_state { + ALIVE = 1, + MISSING = 0, + DEAD = 2, + GONE = 3 +}; + /** * Keepalive state structure. * @internal */ struct rte_keepalive { /** Core Liveness. */ - enum { - ALIVE = 1, - MISSING = 0, - DEAD = 2, - GONE = 3 - } __rte_cache_aligned state_flags[RTE_KEEPALIVE_MAXCORES]; + enum rte_keepalive_state __rte_cache_aligned + state_flags[RTE_KEEPALIVE_MAXCORES]; /** Last-seen-alive timestamps */ uint64_t last_alive[RTE_KEEPALIVE_MAXCORES]; -- 2.7.0