From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 00C6D5587 for ; Wed, 6 Sep 2017 18:58:21 +0200 (CEST) Received: by mail-pf0-f180.google.com with SMTP id g13so13689152pfm.2 for ; Wed, 06 Sep 2017 09:58:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=ducYLHaaRhgR/OfUBQXKGnmwSD3SlbqjdfTv+Hfi5aE=; b=m0j0OR31bovhHdlg5U7F2Kl3w5WxAGWMZWHic97LaSc9bbDTHfJXbz73Ue2rT4XsVj yTtWE1fdO8zZ4NSDMRuFrZtwLt9UYPK9rnjxxXJBP7acWvYK6/MKjYpF2E8IRkfaInRQ U2QVf/8rJ0BjoSelgFct8bEXyY9HanKIs/O23OS9fk1VMRGTWELZLNu/p8zq6usR39/0 cktQWyex4JNjUUhYv74ZPKi+yUqWRn73PnMg3DqYn4PYOgzzTXOmOQZ7vhX4p49w8ISX OsgpO9LyiL5CDvQ02iqsDizp4trhXMR8ak1lZlZlWES0aT6VOSygBEGgIwljmGMN1+2p /Akw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-transfer-encoding; bh=ducYLHaaRhgR/OfUBQXKGnmwSD3SlbqjdfTv+Hfi5aE=; b=l1be6mK+hT8w+xXWWg/AoQf41GpfMPJIP2SvUIbOEz2g7plvGDIFWVENgM70wRWRAK LHHvV/rhqNbb5Bcj9EStTUnz5Fs3kPuhHwMReTzwMToWIvTo/nfAJrfnemPbbCsglSHk hDt1y3Y8H7fUH0swXszfCNi4ATVQ7zlCmD3OBZD59mPcdOVamUdAJ2ZCgfxvSoGYWiGk UcvMFME6TyFiq5gBuJTgRot0DDfUKVfrPABLUBCMWMKC16thRE+HmSxFUMNXjYaLxDaY nNyrBJ0P0vcuouOmw16EED0tHEDlh7fB68lKVXtR/u2WGFwxs8y7UUQzxJH06tujobzi fiUw== X-Gm-Message-State: AHPjjUgwISKtS9zMhi28hQptUfFEaBcngRgyM5AFW/7C54lcZGnzVh8i uQQPkQa5IGml2yZ4LtkOdQ== X-Google-Smtp-Source: ADKCNb4cYUbxWJH6xeOhBkA9gLrQSbB+plhQNeTyxiqnF9wD0W7rdn+CEWhueR6lupj5Wd30J/y7Zw== X-Received: by 10.101.85.4 with SMTP id f4mr1464276pgr.10.1504717101041; Wed, 06 Sep 2017 09:58:21 -0700 (PDT) Received: from xeon-e3 (76-14-207-240.or.wavecable.com. [76.14.207.240]) by smtp.gmail.com with ESMTPSA id v16sm387236pfk.61.2017.09.06.09.58.20 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 06 Sep 2017 09:58:20 -0700 (PDT) Date: Wed, 6 Sep 2017 09:58:14 -0700 From: Stephen Hemminger To: dev@dpdk.org Message-ID: <20170906095814.7fc16530@xeon-e3> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [dpdk-dev] [RFC] Include what you use X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 16:58:22 -0000 I tried running iwyu on DPDK source and discovered lots of extra includes (not surprising). https://github.com/include-what-you-use/include-what-you-use/blob/master/README.md Some example output: /home/shemminger/dpdk/base/lib/librte_eal/linuxapp/eal/eal.c should remove these lines: - #include // lines 43-43 - #include // lines 79-79 - #include // lines 71-71 - #include // lines 75-75 - #include // lines 76-76 - #include // lines 72-72 - #include // lines 59-59 - #include // lines 74-74 - #include // lines 64-64 - #include // lines 77-77 - #include // lines 50-50 - #include // lines 42-42 The full include-list for /home/shemminger/dpdk/base/lib/librte_eal/linuxapp/eal/eal.c: #include // for ::_ISdigit, ::_ISprint, isdigit #include // for __errno_location, errno, ENOTSUP #include // for open, fcntl, O_RDWR, F_SETLK #include // for PATH_MAX #include // for pthread_create, pthread_self #include // for rte_atomic32_test_and_set #include // for rte_bus_probe, rte_bus_scan #include // for rte_exit, RTE_ALIGN_FLOOR, RTE... #include // for rte_rdtsc #include // for rte_panic #include // for rte_config, rte_proc_type_t::R... #include // for rte_mem_config, rte_eal_mcfg_w... #include // for per_lcore__rte_errno, rte_errno #include // for rte_eal_mp_remote_launch, rte_... #include // for lcore_config, rte_lcore_to_soc... #include // for RTE_LOG, RTE_LOGTYPE_EAL, RTE_... #include // for rte_eal_get_physmem_layout #include // for rte_srand #include // for rte_service_init, rte_service_... #include // for rte_strsplit #include // for uint64_t, uintptr_t #include // for NULL, fclose, printf, snprintf #include // for strtoull, exit, strtoul, EXIT_... #include // for strerror, memcpy, strrchr, strcmp #include // for flock, LOCK_UN #include // for iopl #include // for MAP_FAILED, MAP_SHARED, PROT_READ #include // for stat #include // for optarg, optind, close, getopt_... #include "eal_filesystem.h" // for eal_runtime_config_path #include "eal_hugepages.h" // for eal_hugepage_info_init #include "eal_internal_cfg.h" // for internal_config, hugepage_info #include "eal_options.h" // for eal_parse_common_option, OPT_S... #include "eal_private.h" // for rte_eal_alarm_init, rte_eal_cp... #include "eal_thread.h" // for RTE_CPU_AFFINITY_STR_LEN, eal_... #include "eal_vfio.h" // for VFIO_PRESENT, pci_vfio_enable #include "generic/rte_atomic.h" // for rte_atomic32_clear, RTE_ATOMIC... #include "generic/rte_cpuflags.h" // for rte_cpu_is_supported #include "rte_config.h" // for RTE_MAX_NUMA_NODES, RTE_ARCH_X86 #include "rte_pci_dev_feature_defs.h" // for rte_intr_mode::RTE_INTR_MODE_L... It would good someone did a full scan and send patches to do the cleanup. P.S: I am okay with C++ style comments on the includes. PPS: But prefer order of standard includes, sys/ rte_... then local include files