get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/87374/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 87374,
    "url": "https://patches.dpdk.org/api/patches/87374/?format=api",
    "web_url": "https://patches.dpdk.org/project/dpdk/patch/20210126213809.1479893-6-bruce.richardson@intel.com/",
    "project": {
        "id": 1,
        "url": "https://patches.dpdk.org/api/projects/1/?format=api",
        "name": "DPDK",
        "link_name": "dpdk",
        "list_id": "dev.dpdk.org",
        "list_email": "dev@dpdk.org",
        "web_url": "http://core.dpdk.org",
        "scm_url": "git://dpdk.org/dpdk",
        "webscm_url": "http://git.dpdk.org/dpdk",
        "list_archive_url": "https://inbox.dpdk.org/dev",
        "list_archive_url_format": "https://inbox.dpdk.org/dev/{}",
        "commit_url_format": ""
    },
    "msgid": "<20210126213809.1479893-6-bruce.richardson@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dev/20210126213809.1479893-6-bruce.richardson@intel.com",
    "date": "2021-01-26T21:38:06",
    "name": "[v5,5/8] build: separate out headers for include checking",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": true,
    "hash": "b769e7517e7b8f4fe20b8aecb6c0433e2b789745",
    "submitter": {
        "id": 20,
        "url": "https://patches.dpdk.org/api/people/20/?format=api",
        "name": "Bruce Richardson",
        "email": "bruce.richardson@intel.com"
    },
    "delegate": {
        "id": 24651,
        "url": "https://patches.dpdk.org/api/users/24651/?format=api",
        "username": "dmarchand",
        "first_name": "David",
        "last_name": "Marchand",
        "email": "david.marchand@redhat.com"
    },
    "mbox": "https://patches.dpdk.org/project/dpdk/patch/20210126213809.1479893-6-bruce.richardson@intel.com/mbox/",
    "series": [
        {
            "id": 14963,
            "url": "https://patches.dpdk.org/api/series/14963/?format=api",
            "web_url": "https://patches.dpdk.org/project/dpdk/list/?series=14963",
            "date": "2021-01-26T21:38:01",
            "name": "add checking of header includes",
            "version": 5,
            "mbox": "https://patches.dpdk.org/series/14963/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/87374/comments/",
    "check": "success",
    "checks": "https://patches.dpdk.org/api/patches/87374/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<dev-bounces@dpdk.org>",
        "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 8FC68A052A;\n\tTue, 26 Jan 2021 22:39:09 +0100 (CET)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 03BF6140D17;\n\tTue, 26 Jan 2021 22:39:02 +0100 (CET)",
            "from mga02.intel.com (mga02.intel.com [134.134.136.20])\n by mails.dpdk.org (Postfix) with ESMTP id 007CC140D19\n for <dev@dpdk.org>; Tue, 26 Jan 2021 22:38:57 +0100 (CET)",
            "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 26 Jan 2021 13:38:56 -0800",
            "from silpixa00399126.ir.intel.com ([10.237.222.4])\n by fmsmga008.fm.intel.com with ESMTP; 26 Jan 2021 13:38:53 -0800"
        ],
        "IronPort-SDR": [
            "\n X5Uqw1SO0+3PgTFgV+wMJso4yni8uO48w7Ubernb6DYb5VGTMQT/YzvBumhRDGoq+TZnWo+Oha\n 3BwWNFOJl3Dg==",
            "\n 9oGQXY4N32gvq8+tPxmDJnBT1YMDUsYi7c+m+asHm5E0k6QbnXEAZEPSad3yCsO0c1asaBTTCv\n ybNLuAVEebPA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6000,8403,9876\"; a=\"167073890\"",
            "E=Sophos;i=\"5.79,377,1602572400\"; d=\"scan'208\";a=\"167073890\"",
            "E=Sophos;i=\"5.79,377,1602572400\"; d=\"scan'208\";a=\"362138764\""
        ],
        "X-ExtLoop1": "1",
        "From": "Bruce Richardson <bruce.richardson@intel.com>",
        "To": "dev@dpdk.org",
        "Cc": "david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>,\n Konstantin Ananyev <konstantin.ananyev@intel.com>,\n Thomas Monjalon <thomas@monjalon.net>,\n Ferruh Yigit <ferruh.yigit@intel.com>,\n Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,\n Yipeng Wang <yipeng1.wang@intel.com>,\n Sameh Gobriel <sameh.gobriel@intel.com>,\n Bernard Iremonger <bernard.iremonger@intel.com>,\n Vladimir Medvedkin <vladimir.medvedkin@intel.com>,\n Ori Kam <orika@nvidia.com>,\n Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>,\n Olivier Matz <olivier.matz@6wind.com>,\n Cristian Dumitrescu <cristian.dumitrescu@intel.com>",
        "Date": "Tue, 26 Jan 2021 21:38:06 +0000",
        "Message-Id": "<20210126213809.1479893-6-bruce.richardson@intel.com>",
        "X-Mailer": "git-send-email 2.27.0",
        "In-Reply-To": "<20210126213809.1479893-1-bruce.richardson@intel.com>",
        "References": "<20210114110606.21142-1-bruce.richardson@intel.com>\n <20210126213809.1479893-1-bruce.richardson@intel.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[dpdk-dev] [PATCH v5 5/8] build: separate out headers for include\n checking",
        "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>,\n <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>,\n <mailto:dev-request@dpdk.org?subject=subscribe>",
        "Errors-To": "dev-bounces@dpdk.org",
        "Sender": "\"dev\" <dev-bounces@dpdk.org>"
    },
    "content": "For some libraries, there may be some header files which are not for direct\ninclusion, but rather are to be included via other header files. To allow\nlater checking of these files for missing includes, we separate out the\nindirect include files from the direct ones.\n\nSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>\n---\n doc/guides/contributing/coding_style.rst | 12 ++++++++++++\n lib/librte_eal/include/meson.build       |  2 +-\n lib/librte_eal/x86/include/meson.build   | 14 +++++++++-----\n lib/librte_ethdev/meson.build            |  5 +++--\n lib/librte_hash/meson.build              |  4 ++--\n lib/librte_ipsec/meson.build             |  3 ++-\n lib/librte_lpm/meson.build               |  2 +-\n lib/librte_regexdev/meson.build          |  2 +-\n lib/librte_ring/meson.build              |  4 +++-\n lib/librte_stack/meson.build             |  4 +++-\n lib/librte_table/meson.build             |  7 +++----\n lib/meson.build                          |  3 +++\n meson.build                              |  1 +\n meson_options.txt                        |  2 ++\n 14 files changed, 46 insertions(+), 19 deletions(-)",
    "diff": "diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst\nindex bb3f3efcbc..dba4145228 100644\n--- a/doc/guides/contributing/coding_style.rst\n+++ b/doc/guides/contributing/coding_style.rst\n@@ -891,6 +891,18 @@ headers\n \tinstalled to $PREFIX/include when ``ninja install`` is run. As with\n \tsource files, these should be specified using the meson ``files()``\n \tfunction.\n+\tWhen ``check_includes`` build option is set to ``true``, each header file\n+\thas additional checks performed on it, for example to ensure that it is\n+\tnot missing any include statements for dependent headers.\n+\tFor header files which are public, but only included indirectly in\n+\tapplications, these checks can be skipped by using the ``headers_no_chkincs``\n+\tvariable rather than ``headers``.\n+\n+headers_no_chkincs\n+\t**Default Value = []**.\n+\tAs with ``headers`` option above, except that the files are not checked\n+\tfor all needed include files as part of a DPDK build when\n+\t``check_includes`` is set to ``true``.\n \n includes:\n \t**Default Value = []**.\ndiff --git a/lib/librte_eal/include/meson.build b/lib/librte_eal/include/meson.build\nindex 0dea342e1d..449740e510 100644\n--- a/lib/librte_eal/include/meson.build\n+++ b/lib/librte_eal/include/meson.build\n@@ -16,7 +16,6 @@ headers += files(\n \t'rte_dev.h',\n \t'rte_devargs.h',\n \t'rte_eal.h',\n-\t'rte_eal_interrupts.h',\n \t'rte_eal_memconfig.h',\n \t'rte_eal_trace.h',\n \t'rte_errno.h',\n@@ -49,6 +48,7 @@ headers += files(\n \t'rte_version.h',\n \t'rte_vfio.h',\n )\n+headers_no_chkincs += files('rte_eal_interrupts.h')\n \n # special case install the generic headers, since they go in a subdir\n generic_headers = files(\ndiff --git a/lib/librte_eal/x86/include/meson.build b/lib/librte_eal/x86/include/meson.build\nindex 549cc21a42..835ea22947 100644\n--- a/lib/librte_eal/x86/include/meson.build\n+++ b/lib/librte_eal/x86/include/meson.build\n@@ -2,11 +2,7 @@\n # Copyright(c) 2017 Intel Corporation\n \n arch_headers = files(\n-\t'rte_atomic_32.h',\n-\t'rte_atomic_64.h',\n \t'rte_atomic.h',\n-\t'rte_byteorder_32.h',\n-\t'rte_byteorder_64.h',\n \t'rte_byteorder.h',\n \t'rte_cpuflags.h',\n \t'rte_cycles.h',\n@@ -22,4 +18,12 @@ arch_headers = files(\n \t'rte_ticketlock.h',\n \t'rte_vect.h',\n )\n-install_headers(arch_headers, subdir: get_option('include_subdir_arch'))\n+arch_headers_no_chkincs = files(\n+\t'rte_atomic_32.h',\n+\t'rte_atomic_64.h',\n+\t'rte_byteorder_32.h',\n+\t'rte_byteorder_64.h',\n+)\n+install_headers(arch_headers + arch_headers_no_chkincs,\n+\t\tsubdir: get_option('include_subdir_arch'))\n+dpdk_chkinc_headers += arch_headers\ndiff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build\nindex 829abd456b..b7da959dd1 100644\n--- a/lib/librte_ethdev/meson.build\n+++ b/lib/librte_ethdev/meson.build\n@@ -11,10 +11,8 @@ sources = files('ethdev_private.c',\n \t'rte_tm.c')\n \n headers = files('rte_ethdev.h',\n-\t'rte_ethdev_core.h',\n \t'rte_ethdev_trace.h',\n \t'rte_ethdev_trace_fp.h',\n-\t'rte_eth_ctrl.h',\n \t'rte_dev_info.h',\n \t'rte_flow.h',\n \t'rte_flow_driver.h',\n@@ -22,5 +20,8 @@ headers = files('rte_ethdev.h',\n \t'rte_mtr_driver.h',\n \t'rte_tm.h',\n \t'rte_tm_driver.h')\n+headers_no_chkincs += files(\n+\t'rte_ethdev_core.h',\n+\t'rte_eth_ctrl.h')\n \n deps += ['net', 'kvargs', 'meter', 'telemetry']\ndiff --git a/lib/librte_hash/meson.build b/lib/librte_hash/meson.build\nindex 0977a63fd2..b3ebc8b078 100644\n--- a/lib/librte_hash/meson.build\n+++ b/lib/librte_hash/meson.build\n@@ -1,12 +1,12 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2017 Intel Corporation\n \n-headers = files('rte_crc_arm64.h',\n-\t'rte_fbk_hash.h',\n+headers = files('rte_fbk_hash.h',\n \t'rte_hash_crc.h',\n \t'rte_hash.h',\n \t'rte_jhash.h',\n \t'rte_thash.h')\n+headers_no_chkincs += files('rte_crc_arm64.h')\n \n sources = files('rte_cuckoo_hash.c', 'rte_fbk_hash.c')\n deps += ['ring']\ndiff --git a/lib/librte_ipsec/meson.build b/lib/librte_ipsec/meson.build\nindex fc69970ec5..e24e6ed22b 100644\n--- a/lib/librte_ipsec/meson.build\n+++ b/lib/librte_ipsec/meson.build\n@@ -3,6 +3,7 @@\n \n sources = files('esp_inb.c', 'esp_outb.c', 'sa.c', 'ses.c', 'ipsec_sad.c')\n \n-headers = files('rte_ipsec.h', 'rte_ipsec_group.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h')\n+headers = files('rte_ipsec.h', 'rte_ipsec_sa.h', 'rte_ipsec_sad.h')\n+headers_no_chkincs += files('rte_ipsec_group.h')\n \n deps += ['mbuf', 'net', 'cryptodev', 'security', 'hash']\ndiff --git a/lib/librte_lpm/meson.build b/lib/librte_lpm/meson.build\nindex f93c866409..3d3d515a4d 100644\n--- a/lib/librte_lpm/meson.build\n+++ b/lib/librte_lpm/meson.build\n@@ -5,6 +5,6 @@ sources = files('rte_lpm.c', 'rte_lpm6.c')\n headers = files('rte_lpm.h', 'rte_lpm6.h')\n # since header files have different names, we can install all vector headers\n # without worrying about which architecture we actually need\n-headers += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h')\n+headers_no_chkincs += files('rte_lpm_altivec.h', 'rte_lpm_neon.h', 'rte_lpm_sse.h', 'rte_lpm_sve.h')\n deps += ['hash']\n deps += ['rcu']\ndiff --git a/lib/librte_regexdev/meson.build b/lib/librte_regexdev/meson.build\nindex c417b9caf0..1ab21bd4d8 100644\n--- a/lib/librte_regexdev/meson.build\n+++ b/lib/librte_regexdev/meson.build\n@@ -3,6 +3,6 @@\n \n sources = files('rte_regexdev.c')\n headers = files('rte_regexdev.h',\n-\t'rte_regexdev_core.h',\n \t'rte_regexdev_driver.h')\n+headers_no_chkincs += files('rte_regexdev_core.h')\n deps += ['mbuf']\ndiff --git a/lib/librte_ring/meson.build b/lib/librte_ring/meson.build\nindex 36fdcb6a57..1a95dae9e5 100644\n--- a/lib/librte_ring/meson.build\n+++ b/lib/librte_ring/meson.build\n@@ -2,7 +2,9 @@\n # Copyright(c) 2017 Intel Corporation\n \n sources = files('rte_ring.c')\n-headers = files('rte_ring.h',\n+headers = files('rte_ring.h')\n+# most sub-headers are not for direct inclusion\n+headers_no_chkincs += files (\n \t\t'rte_ring_core.h',\n \t\t'rte_ring_elem.h',\n \t\t'rte_ring_c11_mem.h',\ndiff --git a/lib/librte_stack/meson.build b/lib/librte_stack/meson.build\nindex 8f82a40ec2..5d9b3601b3 100644\n--- a/lib/librte_stack/meson.build\n+++ b/lib/librte_stack/meson.build\n@@ -2,7 +2,9 @@\n # Copyright(c) 2019 Intel Corporation\n \n sources = files('rte_stack.c', 'rte_stack_std.c', 'rte_stack_lf.c')\n-headers = files('rte_stack.h',\n+headers = files('rte_stack.h')\n+# subheaders, not for direct inclusion by apps\n+headers_no_chkincs += files(\n \t\t'rte_stack_std.h',\n \t\t'rte_stack_lf.h',\n \t\t'rte_stack_lf_generic.h',\ndiff --git a/lib/librte_table/meson.build b/lib/librte_table/meson.build\nindex d69678386e..a8b1c9a254 100644\n--- a/lib/librte_table/meson.build\n+++ b/lib/librte_table/meson.build\n@@ -20,7 +20,6 @@ headers = files('rte_table.h',\n \t\t'rte_table_hash.h',\n \t\t'rte_table_hash_cuckoo.h',\n \t\t'rte_table_hash_func.h',\n-\t\t'rte_table_hash_func_arm64.h',\n \t\t'rte_lru.h',\n \t\t'rte_table_array.h',\n \t\t'rte_table_stub.h',\n@@ -28,6 +27,6 @@ headers = files('rte_table.h',\n \t\t'rte_swx_table_em.h',)\n deps += ['mbuf', 'port', 'lpm', 'hash', 'acl']\n \n-if arch_subdir == 'x86'\n-\theaders += files('rte_lru_x86.h')\n-endif\n+headers_no_chkincs += files('rte_lru_x86.h',\n+\t\t'rte_lru_arm64.h',\n+\t\t'rte_table_hash_func_arm64.h')\ndiff --git a/lib/meson.build b/lib/meson.build\nindex 44f0a62142..aa0a5ac8fc 100644\n--- a/lib/meson.build\n+++ b/lib/meson.build\n@@ -66,6 +66,7 @@ foreach l:libraries\n \tuse_function_versioning = false\n \tsources = []\n \theaders = []\n+\theaders_no_chkincs = [] # public headers not directly included by apps\n \tincludes = []\n \tcflags = default_cflags\n \tobjs = [] # other object files to link against, used e.g. for\n@@ -103,6 +104,8 @@ foreach l:libraries\n \t\tenabled_libs += name\n \t\tdpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)\n \t\tinstall_headers(headers)\n+\t\tinstall_headers(headers_no_chkincs)\n+\t\tdpdk_chkinc_headers += headers\n \n \t\tlibname = 'rte_' + name\n \t\tincludes += include_directories(dir_name)\ndiff --git a/meson.build b/meson.build\nindex 2b9c37eb42..e6e34d0a98 100644\n--- a/meson.build\n+++ b/meson.build\n@@ -16,6 +16,7 @@ cc = meson.get_compiler('c')\n dpdk_conf = configuration_data()\n dpdk_libraries = []\n dpdk_static_libraries = []\n+dpdk_chkinc_headers = []\n dpdk_driver_classes = []\n dpdk_drivers = []\n dpdk_extra_ldflags = []\ndiff --git a/meson_options.txt b/meson_options.txt\nindex 4604328224..5c382487da 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -1,5 +1,7 @@\n # Please keep these options sorted alphabetically.\n \n+option('check_includes', type: 'boolean', value: false,\n+\tdescription: 'build \"chkincs\" to verify each header file can compile alone')\n option('disable_drivers', type: 'string', value: '',\n \tdescription: 'Comma-separated list of drivers to explicitly disable.')\n option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',\n",
    "prefixes": [
        "v5",
        "5/8"
    ]
}