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 B988F45B4C; Tue, 22 Oct 2024 21:28:01 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8E33F4029B; Tue, 22 Oct 2024 21:28:01 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id C8AFC40285 for ; Tue, 22 Oct 2024 21:27:59 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1729625279; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YDAekJvVGCeRXxC/ZiaQQpBdAi2w0+BtpSp0v0WesTI=; b=PtPQGQVGH19ozOIKBG5OTpUCjfYYUbBAR0sI7U0VN2JpWaBZF8dMc3GHZ7SYRVzFX3qpNR PfO+gZLkPMMyU3MYbt8pHcxF5446g3xGYVCCxSLsLeCT2xGhSsH7efa7zokdZ9Y8J4/7dU DJfl4NEks1bW1qi2E9/edTKX1JDgDMM= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-606-O2FURybfOw2gCIqpTve7NA-1; Tue, 22 Oct 2024 15:27:57 -0400 X-MC-Unique: O2FURybfOw2gCIqpTve7NA-1 Received: by mail-lf1-f71.google.com with SMTP id 2adb3069b0e04-539e75025f9so3463047e87.3 for ; Tue, 22 Oct 2024 12:27:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729625276; x=1730230076; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YDAekJvVGCeRXxC/ZiaQQpBdAi2w0+BtpSp0v0WesTI=; b=C/y2WYYGalt+Y7d6bAKMxoBUek+LhrLn7pkv5I0EHic5fHPjyBSYB8FBhu2rqicZVX 6d3R5mQCPKMcVgiQYwACV1OIxHlkrDeYfJRdxBX+i+50BByhMaH075u6YBy+xMm41zmD rMK7u85ancb7luMmcMDlVdz3kKs2MZE+vRYqagWOcMAbfzJJJGJ9YcGjZxf4Gxjxufqh qFu5eufCJe/6EWricTxvczsWvkirl6o/ASLutBm3NItsUfWhpZB9ylMPbr7aeAyIF6VS IgfWoo6cxrLxheXGu9NE77dyKBlxm6OLAKDHDCLUpUNAYdt5mZEQ80bd9QcHRpyiZyZl 31dA== X-Gm-Message-State: AOJu0YzF/HfIde7ynOsnyoZuOrPF+3cPiWsnliJA/b9Iui0gAR0+T6+5 tfaILxpoIViaWeCoF3Gv6/OMdQcc8Bq9dTQoGgnyYebFF+5tMdnXwapyPGsdcXzC1cTFPi4f/bP FFV6wJKe4mk8ekm4Q1rZmCPpTTIMJ1zrXkMGBdorXIkS7j8Yt4At5WtLmsd84qRoaMCD/ZWZYBx Jrx8d1SK39QSYTF7Y= X-Received: by 2002:a05:6512:ac8:b0:539:e88f:23a1 with SMTP id 2adb3069b0e04-53a154b2c99mr8396391e87.44.1729625276280; Tue, 22 Oct 2024 12:27:56 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFYrbyK++NclsDucMBqSWd303DrH1Y1ApJ5QI+NHLrhw55Ta6Zv/d7AhossZEimAbjdfrGJ/ZCTd1aBo9fQ/9E= X-Received: by 2002:a05:6512:ac8:b0:539:e88f:23a1 with SMTP id 2adb3069b0e04-53a154b2c99mr8396370e87.44.1729625275804; Tue, 22 Oct 2024 12:27:55 -0700 (PDT) MIME-Version: 1.0 References: <20241015121046.2556695-1-david.marchand@redhat.com> <20241021160447.3538245-1-david.marchand@redhat.com> <20241021160447.3538245-4-david.marchand@redhat.com> <60606e75-7e3c-437d-99ad-d6a7c0a710a1@lysator.liu.se> In-Reply-To: <60606e75-7e3c-437d-99ad-d6a7c0a710a1@lysator.liu.se> From: David Marchand Date: Tue, 22 Oct 2024 21:27:44 +0200 Message-ID: Subject: Re: [PATCH v3 3/4] bus/ifpga: use C linkage where appropriate in driver header To: =?UTF-8?Q?Mattias_R=C3=B6nnblom?= Cc: dev@dpdk.org, thomas@monjalon.net, bruce.richardson@intel.com, ktraynor@redhat.com, Rosen Xu , =?UTF-8?Q?Mattias_R=C3=B6nnblom?= , =?UTF-8?Q?Morten_Br=C3=B8rup?= X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Oct 21, 2024 at 8:01=E2=80=AFPM Mattias R=C3=B6nnblom wrote: > > On 2024-10-21 18:04, David Marchand wrote: > > This driver was missed when cleaning up most of the headers. > > > > Fixes: 719834a6849e ("use C linkage where appropriate in headers") > > > > Signed-off-by: David Marchand > > --- > > drivers/bus/ifpga/bus_ifpga_driver.h | 8 ++++---- > > 1 file changed, 4 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/bus/ifpga/bus_ifpga_driver.h b/drivers/bus/ifpga/b= us_ifpga_driver.h > > index 5bbe36d6e0..a42afc7d75 100644 > > --- a/drivers/bus/ifpga/bus_ifpga_driver.h > > +++ b/drivers/bus/ifpga/bus_ifpga_driver.h > > @@ -11,16 +11,16 @@ > > * RTE Intel FPGA Bus Interface > > */ > > > > -#ifdef __cplusplus > > -extern "C" { > > -#endif /* __cplusplus */ > > - > > #include > > #include > > #include > > #include > > #include > > > > +#ifdef __cplusplus > > +extern "C" { > > +#endif /* __cplusplus */ > > + > > #define IFPGA_BUS_NAME ifpga > > > > /* Forward declarations */ > > My effort was limited to the headers passed to chkincs, which I'm > guessing is the public API headers. There were many headers that got changed in commit 719834a6849e ("use C linkage where appropriate in headers") while not being in the exported headers list, which is what chkincs checks. For example, $ git show --stat 719834a6849e | grep raw/ifpga drivers/raw/ifpga/afu_pmd_core.h | 8 ++++---- drivers/raw/ifpga/afu_pmd_he_hssi.h | 6 +++--- drivers/raw/ifpga/afu_pmd_he_lpbk.h | 6 +++--- drivers/raw/ifpga/afu_pmd_he_mem.h | 6 +++--- drivers/raw/ifpga/afu_pmd_n3000.h | 6 +++--- drivers/raw/ifpga/rte_pmd_afu.h | 4 ++-- drivers/raw/ifpga/rte_pmd_ifpga.h | 4 ++-- $ grep chkincs.*afu build/build.ninja > > Internal headers shouldn't have any #ifdef __cpluspus at all, anywhere. > Internal headers, I agree, though commit 719834a6849e ("use C linkage where appropriate in headers") did change some. For drivers headers that are exported, it is another story, some people seem to like C++ for writing out of tree drivers. And this is what this patch of mine is about. --=20 David Marchand