From patchwork Mon Mar 16 18:42:36 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Muhammad Asim Jamshed X-Patchwork-Id: 66734 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8A8EBA0559; Mon, 16 Mar 2020 20:22:09 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 66D281C0C7; Mon, 16 Mar 2020 20:22:09 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 288151C0C1 for ; Mon, 16 Mar 2020 20:22:08 +0100 (CET) IronPort-SDR: QQ3EWKLJG6owY/0ON5H04WVIZma5yR2vIXMpRX49uIioQ0/NL2pwoeuM3HsriSviacW84EbUr2 1+kFeJUb+YFw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2020 12:22:07 -0700 IronPort-SDR: Fw7c5JUmWUIrabloQGT/CDDGjZ30j3cDDf9EgmjO5/J7Nw96viqKw552iKvYuJRlTyXtqtJdxO M4hRXE2x0OyQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,561,1574150400"; d="scan'208";a="417269048" Received: from tsr-new-srvrs2.jf.intel.com ([10.54.81.79]) by orsmga005.jf.intel.com with ESMTP; 16 Mar 2020 12:22:07 -0700 From: Muhammad Asim Jamshed To: dev@dpdk.org Cc: muhammad.jamshed@intel.com, saikrishna.edupuganti@intel.com, asim.jamshed@gmail.com Date: Mon, 16 Mar 2020 18:42:36 +0000 Message-Id: <20200316184236.15692-1-asim.jamshed@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [dpdk-dev] [dpdk.org] [PATCH] fib: add "C" extern linkage for C++ programs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch allows C++ programs to use librte_fib library routines. Previously C++ programs were not able to link this library and programs would fail to get linked. With this patch compilation and linking will be successful. Signed-off-by: Muhammad Asim Jamshed Signed-off-by: Saikrishna Edupuganti Reviewed-by: David Marchand Acked-by: Vladimir Medvedkin Acked-by: Vladimir Medvedkin --- lib/librte_fib/rte_fib.h | 8 ++++++++ lib/librte_fib/rte_fib6.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/lib/librte_fib/rte_fib.h b/lib/librte_fib/rte_fib.h index d06c5ef55..af3bbf07e 100644 --- a/lib/librte_fib/rte_fib.h +++ b/lib/librte_fib/rte_fib.h @@ -14,6 +14,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + struct rte_fib; struct rte_rib; @@ -185,4 +189,8 @@ __rte_experimental struct rte_rib * rte_fib_get_rib(struct rte_fib *fib); +#ifdef __cplusplus +} +#endif + #endif /* _RTE_FIB_H_ */ diff --git a/lib/librte_fib/rte_fib6.h b/lib/librte_fib/rte_fib6.h index 426870403..66c71c84c 100644 --- a/lib/librte_fib/rte_fib6.h +++ b/lib/librte_fib/rte_fib6.h @@ -14,6 +14,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + #define RTE_FIB6_IPV6_ADDR_SIZE 16 /** Maximum depth value possible for IPv6 FIB. */ #define RTE_FIB6_MAXDEPTH 128 @@ -190,4 +194,8 @@ __rte_experimental struct rte_rib6 * rte_fib6_get_rib(struct rte_fib6 *fib); +#ifdef __cplusplus +} +#endif + #endif /* _RTE_FIB6_H_ */