From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 670DD606A31C for ; Sun, 29 Nov 2026 20:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=networkplumber-org.20260707.gappssmtp.com header.i=@networkplumber-org.20260707.gappssmtp.com header.a=rsa-sha256 header.s=20260707 header.b=CjUMOWKQ Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 732B340272; Sun, 29 Nov 2026 21:50:12 +0100 (CET) Received: from mail-pj1-f44.google.com (mail-pj1-f44.google.com [209.85.216.44]) by mails.dpdk.org (Postfix) with ESMTPS id 898E040272 for ; Sun, 29 Nov 2026 21:50:11 +0100 (CET) Received: by mail-pj1-f44.google.com with SMTP id 98e67ed59e1d1-3b520f1604fso1294960a91.2 for ; Sun, 29 Nov 2026 12:50:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20260707.gappssmtp.com; s=20260707; t=1795985410; x=1796590210; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=MCqITQH8PBdgq62Fa9DCcI9h5vHHL0wDf/ES0x/TkHo=; b=CjUMOWKQRBDL6WAfSoWfl5ol3OkaqOPYEWLJgdIgmO0CYrfTiw4xLIripi+UFLXKm4 /e5p0GDDRypafkz106QdYRXlxniS7I5Hyn5ETxZ5oMj/F9mg3537QnI3vac8Ef4rDG8l fb/cUgV+74vs5Ij9/t3JotjmgStQCjBemMomiQwZBPmyWyICjiWmqFHIc7ytQr01qm6w ZwlYUkIHC4i2s96eB/3SGPf13rj8s/kQJ2BoxincCTHyxA33qJ6pO5GCrRXZbPL4BIuE lZE4pLsfYzXNLWgfvDoG30i7OxkH7FKerlm5uB9ppI8Y7iuDrzI1GRUbIsgnyzCsGw4P t91w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795985410; x=1796590210; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MCqITQH8PBdgq62Fa9DCcI9h5vHHL0wDf/ES0x/TkHo=; b=jeAd03R8Gh9RUFXc/6fGgZEMqGueOLjxK2uRbIAT7RWD5Qhz0OXHn9x5qtt6nKu+8G 5nHiSsLWdx4z4ALBu/zEPswFmE6uLfoi0A+wGMQa5Y2ghEMQkotYgj2xy3zzGgwDFTnO kSZ/4J14Hm8Gt85I95bgmu6xk5LZwyAttY5IQfgrhuehZouargtPhZYtymTyBZ9to6pu vComUnsxQastiZF1y3fVcxn3WWe2BY81V6e1hMj01G5VQTC3t8i6evR8xEZ72bxgxkt9 v2I40W+CPSV4hstKDxueGaquifKyLw+M2mMiyrPtnaoHfmBUD5/dtoWDc0uuxoWpzFRI h8ug== X-Gm-Message-State: APuU4Z9zDmJ/RbIZ8TYXbahpJvgVuTSZsRFlJkkGIutfQTxUjqkO2pzH NAIhMmcP690QM2S8ypRGXTz3YS3pRyaZSrA5+DSqpX3SkoxgtGeDnFUKod8PAtG6IOOc3INmAPD 7W+dk X-Gm-Gg: AZFdTZck+QO1rxForAC8aVL2GjGig87aqw0K9Z4/hyax474HiE26NC0h+1f1zD1O7Ae IImzoaWwbQgP5nB6vjA9L1m8gGc9ufRMLnBRpCmLY6WuAAkjNUU+BeeHJL1qEVm9R/vI3Hkj3Vg 3oor81HxY3PFDW+wH1OJ5Ln3hYzrQLYlrsHFlUqpH9Brz5F2t6BUcwqx69Wbwe0aQosmbJZmQOV Ej+oO3WRbeaW05RFRxtF3ojK05/BepuoKwsNc10WbyBhm17WOVrRevDps/E902NG6LUAvqtB6zm 98YpQmRLvc2mONagvZBx3WW6DGFr1oBRDjQzinAQbVVNDqGt3VhAGUPzMOZJKNv/OnBzo/P18AV U5p31iy9ODvH/lzbLur9mbc6hI8pQWvjFRcHpUzUPCXYC9EkyKtgqkWQMluC6tE9BHZaO5dip7I Bb9yh9tX51lBQO/rDEW+wQWZfafp4QD4da7m0keYrlELjkyBT1FPmYxlSa0M2d9VgV2kQ/7GXhF sf5TlRDtbF2KXylxpq6dTvViB+g+BqE2tYXKLt+mTqj9CDepM/RXTWslyj9VDsOr+pvtkIL6aNx cbSjiYb6f+fmLpuk4HlkbkagSq5QlAdjm4jGu2oBI2uDL4Iyk2E45jPH5zPp031kzS0W X-Received: by 2002:a17:90a:d2c6:b0:3ac:4e18:237c with SMTP id 98e67ed59e1d1-3b41c57565emr34429601a91.0.1795985409457; Sun, 29 Nov 2026 12:50:09 -0800 (PST) Received: from phoenix.lan (204-195-112-43.wavecable.com. [204.195.112.43]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b50234fb25sm10383968a91.2.2026.11.29.12.50.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 12:50:08 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH 00/45] remove unused internal symbols and dead code Date: Sun, 29 Nov 2026 12:48:45 -0800 Message-ID: <20261129205006.1440292-1-stephen@networkplumber.org> X-Mailer: git-send-email 2.53.0 X-Archived-By: 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 List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-11.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 This series began while looking at -Wunreachable-code results for the drivers in common/. There were multiple places where symbols were exported for use outside their library but had no users. The process was: - drop unused internal symbols - localize symbols where possible. Make globals static etc. - remove unused code. The result is: - RTE_EXPORT_INTERNAL_SYMBOL drops from 1753 to 1374. - 198 functions with no caller removed, plus 19 helpers that only existed to serve them. - 38 cases where global function could be static - 3 export entries for variables that no longer existed - 4 internal declarations gone from the installed headers rte_thash.h and rte_interrupts.h - about 7700 lines gone Build tested with gcc and clang, shared and static, default and minsize, plus the standalone tests. I don't have the dpaa, cnxk, mlx5 or sfc hardware, but there are no behaviour changes here: every patch deletes an uncalled function, drops an export annotation, or adds a static keyword. The one exception is a single line initializing an output parameter that gcc -Os could no longer prove was set once its function became static. This may break users of out-of-tree drivers that are using internal symbols. But that was never part of DPDK officially supported policy. Left alone deliberately: bus/cdx and raw/cnxk_rvu_lf, whose whole driver-facing API looks unused only because neither has an in-tree consumer. These drivers are really placeholders now. Only rte_cdx_unregister() goes, with the other bus unregister functions. Stephen Hemminger (45): bus/vmbus: do not export unused internal symbol bus/dpaa: remove exports for nonexistent symbols ethdev: do not export internal dummy ops hash: do not export internal toeplitz helper cryptodev: do not export internal device name helper mldev: do not export internal PMD device helpers gpudev: do not export unused internal functions eal/linux: do not export internal VFIO helpers eal/linux: remove unused VFIO device number helper eal: make per-thread epoll instance getter static bus: do not export unused driver unregister functions bus/fslmc: do not export internal symbols used only in the bus bus/dpaa: do not export internal symbols used only in the bus common/dpaax: do not export IOVA table dump helper net/nfb: do not export MDIO speed capability helper common/sxe2: do not export internal ioctl channel helpers common/mlx5: do not export internal symbols used only in common code net/idpf: do not export internal symbols used only in the driver net/iavf: do not export VF reset function eal: do not export unused Windows interrupt handle accessors common/cnxk: do not export internal symbols used only in roc common/sfc_efx: do not export internal symbols unused outside base crypto/cnxk: do not export internal Rx inject helpers net/cnxk: do not export inline inbound mode setter common/sfc_efx: remove unused libefx functions common/cnxk: remove unused roc functions common/mlx5: remove unused internal functions bus/fslmc: remove unused VFIO helpers bus/dpaa: remove unused FMan and netcfg helpers common/dpaax: remove unused IOVA table dump net/idpf: remove unused queue enable helper gpudev: remove unused attach function cryptodev: remove unused device name helper common/cnxk: remove unused MCS port recovery bus/dpaa: remove unused QMan and BMan functions bus/fslmc: remove unused MC object functions eal: remove unused Windows interrupt handle accessors common/sfc_efx: make efx_family static gpudev: make event notify helper static mldev: make device lookup helper static bus/fslmc: make internal helpers static net/cnxk: make inline inbound mode setter static common/sxe2: make memory event callback static net/idpf: make internal burst functions static common/cnxk: make internal roc functions static drivers/bus/cdx/bus_cdx_driver.h | 1 - drivers/bus/cdx/cdx.c | 1 - drivers/bus/dpaa/base/fman/fman_hw.c | 34 -- drivers/bus/dpaa/base/fman/netcfg_layer.c | 11 - drivers/bus/dpaa/base/qbman/bman.c | 40 -- drivers/bus/dpaa/base/qbman/bman_driver.c | 11 - drivers/bus/dpaa/base/qbman/dpaa_alloc.c | 5 - drivers/bus/dpaa/base/qbman/qman.c | 110 ---- drivers/bus/dpaa/bus_dpaa_driver.h | 1 - drivers/bus/dpaa/dpaa_bus.c | 1 - drivers/bus/dpaa/dpaa_bus_base_symbols.c | 16 - drivers/bus/dpaa/include/fsl_bman.h | 10 +- drivers/bus/dpaa/include/fsl_fman.h | 4 - drivers/bus/dpaa/include/fsl_qman.h | 121 ----- drivers/bus/dpaa/include/fsl_usd.h | 4 - drivers/bus/dpaa/include/netcfg.h | 3 - drivers/bus/fslmc/bus_fslmc_driver.h | 16 - drivers/bus/fslmc/fslmc_bus.c | 1 - drivers/bus/fslmc/fslmc_vfio.c | 42 +- drivers/bus/fslmc/mc/dpbp.c | 78 --- drivers/bus/fslmc/mc/dpci.c | 99 ---- drivers/bus/fslmc/mc/dpcon.c | 50 -- drivers/bus/fslmc/mc/dpio.c | 138 ----- drivers/bus/fslmc/mc/dprc.c | 1 - drivers/bus/fslmc/mc/fsl_dpbp.h | 12 - drivers/bus/fslmc/mc/fsl_dpci.h | 16 - drivers/bus/fslmc/mc/fsl_dpcon.h | 13 - drivers/bus/fslmc/mc/fsl_dpio.h | 31 -- drivers/bus/fslmc/mc/fsl_dprc.h | 1 - drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 8 - drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 4 +- drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 3 - drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 6 - .../fslmc/qbman/include/fsl_qbman_portal.h | 25 - drivers/bus/fslmc/qbman/qbman_portal.c | 22 - drivers/bus/ifpga/bus_ifpga_driver.h | 1 - drivers/bus/ifpga/ifpga_bus.c | 1 - drivers/bus/platform/bus_platform_driver.h | 1 - drivers/bus/platform/platform.c | 1 - drivers/bus/uacce/bus_uacce_driver.h | 1 - drivers/bus/uacce/uacce.c | 1 - drivers/bus/vdev/bus_vdev_driver.h | 1 - drivers/bus/vdev/vdev.c | 1 - drivers/bus/vmbus/bus_vmbus_driver.h | 1 - drivers/bus/vmbus/vmbus_common.c | 1 - drivers/common/cnxk/cnxk_security.c | 37 +- drivers/common/cnxk/cnxk_security.h | 15 - drivers/common/cnxk/roc_aes.h | 2 +- drivers/common/cnxk/roc_bphy_irq.c | 2 +- drivers/common/cnxk/roc_bphy_irq.h | 2 - drivers/common/cnxk/roc_cpt.c | 50 -- drivers/common/cnxk/roc_cpt.h | 10 +- drivers/common/cnxk/roc_cpt_debug.c | 22 - drivers/common/cnxk/roc_dpi.c | 99 ---- drivers/common/cnxk/roc_dpi.h | 5 - drivers/common/cnxk/roc_hash.h | 8 +- drivers/common/cnxk/roc_idev.c | 40 -- drivers/common/cnxk/roc_idev.h | 20 +- drivers/common/cnxk/roc_ie_ow.h | 2 +- drivers/common/cnxk/roc_mcs.c | 511 ------------------ drivers/common/cnxk/roc_mcs.h | 36 -- drivers/common/cnxk/roc_mcs_sec_cfg.c | 95 ---- drivers/common/cnxk/roc_ml.c | 112 +--- drivers/common/cnxk/roc_ml.h | 11 - drivers/common/cnxk/roc_nix.c | 12 +- drivers/common/cnxk/roc_nix.h | 124 +---- drivers/common/cnxk/roc_nix_bpf.c | 270 --------- drivers/common/cnxk/roc_nix_fc.c | 231 +------- drivers/common/cnxk/roc_nix_inl.c | 161 +----- drivers/common/cnxk/roc_nix_inl.h | 17 +- drivers/common/cnxk/roc_nix_inl_dev.c | 90 --- drivers/common/cnxk/roc_nix_mac.c | 65 --- drivers/common/cnxk/roc_nix_mcast.c | 117 ---- drivers/common/cnxk/roc_nix_ops.c | 45 +- drivers/common/cnxk/roc_nix_ptp.c | 9 - drivers/common/cnxk/roc_nix_queue.c | 364 ------------- drivers/common/cnxk/roc_nix_rss.c | 2 +- drivers/common/cnxk/roc_nix_stats.c | 6 - drivers/common/cnxk/roc_nix_tm_ops.c | 259 +-------- drivers/common/cnxk/roc_nix_tm_utils.c | 51 -- drivers/common/cnxk/roc_nix_vlan.c | 243 --------- drivers/common/cnxk/roc_npa.c | 252 +-------- drivers/common/cnxk/roc_npa.h | 37 +- drivers/common/cnxk/roc_npa_debug.c | 39 -- drivers/common/cnxk/roc_npc.c | 119 +--- drivers/common/cnxk/roc_npc.h | 19 +- drivers/common/cnxk/roc_platform.c | 3 - drivers/common/cnxk/roc_platform.h | 1 - .../common/cnxk/roc_platform_base_symbols.c | 161 ------ drivers/common/cnxk/roc_ree.c | 87 +-- drivers/common/cnxk/roc_ree.h | 7 - drivers/common/cnxk/roc_rvu_lf.h | 2 +- drivers/common/cnxk/roc_sso.c | 66 +-- drivers/common/cnxk/roc_sso.h | 8 - drivers/common/dpaax/dpaax_iova_table.c | 42 -- drivers/common/dpaax/dpaax_iova_table.h | 2 - drivers/common/mlx5/mlx5_common.c | 1 - drivers/common/mlx5/mlx5_common_mp.c | 24 - drivers/common/mlx5/mlx5_common_mp.h | 6 - drivers/common/mlx5/mlx5_common_utils.c | 7 - drivers/common/mlx5/mlx5_common_utils.h | 3 - drivers/common/mlx5/mlx5_devx_cmds.c | 142 ----- drivers/common/mlx5/mlx5_devx_cmds.h | 18 - drivers/common/mlx5/mlx5_malloc.c | 1 - drivers/common/mlx5/mlx5_malloc.h | 1 - drivers/common/sfc_efx/base/efx.h | 400 -------------- drivers/common/sfc_efx/base/efx_ev.c | 78 --- drivers/common/sfc_efx/base/efx_evb.c | 146 ----- drivers/common/sfc_efx/base/efx_filter.c | 189 ------- drivers/common/sfc_efx/base/efx_hash.c | 160 ------ drivers/common/sfc_efx/base/efx_intr.c | 27 - drivers/common/sfc_efx/base/efx_mac.c | 43 -- drivers/common/sfc_efx/base/efx_mae.c | 30 - drivers/common/sfc_efx/base/efx_mcdi.c | 307 ----------- drivers/common/sfc_efx/base/efx_mcdi.h | 28 - drivers/common/sfc_efx/base/efx_mon.c | 81 --- drivers/common/sfc_efx/base/efx_nic.c | 132 +---- drivers/common/sfc_efx/base/efx_phy.c | 89 --- drivers/common/sfc_efx/base/efx_port.c | 15 - drivers/common/sfc_efx/base/efx_rx.c | 35 -- drivers/common/sfc_efx/base/efx_sram.c | 164 ------ drivers/common/sfc_efx/base/efx_tx.c | 155 ------ drivers/common/sfc_efx/base/efx_virtio.c | 37 -- drivers/common/sfc_efx/sfc_base_symbols.c | 73 --- drivers/common/sxe2/sxe2_common.c | 3 +- drivers/common/sxe2/sxe2_common.h | 5 - drivers/common/sxe2/sxe2_ioctl_chnl.c | 5 - drivers/common/sxe2/sxe2_ioctl_chnl_func.h | 5 - drivers/crypto/cnxk/cn10k_cryptodev_ops.c | 3 - drivers/crypto/cnxk/cn10k_cryptodev_ops.h | 2 - drivers/crypto/cnxk/cn20k_cryptodev_ops.c | 3 - drivers/crypto/cnxk/cn20k_cryptodev_ops.h | 2 - drivers/net/cnxk/cnxk_ethdev.c | 3 +- drivers/net/cnxk/cnxk_ethdev.h | 3 - drivers/net/intel/iavf/base/iavf_prototype.h | 1 - drivers/net/intel/iavf/iavf_base_symbols.c | 1 - drivers/net/intel/idpf/idpf_common_device.c | 1 - drivers/net/intel/idpf/idpf_common_device.h | 1 - drivers/net/intel/idpf/idpf_common_rxtx.c | 21 +- drivers/net/intel/idpf/idpf_common_rxtx.h | 28 - .../net/intel/idpf/idpf_common_rxtx_avx2.c | 3 - .../net/intel/idpf/idpf_common_rxtx_avx512.c | 4 - drivers/net/intel/idpf/idpf_common_virtchnl.c | 78 +-- drivers/net/intel/idpf/idpf_common_virtchnl.h | 11 - drivers/net/nfb/nfb_mdio.c | 1 - drivers/net/nfb/nfb_mdio.h | 1 - lib/cryptodev/cryptodev_pmd.h | 3 - lib/cryptodev/rte_cryptodev.c | 25 - lib/eal/common/eal_common_bus.c | 1 - lib/eal/common/eal_common_interrupts.c | 23 - lib/eal/common/eal_interrupts.h | 9 +- lib/eal/freebsd/eal_interrupts.c | 7 - lib/eal/include/bus_driver.h | 1 - lib/eal/include/rte_interrupts.h | 44 -- lib/eal/linux/eal_interrupts.c | 3 +- lib/eal/linux/eal_vfio.c | 37 -- lib/eal/linux/include/dev_vfio.h | 28 - lib/eal/windows/eal_interrupts.c | 7 - lib/ethdev/ethdev_driver.c | 4 - lib/ethdev/ethdev_driver.h | 4 - lib/gpudev/gpudev.c | 54 +- lib/gpudev/gpudev_driver.h | 8 - lib/hash/rte_thash.c | 1 + lib/hash/rte_thash.h | 13 - lib/hash/rte_thash_gf2_poly_math.c | 2 +- lib/hash/thash_private.h | 16 + lib/mldev/rte_mldev.c | 5 +- lib/mldev/rte_mldev_pmd.h | 17 - 168 files changed, 129 insertions(+), 7699 deletions(-) create mode 100644 lib/hash/thash_private.h -- 2.53.0