From patchwork Mon Jun 12 16:49:32 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Bodireddy, Bhanuprakash" X-Patchwork-Id: 774746 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3wmfKN6ZhDz9s72 for ; Tue, 13 Jun 2017 03:00:24 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id D4E6DBE4; Mon, 12 Jun 2017 16:58:02 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 26AA9BCE for ; Mon, 12 Jun 2017 16:58:00 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id D5B87146 for ; Mon, 12 Jun 2017 16:57:59 +0000 (UTC) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 12 Jun 2017 09:57:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.39,334,1493708400"; d="scan'208";a="867107631" Received: from unknown (HELO silpixa00393942.ger.corp.intel.com) ([10.237.223.42]) by FMSMGA003.fm.intel.com with ESMTP; 12 Jun 2017 09:57:58 -0700 From: Bhanuprakash Bodireddy To: dev@openvswitch.org Date: Mon, 12 Jun 2017 17:49:32 +0100 Message-Id: <1497286187-69287-5-git-send-email-bhanuprakash.bodireddy@intel.com> X-Mailer: git-send-email 2.4.11 In-Reply-To: <1497286187-69287-1-git-send-email-bhanuprakash.bodireddy@intel.com> References: <1497286187-69287-1-git-send-email-bhanuprakash.bodireddy@intel.com> X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [RFC PATCH v2 04/19] bridge: Invoke keepalive framework. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org With this commit the keepalive framework is invoked when enable-keepalive is set to 'true' in ovsdb. As part of initialization the shared memory block is created and initialized. Also the keepalive data structure is initialized and the callback functions are registered if DPDK datapath is enabled. Signed-off-by: Bhanuprakash Bodireddy --- vswitchd/bridge.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index cc7a43b..d40879d 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -34,6 +34,7 @@ #include "hmapx.h" #include "if-notifier.h" #include "jsonrpc.h" +#include "keepalive.h" #include "lacp.h" #include "mac-learning.h" #include "mcast-snooping.h" @@ -2958,6 +2959,9 @@ bridge_run(void) dpdk_init(&cfg->other_config); } + /* Initialize Keepalive framework */ + ka_init(&cfg->other_config); + /* Initialize the ofproto library. This only needs to run once, but * it must be done after the configuration is set. If the * initialization has already occurred, bridge_init_ofproto()