Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/102700/?format=api
http://patches.dpdk.org/api/patches/102700/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/20211022205531.9966-1-david.marchand@redhat.com/", "project": { "id": 1, "url": "http://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": "<20211022205531.9966-1-david.marchand@redhat.com>", "list_archive_url": "https://inbox.dpdk.org/dev/20211022205531.9966-1-david.marchand@redhat.com", "date": "2021-10-22T20:55:31", "name": "devtools: refuse indent with tabs in Meson", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "d0499d7e1ac00049ee88cbfaf03427f9a3bfb727", "submitter": { "id": 1173, "url": "http://patches.dpdk.org/api/people/1173/?format=api", "name": "David Marchand", "email": "david.marchand@redhat.com" }, "delegate": { "id": 24651, "url": "http://patches.dpdk.org/api/users/24651/?format=api", "username": "dmarchand", "first_name": "David", "last_name": "Marchand", "email": "david.marchand@redhat.com" }, "mbox": "http://patches.dpdk.org/project/dpdk/patch/20211022205531.9966-1-david.marchand@redhat.com/mbox/", "series": [ { "id": 19926, "url": "http://patches.dpdk.org/api/series/19926/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/list/?series=19926", "date": "2021-10-22T20:55:31", "name": "devtools: refuse indent with tabs in Meson", "version": 1, "mbox": "http://patches.dpdk.org/series/19926/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/102700/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/102700/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 20CF6A0C43;\n\tFri, 22 Oct 2021 22:56:41 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id CE6254069D;\n\tFri, 22 Oct 2021 22:56:40 +0200 (CEST)", "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [216.205.24.124])\n by mails.dpdk.org (Postfix) with ESMTP id 030B040150\n for <dev@dpdk.org>; Fri, 22 Oct 2021 22:56:39 +0200 (CEST)", "from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com\n [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id\n us-mta-297-yeL9K6k7OMWejaPL2Rf4Vg-1; Fri, 22 Oct 2021 16:56:36 -0400", "from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com\n [10.5.11.22])\n (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n (No client certificate requested)\n by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B9DE61808318;\n Fri, 22 Oct 2021 20:56:34 +0000 (UTC)", "from dmarchan.remote.csb (unknown [10.40.192.67])\n by smtp.corp.redhat.com (Postfix) with ESMTP id 9686F100E125;\n Fri, 22 Oct 2021 20:56:32 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1634936199;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding;\n bh=ztIk1tvixzOlTssk+rDSdvWcvF3iK79QrDDhbukZ+fc=;\n b=hbHl4uVhjQCp7tch9VHSoL4E/1IRRl8aAI8Xi9YM59wrar1K4Y9VMwK5OGf5Dx07HvCey8\n izr9LsR8av0s/gg+7P1iQ/CwfxZRBXo75UCvdAX06GNa9lMDnEuN+bYOJ3c8vmklj3/3Vb\n 4NlBj9CgsFKbwRA6ANGzyHAWCWEBdF0=", "X-MC-Unique": "yeL9K6k7OMWejaPL2Rf4Vg-1", "From": "David Marchand <david.marchand@redhat.com>", "To": "dev@dpdk.org", "Cc": "thomas@monjalon.net,\n\tbruce.richardson@intel.com", "Date": "Fri, 22 Oct 2021 22:55:31 +0200", "Message-Id": "<20211022205531.9966-1-david.marchand@redhat.com>", "MIME-Version": "1.0", "X-Scanned-By": "MIMEDefang 2.84 on 10.5.11.22", "Authentication-Results": "relay.mimecast.com;\n auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=david.marchand@redhat.com", "X-Mimecast-Spam-Score": "0", "X-Mimecast-Originator": "redhat.com", "Content-Transfer-Encoding": "8bit", "Content-Type": "text/plain; charset=\"US-ASCII\"", "Subject": "[dpdk-dev] [PATCH] devtools: refuse indent with tabs in Meson", "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": "The rule for indentation in Meson in DPDK is 4 spaces.\n\nAny tab should be flagged as an issue, let's extend the check and fix\nexisting offenders.\n\nFixes: 4ad4b20a7905 (\"drivers: change indentation in build files\")\nFixes: 2457705e6474 (\"crypto/cnxk: add driver skeleton\")\nFixes: 634b73104482 (\"app/testpmd: build on Windows\")\nFixes: 3a6bfc37eaf4 (\"net/ice: support QoS config VF bandwidth in DCF\")\nFixes: 8ef09fdc506b (\"build: add optional NUMA and CPU counts detection\")\nFixes: e1369718f553 (\"common/octeontx: enable build only on 64-bit Linux\")\nFixes: 2b504721bfda (\"app/bbdev: enable la12xx\")\n\nSigned-off-by: David Marchand <david.marchand@redhat.com>\n---\n app/pdump/meson.build | 6 +--\n app/proc-info/meson.build | 6 +--\n app/test-acl/meson.build | 6 +--\n app/test-bbdev/meson.build | 8 ++--\n app/test-cmdline/meson.build | 6 +--\n app/test-compress-perf/meson.build | 6 +--\n app/test-crypto-perf/meson.build | 6 +--\n app/test-eventdev/meson.build | 6 +--\n app/test-fib/meson.build | 6 +--\n app/test-flow-perf/meson.build | 6 +--\n app/test-pipeline/meson.build | 6 +--\n app/test-regex/meson.build | 6 +--\n app/test-sad/meson.build | 6 +--\n app/test/meson.build | 6 +--\n config/meson.build | 58 +++++++++++++--------------\n devtools/check-meson.py | 3 ++\n drivers/compress/octeontx/meson.build | 6 +--\n drivers/crypto/cnxk/meson.build | 6 +--\n drivers/crypto/qat/meson.build | 2 +-\n drivers/net/ice/meson.build | 2 +-\n 20 files changed, 83 insertions(+), 80 deletions(-)", "diff": "diff --git a/app/pdump/meson.build b/app/pdump/meson.build\nindex db1fcadbfe..fb282bba1f 100644\n--- a/app/pdump/meson.build\n+++ b/app/pdump/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2018 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files('main.c')\ndiff --git a/app/proc-info/meson.build b/app/proc-info/meson.build\nindex 82ed05bb0b..1062e0ef86 100644\n--- a/app/proc-info/meson.build\n+++ b/app/proc-info/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2018 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files('main.c')\ndiff --git a/app/test-acl/meson.build b/app/test-acl/meson.build\nindex 14d36b33e9..c0dc4b221a 100644\n--- a/app/test-acl/meson.build\n+++ b/app/test-acl/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2019 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files('main.c')\ndiff --git a/app/test-bbdev/meson.build b/app/test-bbdev/meson.build\nindex a726a5b3fa..76d4c26999 100644\n--- a/app/test-bbdev/meson.build\n+++ b/app/test-bbdev/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2018 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files(\n@@ -24,5 +24,5 @@ if dpdk_conf.has('RTE_BASEBAND_ACC100')\n deps += ['baseband_acc100']\n endif\n if dpdk_conf.has('RTE_LIBRTE_PMD_BBDEV_LA12XX')\n-\tdeps += ['baseband_la12xx']\n+ deps += ['baseband_la12xx']\n endif\ndiff --git a/app/test-cmdline/meson.build b/app/test-cmdline/meson.build\nindex 0898821200..6027f67919 100644\n--- a/app/test-cmdline/meson.build\n+++ b/app/test-cmdline/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2019 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files('commands.c', 'cmdline_test.c')\ndiff --git a/app/test-compress-perf/meson.build b/app/test-compress-perf/meson.build\nindex f29c6ee863..34dcfe5b8e 100644\n--- a/app/test-compress-perf/meson.build\n+++ b/app/test-compress-perf/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2018 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files(\ndiff --git a/app/test-crypto-perf/meson.build b/app/test-crypto-perf/meson.build\nindex ef3582a87c..7b02b518f0 100644\n--- a/app/test-crypto-perf/meson.build\n+++ b/app/test-crypto-perf/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2018 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files(\ndiff --git a/app/test-eventdev/meson.build b/app/test-eventdev/meson.build\nindex 17be360677..ab8769c755 100644\n--- a/app/test-eventdev/meson.build\n+++ b/app/test-eventdev/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2017 Cavium, Inc\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files(\ndiff --git a/app/test-fib/meson.build b/app/test-fib/meson.build\nindex 3360ea02b0..eb36772cf3 100644\n--- a/app/test-fib/meson.build\n+++ b/app/test-fib/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2019 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files('main.c')\ndiff --git a/app/test-flow-perf/meson.build b/app/test-flow-perf/meson.build\nindex a33cad9078..766e4516ad 100644\n--- a/app/test-flow-perf/meson.build\n+++ b/app/test-flow-perf/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2020 Mellanox Technologies, Ltd\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files(\ndiff --git a/app/test-pipeline/meson.build b/app/test-pipeline/meson.build\nindex 7d123e32fb..3add6b637b 100644\n--- a/app/test-pipeline/meson.build\n+++ b/app/test-pipeline/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2019 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files(\ndiff --git a/app/test-regex/meson.build b/app/test-regex/meson.build\nindex 02b101980e..e3ba060e55 100644\n--- a/app/test-regex/meson.build\n+++ b/app/test-regex/meson.build\n@@ -2,9 +2,9 @@\n # Copyright 2020 Mellanox Technologies, Ltd\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files('main.c')\ndiff --git a/app/test-sad/meson.build b/app/test-sad/meson.build\nindex 3d15727a01..a50616a9c7 100644\n--- a/app/test-sad/meson.build\n+++ b/app/test-sad/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2019 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n sources = files('main.c')\ndiff --git a/app/test/meson.build b/app/test/meson.build\nindex 20f36a1803..3d9470df23 100644\n--- a/app/test/meson.build\n+++ b/app/test/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2017 Intel Corporation\n \n if is_windows\n-\tbuild = false\n-\treason = 'not supported on Windows'\n-\tsubdir_done()\n+ build = false\n+ reason = 'not supported on Windows'\n+ subdir_done()\n endif\n \n if not get_option('tests')\ndiff --git a/config/meson.build b/config/meson.build\nindex 4cdf589e20..7073a9adff 100644\n--- a/config/meson.build\n+++ b/config/meson.build\n@@ -322,47 +322,47 @@ endif\n \n max_lcores = get_option('max_lcores')\n if max_lcores == 'detect'\n-\t# discovery makes sense only for non-cross builds\n-\tif meson.is_cross_build()\n-\t\terror('Discovery of max_lcores is not supported for cross-compilation.')\n-\tendif\n-\t# overwrite the default value with discovered values\n-\tmax_lcores = run_command(get_cpu_count_cmd).stdout().to_int()\n-\tmin_lcores = 2\n-\t# DPDK must be built for at least 2 cores\n-\tif max_lcores < min_lcores\n-\t\tmessage('Found less than @0@ cores, building for @0@ cores'.format(min_lcores))\n-\t\tmax_lcores = min_lcores\n-\telse\n-\t\tmessage('Found @0@ cores'.format(max_lcores))\n-\tendif\n-\tdpdk_conf.set('RTE_MAX_LCORE', max_lcores)\n+ # discovery makes sense only for non-cross builds\n+ if meson.is_cross_build()\n+ error('Discovery of max_lcores is not supported for cross-compilation.')\n+ endif\n+ # overwrite the default value with discovered values\n+ max_lcores = run_command(get_cpu_count_cmd).stdout().to_int()\n+ min_lcores = 2\n+ # DPDK must be built for at least 2 cores\n+ if max_lcores < min_lcores\n+ message('Found less than @0@ cores, building for @0@ cores'.format(min_lcores))\n+ max_lcores = min_lcores\n+ else\n+ message('Found @0@ cores'.format(max_lcores))\n+ endif\n+ dpdk_conf.set('RTE_MAX_LCORE', max_lcores)\n elif max_lcores != 'default'\n-\t# overwrite the default value from arch_subdir with user input\n-\tdpdk_conf.set('RTE_MAX_LCORE', max_lcores.to_int())\n+ # overwrite the default value from arch_subdir with user input\n+ dpdk_conf.set('RTE_MAX_LCORE', max_lcores.to_int())\n endif\n \n max_numa_nodes = get_option('max_numa_nodes')\n if max_numa_nodes == 'detect'\n-\t# discovery makes sense only for non-cross builds\n-\tif meson.is_cross_build()\n-\t\terror('Discovery of max_numa_nodes not supported for cross-compilation.')\n-\tendif\n-\t# overwrite the default value with discovered values\n-\tmax_numa_nodes = run_command(get_numa_count_cmd).stdout().to_int()\n-\tmessage('Found @0@ numa nodes'.format(max_numa_nodes))\n-\tdpdk_conf.set('RTE_MAX_NUMA_NODES', max_numa_nodes)\n+ # discovery makes sense only for non-cross builds\n+ if meson.is_cross_build()\n+ error('Discovery of max_numa_nodes not supported for cross-compilation.')\n+ endif\n+ # overwrite the default value with discovered values\n+ max_numa_nodes = run_command(get_numa_count_cmd).stdout().to_int()\n+ message('Found @0@ numa nodes'.format(max_numa_nodes))\n+ dpdk_conf.set('RTE_MAX_NUMA_NODES', max_numa_nodes)\n elif max_numa_nodes != 'default'\n-\t# overwrite the default value from arch_subdir with user input\n-\tdpdk_conf.set('RTE_MAX_NUMA_NODES', max_numa_nodes.to_int())\n+ # overwrite the default value from arch_subdir with user input\n+ dpdk_conf.set('RTE_MAX_NUMA_NODES', max_numa_nodes.to_int())\n endif\n \n # check that CPU and NUMA counts are set\n if not dpdk_conf.has('RTE_MAX_LCORE')\n-\terror('Number of CPU cores not specified.')\n+ error('Number of CPU cores not specified.')\n endif\n if not dpdk_conf.has('RTE_MAX_NUMA_NODES')\n-\terror('Number of NUMA nodes not specified.')\n+ error('Number of NUMA nodes not specified.')\n endif\n \n # set the install path for the drivers\ndiff --git a/devtools/check-meson.py b/devtools/check-meson.py\nindex 29f7887968..4b2338828d 100755\n--- a/devtools/check-meson.py\n+++ b/devtools/check-meson.py\n@@ -8,6 +8,7 @@\n \n import sys\n import os\n+import re\n from os.path import relpath, join\n from argparse import ArgumentParser\n \n@@ -50,6 +51,8 @@ def check_indentation(filename, contents):\n code, comments = split_code_comments(line)\n if not code.strip():\n continue\n+ if re.match('^ *\\t', code):\n+ print(f'Error parsing {filename}:{lineno}, got some tabulation')\n if code.endswith('files('):\n if infiles:\n raise(f'Error parsing {filename}:{lineno}, got \"files(\" when already parsing files list')\ndiff --git a/drivers/compress/octeontx/meson.build b/drivers/compress/octeontx/meson.build\nindex cd8687fde3..3a29c3e609 100644\n--- a/drivers/compress/octeontx/meson.build\n+++ b/drivers/compress/octeontx/meson.build\n@@ -2,9 +2,9 @@\n # Copyright(c) 2018 Cavium, Inc\n \n if not is_linux or not dpdk_conf.get('RTE_ARCH_64')\n-\tbuild = false\n-\treason = 'only supported on 64-bit Linux'\n-\tsubdir_done()\n+ build = false\n+ reason = 'only supported on 64-bit Linux'\n+ subdir_done()\n endif\n \n sources = files('otx_zip.c', 'otx_zip_pmd.c')\ndiff --git a/drivers/crypto/cnxk/meson.build b/drivers/crypto/cnxk/meson.build\nindex 024109f7e9..23a1cc3aac 100644\n--- a/drivers/crypto/cnxk/meson.build\n+++ b/drivers/crypto/cnxk/meson.build\n@@ -3,9 +3,9 @@\n #\n \n if not is_linux or not dpdk_conf.get('RTE_ARCH_64')\n-\tbuild = false\n-\treason = 'only supported on 64-bit Linux'\n-\tsubdir_done()\n+ build = false\n+ reason = 'only supported on 64-bit Linux'\n+ subdir_done()\n endif\n \n sources = files(\ndiff --git a/drivers/crypto/qat/meson.build b/drivers/crypto/qat/meson.build\nindex b3b2d17258..544f481067 100644\n--- a/drivers/crypto/qat/meson.build\n+++ b/drivers/crypto/qat/meson.build\n@@ -19,7 +19,7 @@ if dep.found()\n 'qat_sym_hw_dp.c',\n 'qat_sym_pmd.c',\n 'qat_sym_session.c',\n-\t)\n+ )\n qat_ext_deps += dep\n qat_cflags += '-DBUILD_QAT_SYM'\n qat_cflags += '-DBUILD_QAT_ASYM'\ndiff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build\nindex 0b86d74a49..be15a2ed02 100644\n--- a/drivers/net/ice/meson.build\n+++ b/drivers/net/ice/meson.build\n@@ -71,6 +71,6 @@ sources += files('ice_dcf.c',\n 'ice_dcf_vf_representor.c',\n 'ice_dcf_ethdev.c',\n 'ice_dcf_parent.c',\n-\t 'ice_dcf_sched.c')\n+ 'ice_dcf_sched.c')\n \n headers = files('rte_pmd_ice.h')\n", "prefixes": [] }{ "id": 102700, "url": "