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 05511A0350; Fri, 4 Feb 2022 18:42:19 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91A024013F; Fri, 4 Feb 2022 18:42:19 +0100 (CET) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 176EC40041 for ; Fri, 4 Feb 2022 18:42:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1643996538; x=1675532538; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=98ircbt3+u79Z8Li4WZela75IfeuLrKA+DfXcoRxgHw=; b=RXZ3bLl1cZpjYpiHZ9S95haJCA1wzMTGwH0ig0d4pyEfGjsUALcUydcL hNw3XrZZ14wOCtfYtJC0xwlj+cHQdGtg5taCDvT0lq1NGBaXlz8RjjAal B+3tO4Lim2DcNXyRut6Ffsox9ic7DugzN5RkxhaqH3lChLSXfVbuB/m3+ nRMdrgdYpwf7P1isKBGsoVy4Pi60UHhHGp9Tucs0oO1UHyhe6Dzf/59V2 oOPQe8o4ygkBBYyQP1DCtDWFtha/X/9fnPTowBEtFkRzMUaOejgr6Xa7h RoNCmPu9s5JggNiKUx3CnN4Ut0QzrJToXeAFf4kG+aj3ZMXlLB8KTDqVq A==; X-IronPort-AV: E=McAfee;i="6200,9189,10248"; a="229060464" X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="229060464" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2022 09:42:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,343,1635231600"; d="scan'208";a="620890196" Received: from silpixa00399126.ir.intel.com ([10.237.223.162]) by FMSMGA003.fm.intel.com with ESMTP; 04 Feb 2022 09:42:16 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH 0/7] Verify C++ compatibility of public headers Date: Fri, 4 Feb 2022 17:42:02 +0000 Message-Id: <20220204174209.440207-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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. NOTE: the most complicated changes are in the 6th patch, where there were linux headers included which were not C++ compatible. This patch moves the inclusion of those headers to non-public locations in the code to remove those issues, but I am uncertain what the knock-on impacts of this change may be. Therefore, I ask particular review from vhost/vdpa maintainers to see if there is a better solution to this issue Bruce Richardson (7): eal: fix header build with C++ eventdev: fix header build with C++ graph: add explicit cast to allow C++ build ipsec: : add explicit cast to allow C++ build table: add explicit casts for C++ compatibility vhost: remove non-C++ compatible includes buildtools/chkincs: test headers for C++ compatibility buildtools/chkincs/main.cpp | 4 +++ buildtools/chkincs/meson.build | 20 +++++++++++++++ drivers/net/vhost/rte_eth_vhost.c | 2 ++ drivers/vdpa/ifc/ifcvf_vdpa.c | 2 ++ drivers/vdpa/mlx5/mlx5_vdpa.h | 1 + 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 | 4 --- 13 files changed, 60 insertions(+), 32 deletions(-) create mode 100644 buildtools/chkincs/main.cpp -- 2.32.0