From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 7961CA00BE;
	Thu, 10 Feb 2022 16:42:48 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 06228426EE;
	Thu, 10 Feb 2022 16:42:48 +0100 (CET)
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by mails.dpdk.org (Postfix) with ESMTP id BD0ED426ED
 for <dev@dpdk.org>; Thu, 10 Feb 2022 16:42:46 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1644507766; x=1676043766;
 h=from:to:cc:subject:date:message-id:in-reply-to:
 references:mime-version:content-transfer-encoding;
 bh=x5nzhG8Mv7bqLZbnBmhIP/fKaEDy8ajxi2BSN7zjsM4=;
 b=DjmgYcvLoDay7OXTJmj1rEo6J3HUnW44ApDrYuev9zwiRSN80P57p9gd
 KnvsKCt9oHYRRJ/uW3biEbEtu2D+f3yAWeZqdnKLPPKHmCH+5bzHTNZG/
 KI11DV54JVwTUKssdFcYBTibOoLTkdXOGWpP9uLhl1VSLmLAShGrjwgxH
 dbLcgJ9AVgxtIddmBIKUHPt2ZMazv3576XxhV/P9ZUr9AURcOrv3+aI4l
 wNBS64eeqrz5Ne02mu2qIcUUId94PTuZ0Ea2RexIIzppx23xHwhrn7/pf
 tyqrBkI8dlmHe1HOHzxjMcZJBFZtMX4JOKiWgV/l6jfEZpmSZ/3zH0q/U A==;
X-IronPort-AV: E=McAfee;i="6200,9189,10254"; a="249723474"
X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="249723474"
Received: from orsmga006.jf.intel.com ([10.7.209.51])
 by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 10 Feb 2022 07:42:44 -0800
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.88,359,1635231600"; d="scan'208";a="485723347"
Received: from silpixa00399126.ir.intel.com ([10.237.223.162])
 by orsmga006.jf.intel.com with ESMTP; 10 Feb 2022 07:42:43 -0800
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v4 0/7] Verify C++ compatibility of public headers
Date: Thu, 10 Feb 2022 15:42:32 +0000
Message-Id: <20220210154239.587185-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
Content-Transfer-Encoding: 8bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=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.

V4:
* add g++-multilib to packages to install for github checks to ensure 32-bit
  builds work
* correct the fixline for patch 1
* add extra cpp_args and cpp_link_args for 32-bit builds in test-meson-builds
  so that includes checks can pass there if enabled.

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
                         *** SUBJECT HERE ***

*** BLURB HERE ***

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 +
 .github/workflows/build.yml              |  2 +-
 buildtools/chkincs/main.cpp              |  4 +++
 buildtools/chkincs/meson.build           | 20 +++++++++++++++
 devtools/test-meson-builds.sh            |  3 ++-
 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 ++
 13 files changed, 61 insertions(+), 30 deletions(-)
 create mode 100644 buildtools/chkincs/main.cpp

--
2.32.0