From patchwork Thu Feb 10 14:03:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 107258 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 17348A00BE; Thu, 10 Feb 2022 15:04:27 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F13EB42707; Thu, 10 Feb 2022 15:04:26 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 1F5434013F for ; Thu, 10 Feb 2022 15:04:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644501865; x=1676037865; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UwCBdVb+uvlXaBxqghRGA9k3SkQEuP8Le3iWm8zyhy0=; b=DXHZby90XmRiSyeL8fZOQ+DXBOkQJHpIusCimiRy8Ofe2Wu8Rb1tPSpi xl4ma2YIpgfH2mCAaHrMUequaBxJAxyYWsXF42pEG4GX5DEninj4ShC4p 0aFKAQKsS2UpFAJRf6kfqE+jXotPgAWjQo/S3parPKrRJUsEAAOfglRki SwAy8LL9/H90Myg/00wr7K4cUaZv4SIT3DyGdpAkVUKva4tSWbmciLMY/ xGZIPTedf2eWJs1Tr9qUADTirpER1tZptx7eTbqMUXhjtFbhFUxCmC8oY sq7iG0lW79dcDKfWrktt8O+D0aFWA/r7X6l5xSo3zZK7ecGG5sH6Ety79 Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10253"; a="312781075" X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="312781075" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Feb 2022 06:04:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,358,1635231600"; d="scan'208";a="585964225" Received: from silpixa00399126.ir.intel.com ([10.237.223.162]) by fmsmga008.fm.intel.com with ESMTP; 10 Feb 2022 06:04:23 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v3 0/7] Verify C++ compatibility of public headers Date: Thu, 10 Feb 2022 14:03:48 +0000 Message-Id: <20220210140355.586399-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220204174209.440207-1-bruce.richardson@intel.com> References: <20220204174209.440207-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 This patchset expands upon the exiting chkincs infrastructure to build a C++ test application as well as the existing C test app, which helps catch any build errors when the public DPDK headers are included in C++ code. The rest of this patchset fixes the errors caught by this additional check - mostly missing casts, but also one use of "new" as a variable name, and one missing closing brace for an 'extern "C"' block. V3: * update linux-build script to have cpp_args=-m32 for 32-bit builds V2: * Changed patch 6 to have a minimally-invasive fix for C++ without affecting existing C code. * Added fixlines and Cc stable for all patches which are fixes Bruce Richardson (7): eal: fix header build with C++ eventdev: fix header build with C++ graph: fix missing explicit cast for C++ build ipsec: fix missing explicit cast for C++ build table: fix missing explicit casts for C++ build vhost: fix incompatible header includes for C++ buildtools/chkincs: test headers for C++ compatibility .ci/linux-build.sh | 1 + buildtools/chkincs/main.cpp | 4 +++ buildtools/chkincs/meson.build | 20 +++++++++++++++ lib/eal/include/generic/rte_ticketlock.h | 14 +++++------ lib/eal/include/rte_trace_point.h | 2 +- lib/eventdev/rte_event_timer_adapter.h | 3 +++ lib/eventdev/rte_eventdev.h | 2 +- lib/graph/rte_graph_worker.h | 2 +- lib/ipsec/rte_ipsec_group.h | 4 +-- lib/table/rte_table_hash_func.h | 32 ++++++++++++------------ lib/vhost/rte_vhost.h | 2 ++ 11 files changed, 58 insertions(+), 28 deletions(-) create mode 100644 buildtools/chkincs/main.cpp --- 2.32.0