From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4C2CDA057C; Thu, 26 Mar 2020 11:40:53 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 11487F3E; Thu, 26 Mar 2020 11:40:52 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 1965E3B5 for ; Thu, 26 Mar 2020 11:40:49 +0100 (CET) IronPort-SDR: X09I/c48n5UyL6eneWA8Te98q1WKt/XkLLExfdIAn7+/lXT5Clrb+ZF1d9Heb28Bv5um5lgaOa 2RkU4H/d9c3A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2020 03:40:48 -0700 IronPort-SDR: 2RKOqeut68TylN0vuyQ+B2vXp2Rfk0atf25KR7JxsWTNVoRZZYeIGqVmlaAnGvCm69PxkomkIc +ZYstpN+hH+g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,308,1580803200"; d="scan'208,217";a="236242792" Received: from thomasmo-mobl2.ger.corp.intel.com (HELO [10.252.26.53]) ([10.252.26.53]) by orsmga007.jf.intel.com with ESMTP; 26 Mar 2020 03:40:47 -0700 To: Muhammad Asim Jamshed , dev@dpdk.org Cc: muhammad.jamshed@intel.com, saikrishna.edupuganti@intel.com References: <20200316184236.15692-1-asim.jamshed@gmail.com> From: "Medvedkin, Vladimir" Message-ID: Date: Thu, 26 Mar 2020 10:40:46 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200316184236.15692-1-asim.jamshed@gmail.com> Content-Language: en-US Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [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" On 16/03/2020 18:42, Muhammad Asim Jamshed wrote: > 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 > --- > 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_ */ Acked-by: Vladimir Medvedkin -- Regards, Vladimir