From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 58C2043DCA for ; Mon, 8 Apr 2024 17:29:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 31EE2402C9; Mon, 8 Apr 2024 17:29:40 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by mails.dpdk.org (Postfix) with ESMTP id 2580D402C0; Mon, 8 Apr 2024 17:29:38 +0200 (CEST) Received: by linux.microsoft.com (Postfix, from userid 1086) id 7381C20EA43F; Mon, 8 Apr 2024 08:29:37 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 7381C20EA43F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1712590177; bh=2tRcduwGGWNpGYhebuRKm1Eb/qlhs4NRgNA5ZFEez94=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MdRHKg8mOigRl0JP1nPQXMd9YftPVt+Jr+ACxW6QqJN4z9M+7eKeN7FRLGG7o6Mtr HOaRzgzv7SB9lFguFixOEMtzcspc3V+orlg7Mr7Dr8lCjJY54xdPbuVN5P7DW9LHES sQYR/3cC2tyRTbaHounZP/m9PMDjtRCfgjP3Am3E= Date: Mon, 8 Apr 2024 08:29:37 -0700 From: Tyler Retzlaff To: Ashish Sadanandan Cc: Thomas Monjalon , dev@dpdk.org, nelio.laranjeiro@6wind.com, stable@dpdk.org Subject: Re: [PATCH v3 1/1] eal: add C++ include guard in generic/rte_vect.h Message-ID: <20240408152937.GA28873@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net> References: <20240202051335.776290-1-ashish.sadanandan@gmail.com> <20240318024415.555614-1-ashish.sadanandan@gmail.com> <1836105.FMhQkTaH9n@thomas> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On Sat, Apr 06, 2024 at 07:30:38PM -0600, Ashish Sadanandan wrote: > On Wed, Apr 3, 2024 at 8:52 AM Thomas Monjalon wrote: > > > 02/04/2024 18:03, Ashish Sadanandan: > > > Hi everyone, > > > I've made the updates as suggested. Could someone please review the > > latest > > > patchset? Not sure if I followed the new patchset instructions correctly, > > > I've always had trouble with that part. > > > > I remember we were discussing about aligning all files. > > I was waiting for a patch applying the rule we discussed. > > > > I missed the part where people were volunteering me for additional work :) > > The consensus seems to be that the extern "C" directives should only be in > public headers, not private ones. Can you please tell me if there's an easy > way to get a list of public headers? build with driver_sdk_headers enabled. run the meson install target. all headers that are installed need the guard. > > > > > On Sun, Mar 17, 2024 at 8:44 PM Ashish Sadanandan < > > > ashish.sadanandan@gmail.com> wrote: > > > > > > > The header was missing the extern "C" directive which causes name > > > > mangling of functions by C++ compilers, leading to linker errors > > > > complaining of undefined references to these functions. > > > > > > > > Also updated the coding style contribution guideline with a new > > > > "Language Linkage" section stating `extern "C"` block should be added > > to > > > > public headers. > > > > > > > > Fixes: 86c743cf9140 ("eal: define generic vector types") > > > > Cc: nelio.laranjeiro@6wind.com > > > > Cc: stable@dpdk.org > > > > > > > > Signed-off-by: Ashish Sadanandan > > > > --- > > > > .mailmap | 2 +- > > > > doc/guides/contributing/coding_style.rst | 21 +++++++++++++++++++++ > > > > lib/eal/include/generic/rte_vect.h | 8 ++++++++ > > > > 3 files changed, 30 insertions(+), 1 deletion(-) > > > > > > > > --- a/doc/guides/contributing/coding_style.rst > > > > +++ b/doc/guides/contributing/coding_style.rst > > > > +Language Linkage > > > > +~~~~~~~~~~~~~~~~ > > > > + > > > > +Public headers should enclose all function and variable declarations > > and > > > > definitions in an ``extern "C"`` block to facilitate interoperability > > with > > > > C++. > > > > + > > > > +.. code-block:: c > > > > + > > > > + #ifndef _FILE_H_ > > > > + #define _FILE_H_ > > > > + > > > > + #ifdef __cplusplus > > > > + extern "C" { > > > > + #endif > > > > + > > > > + /* Code */ > > > > + > > > > + #ifdef __cplusplus > > > > + } > > > > + #endif > > > > + > > > > + #endif /* _FILE_H_ */ > > > > This is not describing where the includes should be placed. > > > > Will address this along with the rest of the headers. > > Regards, > Ashish.