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 DB6A3A09E4; Thu, 21 Jan 2021 10:25:23 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BB51140F10; Thu, 21 Jan 2021 10:25:23 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mails.dpdk.org (Postfix) with ESMTP id EBACB140F0C for ; Thu, 21 Jan 2021 10:25:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1611221121; 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: in-reply-to:in-reply-to:references:references; bh=4Sk79UP9e0+bk/BnarptdGM2+2icOS4BybhlKSyMFHg=; b=B1mTwvOCJzYngNN3NHjoVQ0QjXMTlAZ5iJ5Kt9Nj9kTn2YVFJz0ZT+5Hxepv9RU+e4pBN5 SyLKSRys6rcvJDwAvXEHshrQnnJR0v0H5wArm6A10gxrz8Of+JWhoEFUyJa/nPH7TQXd60 nE0dCMbKp5C63Baf6XwJ5iBMKXRYey0= Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-602-xeQ0C6QcMeaLtVqZrToriQ-1; Thu, 21 Jan 2021 04:25:19 -0500 X-MC-Unique: xeQ0C6QcMeaLtVqZrToriQ-1 Received: by mail-vs1-f71.google.com with SMTP id g12so215114vsm.5 for ; Thu, 21 Jan 2021 01:25:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4Sk79UP9e0+bk/BnarptdGM2+2icOS4BybhlKSyMFHg=; b=iu/Sh0p0sVZ+REi+xz/ID+ppR6czgJ0fLdywjtDTXAmF7EKzSJOkzTkENwBsrhVrJL pab/AhVT/kdt7Pvm3TWA27wZydyht6JVsslf7Thiwvsi7NEuwtuL6AYsZXrtAvAUjYQj uTtjTh81PDNch3WPL1O3cJ3OwWM0gMB9TnLmDaQuEdZX9cN+sbkAWLkAXGVDNKx0FypK g3nfJyzP/YQf9Sx9Zu23CLUGT3r6Ae/AAQE0lyk+JJXZ5Tkg8RPMu9vxfD/so6jUq9kq CaR/gtEZEGM8vUyHmtKrTiMGizxgoAQ8CRyzxw/T5Zjk+30NcYQj0DY4WxE+Kb8RDM9v 3c1Q== X-Gm-Message-State: AOAM532wlwjuEIH9zBduPq7QJ6b3PYQHQy1uQWU61NuAwdLTLVU1m2GS 6IBv4ioeaEvI1Jr03Fysp6UngvBxoP0oS/qN0QIzzFJpeMJmOFSHCeQ4XUsjh5Pr92Y1knoQpfx Bq77sj4oRK66Ein5G4SM= X-Received: by 2002:a9f:2628:: with SMTP id 37mr8389082uag.87.1611221118728; Thu, 21 Jan 2021 01:25:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJw5GX7bWDDC7wDVOhkdNNTZWIRlL3wPVnB288RuOhgMGyFZRtkh1Y+EVYOsyDFtHqA0tCbrTGssrg3jFdR5x4A= X-Received: by 2002:a9f:2628:: with SMTP id 37mr8389076uag.87.1611221118460; Thu, 21 Jan 2021 01:25:18 -0800 (PST) MIME-Version: 1.0 References: <20210114110606.21142-1-bruce.richardson@intel.com> <20210115111052.16437-1-bruce.richardson@intel.com> In-Reply-To: <20210115111052.16437-1-bruce.richardson@intel.com> From: David Marchand Date: Thu, 21 Jan 2021 10:25:07 +0100 Message-ID: To: Bruce Richardson Cc: dev , Thomas Monjalon Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH v2 00/19] ensure headers have correct includes 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 Sender: "dev" On Fri, Jan 15, 2021 at 12:11 PM Bruce Richardson wrote: > > As a general principle, each header file should include any other > headers it needs to provide data type definitions or macros. For > example, any header using the uintX_t types in structures or function > prototypes should include "stdint.h" to provide those type definitions. > > In practice, while many, but not all, headers in DPDK did include all > necessary headers, it was never actually checked that each header could > be included in a C file and compiled without having any compiler errors > about missing definitions. This patchset fixes any missing includes in > public headers from the DPDK "lib" folder and then adds a "chkincs" app. > to verify this on an ongoing basis. > > This chkincs app does nothing when run, it's for build-time checking > only. Its source code consists of one C file per public DPDK header, > where that C file contains nothing except an include for that header. > Therefore, if any header is added to the lib folder which fails to > compile when included alone, the build of chkincs will fail with a > suitable error message. Since this compile checking is not needed on > most builds of DPDK, the building of chkincs is disabled by default, but > can be enabled by the "test_includes" meson option. To catch errors with > patch submissions, the final patch of this series enables it for a > single build in test-meson-builds script. > > Future work could involve doing similar checks on headers for C++ compatibility, > for example. > > V2: > * Add maintainers file entry for new app > * Drop patch for c11 ring header > * Use build variable "headers_no_chkincs" for tracking exceptions > > Bruce Richardson (19): > eal: fix missing header inclusion I split this as two patches since the rte_thread.h only applies to 21.02. > telemetry: fix missing header include > ethdev: fix missing header include Patch 3 seems unnecessary, we skip rte_eth_ctrl.h validation later but I took it anyway. > net: fix missing header include > mbuf: fix missing header include Is rte_byteorder.h inclusion in rte_mbuf.h still necessary? > bitratestats: fix missing header include > rib: fix missing header includes > vhost: fix missing header includes > ipsec: fix missing header include > fib: fix missing header includes > table: fix missing header include > pipeline: fix missing header includes > metrics: fix variable declaration in header > node: fix missing header include > app: fix extra include paths for app builds Reviewed and applied patches 1-15, thanks Bruce. -- David Marchand