* [PATCH 00/45] remove unused internal symbols and dead code
@ 2026-11-29 20:48 Stephen Hemminger
2026-11-29 20:48 ` [PATCH 01/45] bus/vmbus: do not export unused internal symbol Stephen Hemminger
` (45 more replies)
0 siblings, 46 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
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
^ permalink raw reply [flat|nested] 90+ messages in thread
* [PATCH 01/45] bus/vmbus: do not export unused internal symbol
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 02/45] bus/dpaa: remove exports for nonexistent symbols Stephen Hemminger
` (44 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Wei Hu
rte_vmbus_unregister() is not called anywhere in the tree. The vmbus
driver registration macro RTE_PMD_REGISTER_VMBUS only references
rte_vmbus_register(), and no driver unregisters itself.
Drop the internal export so the symbol is no longer part of the
version map, and remove the now inconsistent __rte_internal tag
on the declaration. The function itself is kept since it is the
counterpart of rte_vmbus_register().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/vmbus/bus_vmbus_driver.h | 1 -
drivers/bus/vmbus/vmbus_common.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/bus/vmbus/bus_vmbus_driver.h b/drivers/bus/vmbus/bus_vmbus_driver.h
index 706ff1fcf5..3f5d379afa 100644
--- a/drivers/bus/vmbus/bus_vmbus_driver.h
+++ b/drivers/bus/vmbus/bus_vmbus_driver.h
@@ -91,7 +91,6 @@ void rte_vmbus_register(struct rte_vmbus_driver *driver);
* A pointer to a rte_vmbus_driver structure describing the driver
* to be unregistered.
*/
-__rte_internal
void rte_vmbus_unregister(struct rte_vmbus_driver *driver);
/** Helper for VMBUS device registration from driver instance */
diff --git a/drivers/bus/vmbus/vmbus_common.c b/drivers/bus/vmbus/vmbus_common.c
index 4c64856abb..66e403dfe6 100644
--- a/drivers/bus/vmbus/vmbus_common.c
+++ b/drivers/bus/vmbus/vmbus_common.c
@@ -199,7 +199,6 @@ rte_vmbus_register(struct rte_vmbus_driver *driver)
}
/* unregister vmbus driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_vmbus_unregister)
void
rte_vmbus_unregister(struct rte_vmbus_driver *driver)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 02/45] bus/dpaa: remove exports for nonexistent symbols
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
2026-11-29 20:48 ` [PATCH 01/45] bus/vmbus: do not export unused internal symbol Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 03/45] ethdev: do not export internal dummy ops Stephen Hemminger
` (43 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena, Jun Yang
The variables fman_ip_rev, fman_dealloc_bufs_mask_hi and
fman_dealloc_bufs_mask_lo were deleted when FMan attributes moved
into the FMan node structure, but the export entries were left
behind. The symbols end up listed in the version map while no
object defines them.
Remove the stale export macros.
Fixes: 0095306cdbda ("bus/dpaa: add FMan node")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/dpaa/dpaa_bus_base_symbols.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/bus/dpaa/dpaa_bus_base_symbols.c b/drivers/bus/dpaa/dpaa_bus_base_symbols.c
index 0927e5fe2c..5fe7b72ebc 100644
--- a/drivers/bus/dpaa/dpaa_bus_base_symbols.c
+++ b/drivers/bus/dpaa/dpaa_bus_base_symbols.c
@@ -5,9 +5,6 @@
#include <eal_export.h>
/* Symbols from the base driver are exported separately below. */
-RTE_EXPORT_INTERNAL_SYMBOL(fman_ip_rev)
-RTE_EXPORT_INTERNAL_SYMBOL(fman_dealloc_bufs_mask_hi)
-RTE_EXPORT_INTERNAL_SYMBOL(fman_dealloc_bufs_mask_lo)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_mcast_filter_table)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_reset_mcast_filter_table)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_clear_mac_addr)
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 03/45] ethdev: do not export internal dummy ops
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
2026-11-29 20:48 ` [PATCH 01/45] bus/vmbus: do not export unused internal symbol Stephen Hemminger
2026-11-29 20:48 ` [PATCH 02/45] bus/dpaa: remove exports for nonexistent symbols Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 04/45] hash: do not export internal toeplitz helper Stephen Hemminger
` (42 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Thomas Monjalon, Andrew Rybchenko
The dummy queue count, descriptor status and recycle callbacks are
only assigned as fallback function pointers inside the ethdev
library. No driver references them, so they do not need to be part
of the internal ABI.
Drop the export and the __rte_internal tag. The functions stay
global because they are used from both ethdev_driver.c and
ethdev_private.c.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/ethdev/ethdev_driver.c | 4 ----
lib/ethdev/ethdev_driver.h | 4 ----
2 files changed, 8 deletions(-)
diff --git a/lib/ethdev/ethdev_driver.c b/lib/ethdev/ethdev_driver.c
index e6f8d6fe85..00440f18f9 100644
--- a/lib/ethdev/ethdev_driver.c
+++ b/lib/ethdev/ethdev_driver.c
@@ -876,14 +876,12 @@ rte_eth_tx_pkt_prepare_dummy(void *queue __rte_unused,
return nb_pkts;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_eth_queue_count_dummy)
int
rte_eth_queue_count_dummy(void *queue __rte_unused)
{
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_eth_descriptor_status_dummy)
int
rte_eth_descriptor_status_dummy(void *queue __rte_unused,
uint16_t offset __rte_unused)
@@ -891,7 +889,6 @@ rte_eth_descriptor_status_dummy(void *queue __rte_unused,
return -ENOTSUP;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_eth_recycle_tx_mbufs_reuse_dummy)
uint16_t
rte_eth_recycle_tx_mbufs_reuse_dummy(void *queue __rte_unused,
struct rte_eth_recycle_rxq_info *recycle_rxq_info __rte_unused)
@@ -899,7 +896,6 @@ rte_eth_recycle_tx_mbufs_reuse_dummy(void *queue __rte_unused,
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_eth_recycle_rx_descriptors_refill_dummy)
void
rte_eth_recycle_rx_descriptors_refill_dummy(void *queue __rte_unused,
uint16_t nb __rte_unused)
diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
index ac6f850a7e..06d4a7ed55 100644
--- a/lib/ethdev/ethdev_driver.h
+++ b/lib/ethdev/ethdev_driver.h
@@ -1928,7 +1928,6 @@ rte_eth_tx_pkt_prepare_dummy(void *queue __rte_unused,
* @param queue
* Pointer to Rx/Tx queue
*/
-__rte_internal
int
rte_eth_queue_count_dummy(void *queue __rte_unused);
@@ -1942,7 +1941,6 @@ rte_eth_queue_count_dummy(void *queue __rte_unused);
* The offset of the descriptor starting from tail (0 is the next
* packet to be received by the driver).
*/
-__rte_internal
int
rte_eth_descriptor_status_dummy(void *queue __rte_unused,
uint16_t offset __rte_unused);
@@ -1956,7 +1954,6 @@ rte_eth_descriptor_status_dummy(void *queue __rte_unused,
* @param recycle_rxq_info
* Pointer to recycle Rx queue info
*/
-__rte_internal
uint16_t
rte_eth_recycle_tx_mbufs_reuse_dummy(void *queue __rte_unused,
struct rte_eth_recycle_rxq_info *recycle_rxq_info __rte_unused);
@@ -1970,7 +1967,6 @@ rte_eth_recycle_tx_mbufs_reuse_dummy(void *queue __rte_unused,
* @param offset
* number of descriptors to refill
*/
-__rte_internal
void
rte_eth_recycle_rx_descriptors_refill_dummy(void *queue __rte_unused,
uint16_t nb __rte_unused);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 04/45] hash: do not export internal toeplitz helper
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (2 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 03/45] ethdev: do not export internal dummy ops Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 05/45] cryptodev: do not export internal device name helper Stephen Hemminger
` (41 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Yipeng Wang, Sameh Gobriel, Bruce Richardson,
Vladimir Medvedkin
thash_get_rand_poly() is only called from rte_thash.c when
initializing an LFSR. No driver or application outside the hash
library uses it, so it does not need an internal export.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
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 ++++++++++++++++
4 files changed, 18 insertions(+), 14 deletions(-)
create mode 100644 lib/hash/thash_private.h
diff --git a/lib/hash/rte_thash.c b/lib/hash/rte_thash.c
index fcd41248b9..12f71d4cde 100644
--- a/lib/hash/rte_thash.c
+++ b/lib/hash/rte_thash.c
@@ -15,6 +15,7 @@
#include <rte_log.h>
#include <rte_malloc.h>
#include <rte_cpuflags.h>
+#include "thash_private.h"
RTE_LOG_REGISTER_SUFFIX(thash_logtype, thash, INFO);
#define RTE_LOGTYPE_HASH thash_logtype
diff --git a/lib/hash/rte_thash.h b/lib/hash/rte_thash.h
index 8bca430663..98115081b1 100644
--- a/lib/hash/rte_thash.h
+++ b/lib/hash/rte_thash.h
@@ -100,19 +100,6 @@ union rte_thash_tuple {
struct rte_ipv6_tuple v6;
};
-/** @internal
- * @brief Generates a random polynomial
- *
- * @param poly_degree
- * degree of the polynomial
- *
- * @return
- * random polynomial
- */
-__rte_internal
-uint32_t
-thash_get_rand_poly(uint32_t poly_degree);
-
/**
* Longest RSS hash key currently supported
*/
diff --git a/lib/hash/rte_thash_gf2_poly_math.c b/lib/hash/rte_thash_gf2_poly_math.c
index ddf4dd863b..c8f610d84d 100644
--- a/lib/hash/rte_thash_gf2_poly_math.c
+++ b/lib/hash/rte_thash_gf2_poly_math.c
@@ -8,6 +8,7 @@
#include <rte_debug.h>
#include <rte_thash.h>
#include <rte_log.h>
+#include "thash_private.h"
#define MAX_POLY_DEGREE 32
#define MAX_TOEPLITZ_KEY_LENGTH 64
@@ -242,7 +243,6 @@ thash_test_poly_order(uint32_t poly, int degree)
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(thash_get_rand_poly)
uint32_t
thash_get_rand_poly(uint32_t poly_degree)
{
diff --git a/lib/hash/thash_private.h b/lib/hash/thash_private.h
new file mode 100644
index 0000000000..ea7bc69a46
--- /dev/null
+++ b/lib/hash/thash_private.h
@@ -0,0 +1,16 @@
+/* SPDX-License-Identifier: BSD-3-Clause
+ * Copyright(c) 2025 Stephen Hemminger
+ */
+
+#ifndef _THASH_PRIVATE_H_
+#define _THASH_PRIVATE_H_
+
+#include <stdint.h>
+
+/**
+ * @internal
+ * Generate a random polynomial of the given degree.
+ */
+uint32_t thash_get_rand_poly(uint32_t poly_degree);
+
+#endif /* _THASH_PRIVATE_H_ */
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 05/45] cryptodev: do not export internal device name helper
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (3 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 04/45] hash: do not export internal toeplitz helper Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 06/45] mldev: do not export internal PMD device helpers Stephen Hemminger
` (40 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Akhil Goyal, Fan Zhang
rte_cryptodev_pmd_create_dev_name() has no caller. Drivers build
their device names directly, so the helper does not need to be
exported as internal.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/cryptodev/cryptodev_pmd.h | 1 -
lib/cryptodev/rte_cryptodev.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index 929c6defe9..f1512f36c9 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -634,7 +634,6 @@ void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
* @internal
* Create unique device name
*/
-__rte_internal
int
rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 829a5d0846..97121eaf37 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2886,7 +2886,6 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
return mp;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_cryptodev_pmd_create_dev_name)
int
rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 06/45] mldev: do not export internal PMD device helpers
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (4 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 05/45] cryptodev: do not export internal device name helper Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 07/45] gpudev: do not export unused internal functions Stephen Hemminger
` (39 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Srikanth Yalavarthi
rte_ml_dev_pmd_allocate(), rte_ml_dev_pmd_release() and
rte_ml_dev_pmd_get_dev() are used only inside the mldev library.
ML drivers get their device pointer from the probe callback, so
these helpers do not need an internal export.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/mldev/rte_mldev.c | 3 ---
lib/mldev/rte_mldev_pmd.h | 3 ---
2 files changed, 6 deletions(-)
diff --git a/lib/mldev/rte_mldev.c b/lib/mldev/rte_mldev.c
index 7fae867882..2381af75c7 100644
--- a/lib/mldev/rte_mldev.c
+++ b/lib/mldev/rte_mldev.c
@@ -23,7 +23,6 @@ struct rte_ml_op_pool_private {
uint16_t user_size; /* Size of private user data with each operation. */
};
-RTE_EXPORT_INTERNAL_SYMBOL(rte_ml_dev_pmd_get_dev)
struct rte_ml_dev *
rte_ml_dev_pmd_get_dev(int16_t dev_id)
{
@@ -49,7 +48,6 @@ rte_ml_dev_pmd_get_named_dev(const char *name)
return NULL;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_ml_dev_pmd_allocate)
struct rte_ml_dev *
rte_ml_dev_pmd_allocate(const char *name, uint8_t socket_id)
{
@@ -123,7 +121,6 @@ rte_ml_dev_pmd_allocate(const char *name, uint8_t socket_id)
return dev;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_ml_dev_pmd_release)
int
rte_ml_dev_pmd_release(struct rte_ml_dev *dev)
{
diff --git a/lib/mldev/rte_mldev_pmd.h b/lib/mldev/rte_mldev_pmd.h
index 47c0f23223..6cf50662c5 100644
--- a/lib/mldev/rte_mldev_pmd.h
+++ b/lib/mldev/rte_mldev_pmd.h
@@ -51,7 +51,6 @@ struct rte_ml_dev;
* @return
* The rte_ml_dev pointer for the given device ID.
*/
-__rte_internal
struct rte_ml_dev *
rte_ml_dev_pmd_get_dev(int16_t dev_id);
@@ -84,7 +83,6 @@ rte_ml_dev_pmd_get_named_dev(const char *name);
* @return
* Slot in the rte_ml_dev_devices array for a new device.
*/
-__rte_internal
struct rte_ml_dev *
rte_ml_dev_pmd_allocate(const char *name, uint8_t socket_id);
@@ -99,7 +97,6 @@ rte_ml_dev_pmd_allocate(const char *name, uint8_t socket_id);
* - 0 on success.
* - < 0, error code on failure.
*/
-__rte_internal
int
rte_ml_dev_pmd_release(struct rte_ml_dev *dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 07/45] gpudev: do not export unused internal functions
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (5 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 06/45] mldev: do not export internal PMD device helpers Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 08/45] eal/linux: do not export internal VFIO helpers Stephen Hemminger
` (38 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Elena Agostini
rte_gpu_attach() and rte_gpu_notify() are not called by any driver.
The cuda driver only uses rte_gpu_allocate(), rte_gpu_complete_new(),
rte_gpu_release() and rte_gpu_get_by_name(), which keep their export.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/gpudev/gpudev.c | 2 --
lib/gpudev/gpudev_driver.h | 2 --
2 files changed, 4 deletions(-)
diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c
index 93a30464f0..11e8728211 100644
--- a/lib/gpudev/gpudev.c
+++ b/lib/gpudev/gpudev.c
@@ -245,7 +245,6 @@ rte_gpu_allocate(const char *name)
return dev;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_gpu_attach)
struct rte_gpu *
rte_gpu_attach(const char *name)
{
@@ -506,7 +505,6 @@ gpu_free_callbacks(struct rte_gpu *dev)
rte_rwlock_write_unlock(&gpu_callback_lock);
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_gpu_notify)
void
rte_gpu_notify(struct rte_gpu *dev, enum rte_gpu_event event)
{
diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
index b7621f6e5a..3f06bf89f0 100644
--- a/lib/gpudev/gpudev_driver.h
+++ b/lib/gpudev/gpudev_driver.h
@@ -95,7 +95,6 @@ __rte_internal
struct rte_gpu *rte_gpu_allocate(const char *name);
/* First step of initialization in secondary process. */
-__rte_internal
struct rte_gpu *rte_gpu_attach(const char *name);
/* Last step of initialization. */
@@ -107,7 +106,6 @@ __rte_internal
int rte_gpu_release(struct rte_gpu *dev);
/* Call registered callbacks. No multi-process event. */
-__rte_internal
void rte_gpu_notify(struct rte_gpu *dev, enum rte_gpu_event);
#ifdef __cplusplus
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 08/45] eal/linux: do not export internal VFIO helpers
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (6 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 07/45] gpudev: do not export unused internal functions Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 09/45] eal/linux: remove unused VFIO device number helper Stephen Hemminger
` (37 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Anatoly Burakov
dev_vfio_cleanup(), dev_vfio_init_mem() and
dev_vfio_get_container_fd() are called only from EAL itself, from
eal.c and eal_vfio_mp_sync.c. The VFIO interface used by buses and
drivers is the dev_vfio_container_* and dev_vfio_enable family,
which stays exported.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/linux/eal_vfio.c | 3 ---
lib/eal/linux/include/dev_vfio.h | 3 ---
2 files changed, 6 deletions(-)
diff --git a/lib/eal/linux/eal_vfio.c b/lib/eal/linux/eal_vfio.c
index fdf500cd5b..8f832ff1e4 100644
--- a/lib/eal/linux/eal_vfio.c
+++ b/lib/eal/linux/eal_vfio.c
@@ -1362,7 +1362,6 @@ dev_vfio_module_is_loaded(enum dev_vfio_module module)
return vfio_check_module(module) > 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(dev_vfio_init_mem)
int
dev_vfio_init_mem(void)
{
@@ -1435,7 +1434,6 @@ dev_vfio_get_device_info(int vfio_dev_fd, struct vfio_device_info *device_info)
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(dev_vfio_get_container_fd)
int
dev_vfio_get_container_fd(void)
{
@@ -1887,7 +1885,6 @@ dev_vfio_get_iova_mode(void)
return vfio_global_cfg.iova_mode;
}
-RTE_EXPORT_INTERNAL_SYMBOL(dev_vfio_cleanup)
void
dev_vfio_cleanup(void)
{
diff --git a/lib/eal/linux/include/dev_vfio.h b/lib/eal/linux/include/dev_vfio.h
index 57c5894679..c018079ba7 100644
--- a/lib/eal/linux/include/dev_vfio.h
+++ b/lib/eal/linux/include/dev_vfio.h
@@ -156,7 +156,6 @@ int dev_vfio_enable(void);
* @internal
* Cleanup VFIO resources.
*/
-__rte_internal
void dev_vfio_cleanup(void);
/**
@@ -168,7 +167,6 @@ void dev_vfio_cleanup(void);
* 0 on success.
* <0 on failure.
*/
-__rte_internal
int dev_vfio_init_mem(void);
/**
@@ -305,7 +303,6 @@ dev_vfio_get_device_info(int vfio_dev_fd, struct vfio_device_info *device_info);
* - ENXIO - VFIO support not initialized.
* - ENOTSUP - Unsupported VFIO mode.
*/
-__rte_internal
int
dev_vfio_get_container_fd(void);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 09/45] eal/linux: remove unused VFIO device number helper
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (7 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 08/45] eal/linux: do not export internal VFIO helpers Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 10/45] eal: make per-thread epoll instance getter static Stephen Hemminger
` (36 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Anatoly Burakov
dev_vfio_get_device_num() was added together with VFIO cdev mode and
never had a caller; the cdev path resolves the device number itself.
Remove the function and its declaration.
Fixes: d129414711aa ("vfio: introduce cdev mode")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/linux/eal_vfio.c | 34 --------------------------------
lib/eal/linux/include/dev_vfio.h | 25 -----------------------
2 files changed, 59 deletions(-)
diff --git a/lib/eal/linux/eal_vfio.c b/lib/eal/linux/eal_vfio.c
index 8f832ff1e4..f733f9bad6 100644
--- a/lib/eal/linux/eal_vfio.c
+++ b/lib/eal/linux/eal_vfio.c
@@ -1481,40 +1481,6 @@ dev_vfio_get_group_num(const char *sysfs_base, const char *dev_addr, int *iommu_
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(dev_vfio_get_device_num)
-int
-dev_vfio_get_device_num(const char *sysfs_base, const char *dev_addr, int *device_num)
-{
- int ret;
-
- if (sysfs_base == NULL || dev_addr == NULL || device_num == NULL) {
- rte_errno = EINVAL;
- return -1;
- }
-
- if (vfio_global_cfg.mode == DEV_VFIO_MODE_NONE) {
- EAL_LOG(ERR, "VFIO support not initialized");
- rte_errno = ENXIO;
- return -1;
- }
-
- if (vfio_global_cfg.mode != DEV_VFIO_MODE_CDEV) {
- EAL_LOG(ERR, "VFIO not initialized in cdev mode");
- rte_errno = ENOTSUP;
- return -1;
- }
-
- ret = vfio_cdev_get_device_num(sysfs_base, dev_addr, device_num);
- if (ret < 0) {
- rte_errno = EINVAL;
- return -1;
- } else if (ret == 0) {
- rte_errno = ENODEV;
- return -1;
- }
- return 0;
-}
-
static int
vfio_dma_mem_map(struct vfio_container *cfg, uint64_t vaddr, uint64_t iova, uint64_t len,
int do_map)
diff --git a/lib/eal/linux/include/dev_vfio.h b/lib/eal/linux/include/dev_vfio.h
index c018079ba7..e057fa6c08 100644
--- a/lib/eal/linux/include/dev_vfio.h
+++ b/lib/eal/linux/include/dev_vfio.h
@@ -240,31 +240,6 @@ __rte_internal
int
dev_vfio_get_group_num(const char *sysfs_base, const char *dev_addr, int *iommu_group_num);
-/**
- * @internal
- * Parse VFIO cdev device number for a device.
- *
- * @param sysfs_base
- * Sysfs path prefix.
- * @param dev_addr
- * Device identifier.
- * @param vfio_device_num
- * Pointer to where VFIO cdev device number will be stored.
- *
- * @return
- * 0 on success.
- * <0 on failure, rte_errno is set.
- *
- * Possible rte_errno values include:
- * - ENODEV - Device not managed by VFIO.
- * - EINVAL - Invalid parameters.
- * - ENXIO - VFIO support not initialized.
- * - ENOTSUP - Unsupported VFIO mode.
- */
-__rte_internal
-int
-dev_vfio_get_device_num(const char *sysfs_base, const char *dev_addr, int *vfio_device_num);
-
/**
* @internal
* Get device information.
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 10/45] eal: make per-thread epoll instance getter static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (8 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 09/45] eal/linux: remove unused VFIO device number helper Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 11/45] bus: do not export unused driver unregister functions Stephen Hemminger
` (35 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Harman Kalra, Bruce Richardson, Dmitry Kozlyuk
rte_intr_tls_epfd() is only called from the Linux eal_interrupts.c.
Make it static there and remove the declaration and the FreeBSD and
Windows stubs, which only returned -ENOTSUP.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/freebsd/eal_interrupts.c | 7 -------
lib/eal/include/rte_interrupts.h | 11 -----------
lib/eal/linux/eal_interrupts.c | 3 +--
lib/eal/windows/eal_interrupts.c | 7 -------
4 files changed, 1 insertion(+), 27 deletions(-)
diff --git a/lib/eal/freebsd/eal_interrupts.c b/lib/eal/freebsd/eal_interrupts.c
index b29a2b174e..e6c2124344 100644
--- a/lib/eal/freebsd/eal_interrupts.c
+++ b/lib/eal/freebsd/eal_interrupts.c
@@ -742,13 +742,6 @@ rte_epoll_ctl(int epfd, int op, int fd, struct rte_epoll_event *event)
return -ENOTSUP;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_tls_epfd)
-int
-rte_intr_tls_epfd(void)
-{
- return -ENOTSUP;
-}
-
RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_free_epoll_fd)
void
rte_intr_free_epoll_fd(struct rte_intr_handle *intr_handle)
diff --git a/lib/eal/include/rte_interrupts.h b/lib/eal/include/rte_interrupts.h
index 85b5546dee..cfc3562a33 100644
--- a/lib/eal/include/rte_interrupts.h
+++ b/lib/eal/include/rte_interrupts.h
@@ -322,17 +322,6 @@ rte_intr_type_set(struct rte_intr_handle *intr_handle,
enum rte_intr_handle_type
rte_intr_type_get(const struct rte_intr_handle *intr_handle);
-/**
- * @internal
- * The function returns the per thread epoll instance.
- *
- * @return
- * epfd the epoll instance referred to.
- */
-__rte_internal
-int
-rte_intr_tls_epfd(void);
-
/**
* @internal
* @param intr_handle
diff --git a/lib/eal/linux/eal_interrupts.c b/lib/eal/linux/eal_interrupts.c
index c63956cde5..9a5fb0cd29 100644
--- a/lib/eal/linux/eal_interrupts.c
+++ b/lib/eal/linux/eal_interrupts.c
@@ -1315,8 +1315,7 @@ eal_init_tls_epfd(void)
return pfd;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_tls_epfd)
-int
+static int
rte_intr_tls_epfd(void)
{
if (RTE_PER_LCORE(_epfd) == -1)
diff --git a/lib/eal/windows/eal_interrupts.c b/lib/eal/windows/eal_interrupts.c
index 5650b84d1f..ad25e66d23 100644
--- a/lib/eal/windows/eal_interrupts.c
+++ b/lib/eal/windows/eal_interrupts.c
@@ -297,13 +297,6 @@ rte_epoll_ctl(int epfd, int op, int fd, struct rte_epoll_event *event)
return -ENOTSUP;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_tls_epfd)
-int
-rte_intr_tls_epfd(void)
-{
- return -ENOTSUP;
-}
-
RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_free_epoll_fd)
void
rte_intr_free_epoll_fd(struct rte_intr_handle *intr_handle)
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 11/45] bus: do not export unused driver unregister functions
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (9 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 10/45] eal: make per-thread epoll instance getter static Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 12/45] bus/fslmc: do not export internal symbols used only in the bus Stephen Hemminger
` (34 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nipun Gupta, Nikhil Agarwal, Hemant Agrawal,
Sachin Saxena, Rosen Xu, Tomasz Duszynski, Chengwen Feng
None of the bus driver unregister functions are called. Drivers
register themselves through the RTE_PMD_REGISTER_* macros at load
time and are never unregistered, and rte_bus_unregister() has no
caller either.
Drop the internal exports. The functions themselves are kept as the
counterparts of the register functions.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/cdx/bus_cdx_driver.h | 1 -
drivers/bus/cdx/cdx.c | 1 -
drivers/bus/dpaa/bus_dpaa_driver.h | 1 -
drivers/bus/dpaa/dpaa_bus.c | 1 -
drivers/bus/fslmc/bus_fslmc_driver.h | 1 -
drivers/bus/fslmc/fslmc_bus.c | 1 -
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 -
lib/eal/common/eal_common_bus.c | 1 -
lib/eal/include/bus_driver.h | 1 -
16 files changed, 16 deletions(-)
diff --git a/drivers/bus/cdx/bus_cdx_driver.h b/drivers/bus/cdx/bus_cdx_driver.h
index 01684466ed..5c6aa528f4 100644
--- a/drivers/bus/cdx/bus_cdx_driver.h
+++ b/drivers/bus/cdx/bus_cdx_driver.h
@@ -192,7 +192,6 @@ int rte_cdx_vfio_bm_disable(struct rte_cdx_device *dev);
* A pointer to a rte_cdx_driver structure describing the driver
* to be unregistered.
*/
-__rte_internal
void rte_cdx_unregister(struct rte_cdx_driver *driver);
#ifdef __cplusplus
diff --git a/drivers/bus/cdx/cdx.c b/drivers/bus/cdx/cdx.c
index ee8f24e67e..779f912b38 100644
--- a/drivers/bus/cdx/cdx.c
+++ b/drivers/bus/cdx/cdx.c
@@ -367,7 +367,6 @@ rte_cdx_register(struct rte_cdx_driver *driver)
}
/* unregister a driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_cdx_unregister)
void
rte_cdx_unregister(struct rte_cdx_driver *driver)
{
diff --git a/drivers/bus/dpaa/bus_dpaa_driver.h b/drivers/bus/dpaa/bus_dpaa_driver.h
index 4aed83f84d..02b75b54ff 100644
--- a/drivers/bus/dpaa/bus_dpaa_driver.h
+++ b/drivers/bus/dpaa/bus_dpaa_driver.h
@@ -195,7 +195,6 @@ void rte_dpaa_driver_register(struct rte_dpaa_driver *driver);
* A pointer to a rte_dpaa_driver structure describing the driver
* to be unregistered.
*/
-__rte_internal
void rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver);
/**
diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c
index cbbeb927fe..5146a40f2e 100644
--- a/drivers/bus/dpaa/dpaa_bus.c
+++ b/drivers/bus/dpaa/dpaa_bus.c
@@ -558,7 +558,6 @@ rte_dpaa_driver_register(struct rte_dpaa_driver *driver)
}
/* un-register a dpaa bus based dpaa driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_dpaa_driver_unregister)
void
rte_dpaa_driver_unregister(struct rte_dpaa_driver *driver)
{
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index ead9d6613c..80782a4a88 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -184,7 +184,6 @@ void rte_fslmc_driver_register(struct rte_dpaa2_driver *driver);
* A pointer to a rte_dpaa2_driver structure describing the driver
* to be unregistered.
*/
-__rte_internal
void rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver);
/** Helper for DPAA2 device registration from driver (eth, crypto) instance */
diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c
index e40fe59c7c..da7b7f3a67 100644
--- a/drivers/bus/fslmc/fslmc_bus.c
+++ b/drivers/bus/fslmc/fslmc_bus.c
@@ -662,7 +662,6 @@ rte_fslmc_driver_register(struct rte_dpaa2_driver *driver)
}
/*un-register a fslmc bus based dpaa2 driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_fslmc_driver_unregister)
void
rte_fslmc_driver_unregister(struct rte_dpaa2_driver *driver)
{
diff --git a/drivers/bus/ifpga/bus_ifpga_driver.h b/drivers/bus/ifpga/bus_ifpga_driver.h
index 66ef5daf0f..b90a9f42a4 100644
--- a/drivers/bus/ifpga/bus_ifpga_driver.h
+++ b/drivers/bus/ifpga/bus_ifpga_driver.h
@@ -115,7 +115,6 @@ void rte_ifpga_driver_register(struct rte_afu_driver *driver);
* A pointer to a rte_afu_driver structure describing the driver
* to be unregistered.
*/
-__rte_internal
void rte_ifpga_driver_unregister(struct rte_afu_driver *driver);
#define RTE_PMD_REGISTER_AFU(nm, afudrv)\
diff --git a/drivers/bus/ifpga/ifpga_bus.c b/drivers/bus/ifpga/ifpga_bus.c
index 79d1c3778f..8f08f82340 100644
--- a/drivers/bus/ifpga/ifpga_bus.c
+++ b/drivers/bus/ifpga/ifpga_bus.c
@@ -48,7 +48,6 @@ void rte_ifpga_driver_register(struct rte_afu_driver *driver)
}
/* un-register a fpga bus based driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_ifpga_driver_unregister)
void rte_ifpga_driver_unregister(struct rte_afu_driver *driver)
{
rte_bus_remove_driver(&rte_ifpga_bus, &driver->driver);
diff --git a/drivers/bus/platform/bus_platform_driver.h b/drivers/bus/platform/bus_platform_driver.h
index 1a55c729db..5fc23bb256 100644
--- a/drivers/bus/platform/bus_platform_driver.h
+++ b/drivers/bus/platform/bus_platform_driver.h
@@ -145,7 +145,6 @@ void rte_platform_register(struct rte_platform_driver *pdrv);
* @param pdrv
* A pointer to a rte_platform_driver structure describing driver to be unregistered.
*/
-__rte_internal
void rte_platform_unregister(struct rte_platform_driver *pdrv);
#ifdef __cplusplus
diff --git a/drivers/bus/platform/platform.c b/drivers/bus/platform/platform.c
index b122d9545f..c65a04287a 100644
--- a/drivers/bus/platform/platform.c
+++ b/drivers/bus/platform/platform.c
@@ -39,7 +39,6 @@ rte_platform_register(struct rte_platform_driver *pdrv)
rte_bus_add_driver(&platform_bus, &pdrv->driver);
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_platform_unregister)
void
rte_platform_unregister(struct rte_platform_driver *pdrv)
{
diff --git a/drivers/bus/uacce/bus_uacce_driver.h b/drivers/bus/uacce/bus_uacce_driver.h
index 4b84d9ead8..c72f6762b3 100644
--- a/drivers/bus/uacce/bus_uacce_driver.h
+++ b/drivers/bus/uacce/bus_uacce_driver.h
@@ -232,7 +232,6 @@ void rte_uacce_register(struct rte_uacce_driver *driver);
* A pointer to a rte_uacce_driver structure describing the driver to be
* unregistered.
*/
-__rte_internal
void rte_uacce_unregister(struct rte_uacce_driver *driver);
/**
diff --git a/drivers/bus/uacce/uacce.c b/drivers/bus/uacce/uacce.c
index 99a6fb314d..5d027f4bc4 100644
--- a/drivers/bus/uacce/uacce.c
+++ b/drivers/bus/uacce/uacce.c
@@ -522,7 +522,6 @@ rte_uacce_register(struct rte_uacce_driver *driver)
rte_bus_add_driver(&uacce_bus, &driver->driver);
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_uacce_unregister)
void
rte_uacce_unregister(struct rte_uacce_driver *driver)
{
diff --git a/drivers/bus/vdev/bus_vdev_driver.h b/drivers/bus/vdev/bus_vdev_driver.h
index d3e60d4902..8f902884da 100644
--- a/drivers/bus/vdev/bus_vdev_driver.h
+++ b/drivers/bus/vdev/bus_vdev_driver.h
@@ -115,7 +115,6 @@ void rte_vdev_register(struct rte_vdev_driver *driver);
* A pointer to a rte_vdev_driver structure describing the driver
* to be unregistered.
*/
-__rte_internal
void rte_vdev_unregister(struct rte_vdev_driver *driver);
#define RTE_PMD_REGISTER_VDEV(nm, vdrv)\
diff --git a/drivers/bus/vdev/vdev.c b/drivers/bus/vdev/vdev.c
index 02d719a44d..a201d74c91 100644
--- a/drivers/bus/vdev/vdev.c
+++ b/drivers/bus/vdev/vdev.c
@@ -60,7 +60,6 @@ rte_vdev_register(struct rte_vdev_driver *driver)
}
/* unregister a driver */
-RTE_EXPORT_INTERNAL_SYMBOL(rte_vdev_unregister)
void
rte_vdev_unregister(struct rte_vdev_driver *driver)
{
diff --git a/lib/eal/common/eal_common_bus.c b/lib/eal/common/eal_common_bus.c
index 067e7a8b67..b7cbca2ea6 100644
--- a/lib/eal/common/eal_common_bus.c
+++ b/lib/eal/common/eal_common_bus.c
@@ -46,7 +46,6 @@ rte_bus_register(struct rte_bus *bus)
EAL_LOG(DEBUG, "Registered [%s] bus.", rte_bus_name(bus));
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_bus_unregister)
void
rte_bus_unregister(struct rte_bus *bus)
{
diff --git a/lib/eal/include/bus_driver.h b/lib/eal/include/bus_driver.h
index fa4d711a90..0677bc5879 100644
--- a/lib/eal/include/bus_driver.h
+++ b/lib/eal/include/bus_driver.h
@@ -452,7 +452,6 @@ RTE_INIT_PRIO(businitfn_ ##nm, BUS) \
* A pointer to a rte_bus structure describing the bus
* to be unregistered.
*/
-__rte_internal
void rte_bus_unregister(struct rte_bus *bus);
/**
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 12/45] bus/fslmc: do not export internal symbols used only in the bus
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (10 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 11/45] bus: do not export unused driver unregister functions Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 13/45] bus/dpaa: " Stephen Hemminger
` (33 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
The QBMan helpers, the DPAA2 IOVA conversion helpers and the DPCI/DPIO
object functions listed here are only used inside the fslmc bus driver
itself. The dpaa2 net, crypto and event drivers use the higher level
interfaces, which keep their exports.
Drop the internal exports and the matching __rte_internal tags.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/fslmc/bus_fslmc_driver.h | 4 ----
drivers/bus/fslmc/fslmc_vfio.c | 4 ----
drivers/bus/fslmc/mc/dpbp.c | 4 ----
drivers/bus/fslmc/mc/dpci.c | 2 --
drivers/bus/fslmc/mc/dpcon.c | 5 -----
drivers/bus/fslmc/mc/dpio.c | 11 -----------
drivers/bus/fslmc/mc/dprc.c | 1 -
drivers/bus/fslmc/mc/fsl_dpbp.h | 4 ----
drivers/bus/fslmc/mc/fsl_dpci.h | 2 --
drivers/bus/fslmc/mc/fsl_dpcon.h | 5 -----
drivers/bus/fslmc/mc/fsl_dpio.h | 11 -----------
drivers/bus/fslmc/mc/fsl_dprc.h | 1 -
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 1 -
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 --
drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 1 -
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 1 -
drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h | 5 -----
drivers/bus/fslmc/qbman/qbman_portal.c | 5 -----
18 files changed, 69 deletions(-)
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 80782a4a88..2e2fbd67e6 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -143,14 +143,12 @@ struct rte_dpaa2_driver {
int
rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size);
-__rte_internal
int
rte_fslmc_vfio_mem_dmaunmap(uint64_t iova, uint64_t size);
__rte_internal
uint64_t
rte_fslmc_cold_mem_vaddr_to_iova(void *vaddr,
uint64_t size);
-__rte_internal
void *
rte_fslmc_cold_mem_iova_to_vaddr(uint64_t iova,
uint64_t size);
@@ -160,10 +158,8 @@ rte_fslmc_mem_vaddr_to_iova(void *vaddr);
__rte_internal
__rte_hot void *
rte_fslmc_mem_iova_to_vaddr(uint64_t iova);
-__rte_internal
uint64_t
rte_fslmc_io_vaddr_to_iova(void *vaddr);
-__rte_internal
void *
rte_fslmc_io_iova_to_vaddr(uint64_t iova);
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 5ffa869e6f..8b5c2b637a 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -1024,7 +1024,6 @@ rte_fslmc_cold_mem_vaddr_to_iova(void *vaddr,
return RTE_BAD_IOVA;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_fslmc_cold_mem_iova_to_vaddr)
void *
rte_fslmc_cold_mem_iova_to_vaddr(uint64_t iova,
uint64_t size)
@@ -1061,7 +1060,6 @@ rte_fslmc_mem_iova_to_vaddr(uint64_t iova)
return rte_fslmc_cold_mem_iova_to_vaddr(iova, 0);
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_fslmc_io_vaddr_to_iova)
uint64_t
rte_fslmc_io_vaddr_to_iova(void *vaddr)
{
@@ -1077,7 +1075,6 @@ rte_fslmc_io_vaddr_to_iova(void *vaddr)
return RTE_BAD_IOVA;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_fslmc_io_iova_to_vaddr)
void *
rte_fslmc_io_iova_to_vaddr(uint64_t iova)
{
@@ -1196,7 +1193,6 @@ rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size)
return fslmc_map_dma(vaddr, iova, size);
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_fslmc_vfio_mem_dmaunmap)
int
rte_fslmc_vfio_mem_dmaunmap(uint64_t iova, uint64_t size)
{
diff --git a/drivers/bus/fslmc/mc/dpbp.c b/drivers/bus/fslmc/mc/dpbp.c
index 1c4bed3af7..cb5a288e68 100644
--- a/drivers/bus/fslmc/mc/dpbp.c
+++ b/drivers/bus/fslmc/mc/dpbp.c
@@ -28,7 +28,6 @@
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpbp_open)
int dpbp_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
int dpbp_id,
@@ -240,7 +239,6 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpbp_reset)
int dpbp_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token)
@@ -372,7 +370,6 @@ int dpbp_get_num_free_bufs(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpbp_set_notifications)
int dpbp_set_notifications(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -406,7 +403,6 @@ int dpbp_set_notifications(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpbp_get_notifications)
int dpbp_get_notifications(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/mc/dpci.c b/drivers/bus/fslmc/mc/dpci.c
index 4188325fb9..3e58c7a218 100644
--- a/drivers/bus/fslmc/mc/dpci.c
+++ b/drivers/bus/fslmc/mc/dpci.c
@@ -480,7 +480,6 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpci_set_opr)
int dpci_set_opr(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -519,7 +518,6 @@ int dpci_set_opr(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpci_get_opr)
int dpci_get_opr(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/mc/dpcon.c b/drivers/bus/fslmc/mc/dpcon.c
index c01d7adabb..044ca7bb8b 100644
--- a/drivers/bus/fslmc/mc/dpcon.c
+++ b/drivers/bus/fslmc/mc/dpcon.c
@@ -28,7 +28,6 @@
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpcon_open)
int dpcon_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
int dpcon_id,
@@ -67,7 +66,6 @@ int dpcon_open(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpcon_close)
int dpcon_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token)
@@ -192,7 +190,6 @@ int dpcon_enable(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpcon_disable)
int dpcon_disable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token)
@@ -251,7 +248,6 @@ int dpcon_is_enabled(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpcon_reset)
int dpcon_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token)
@@ -275,7 +271,6 @@ int dpcon_reset(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpcon_get_attributes)
int dpcon_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/mc/dpio.c b/drivers/bus/fslmc/mc/dpio.c
index 45789dc702..a23692417c 100644
--- a/drivers/bus/fslmc/mc/dpio.c
+++ b/drivers/bus/fslmc/mc/dpio.c
@@ -28,7 +28,6 @@
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_open)
int dpio_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
int dpio_id,
@@ -64,7 +63,6 @@ int dpio_open(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_close)
int dpio_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token)
@@ -177,7 +175,6 @@ int dpio_destroy(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_enable)
int dpio_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token)
@@ -201,7 +198,6 @@ int dpio_enable(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_disable)
int dpio_disable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token)
@@ -259,7 +255,6 @@ int dpio_is_enabled(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_reset)
int dpio_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token)
@@ -284,7 +279,6 @@ int dpio_reset(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_get_attributes)
int dpio_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -330,7 +324,6 @@ int dpio_get_attributes(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_set_stashing_destination)
int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -359,7 +352,6 @@ int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_get_stashing_destination)
int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -396,7 +388,6 @@ int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_set_stashing_destination_by_core_id)
int dpio_set_stashing_destination_by_core_id(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -425,7 +416,6 @@ int dpio_set_stashing_destination_by_core_id(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_set_stashing_destination_source)
int dpio_set_stashing_destination_source(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -454,7 +444,6 @@ int dpio_set_stashing_destination_source(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; Error code otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpio_get_stashing_destination_source)
int dpio_get_stashing_destination_source(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/mc/dprc.c b/drivers/bus/fslmc/mc/dprc.c
index 578ab63f7b..fcb9faa7dc 100644
--- a/drivers/bus/fslmc/mc/dprc.c
+++ b/drivers/bus/fslmc/mc/dprc.c
@@ -91,7 +91,6 @@ int dprc_close(struct fsl_mc_io *mc_io,
*
* Return: '0' on Success; -ENAVAIL if connection does not exist.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dprc_get_connection)
int dprc_get_connection(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpbp.h b/drivers/bus/fslmc/mc/fsl_dpbp.h
index 491679b191..894ff86d9c 100644
--- a/drivers/bus/fslmc/mc/fsl_dpbp.h
+++ b/drivers/bus/fslmc/mc/fsl_dpbp.h
@@ -44,7 +44,6 @@ struct dpbp_notification_cfg {
uint32_t options;
};
-__rte_internal
int dpbp_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
int dpbp_id,
@@ -53,12 +52,10 @@ int dpbp_open(struct fsl_mc_io *mc_io,
int dpbp_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
-__rte_internal
int dpbp_set_notifications(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
struct dpbp_notification_cfg *cfg);
-__rte_internal
int dpbp_get_notifications(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -99,7 +96,6 @@ int dpbp_is_enabled(struct fsl_mc_io *mc_io,
uint16_t token,
int *en);
-__rte_internal
int dpbp_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index 55b67244c1..8d318d12f7 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -231,7 +231,6 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
uint16_t *major_ver,
uint16_t *minor_ver);
-__rte_internal
int dpci_set_opr(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -239,7 +238,6 @@ int dpci_set_opr(struct fsl_mc_io *mc_io,
uint8_t options,
struct opr_cfg *cfg);
-__rte_internal
int dpci_get_opr(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index 3bef97f6f5..d84c5ae3e9 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -22,13 +22,11 @@ struct fsl_mc_io;
*/
#define DPCON_INVALID_DPIO_ID (int)(-1)
-__rte_internal
int dpcon_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
int dpcon_id,
uint16_t *token);
-__rte_internal
int dpcon_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
@@ -57,7 +55,6 @@ int dpcon_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
-__rte_internal
int dpcon_disable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
@@ -67,7 +64,6 @@ int dpcon_is_enabled(struct fsl_mc_io *mc_io,
uint16_t token,
int *en);
-__rte_internal
int dpcon_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
@@ -84,7 +80,6 @@ struct dpcon_attr {
uint8_t num_priorities;
};
-__rte_internal
int dpcon_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h
index 6acbc8d561..9c1513fedd 100644
--- a/drivers/bus/fslmc/mc/fsl_dpio.h
+++ b/drivers/bus/fslmc/mc/fsl_dpio.h
@@ -15,13 +15,11 @@
struct fsl_mc_io;
-__rte_internal
int dpio_open(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
int dpio_id,
uint16_t *token);
-__rte_internal
int dpio_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
@@ -61,12 +59,10 @@ int dpio_destroy(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint32_t object_id);
-__rte_internal
int dpio_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
-__rte_internal
int dpio_disable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
@@ -76,36 +72,30 @@ int dpio_is_enabled(struct fsl_mc_io *mc_io,
uint16_t token,
int *en);
-__rte_internal
int dpio_reset(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
-__rte_internal
int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
uint8_t sdest);
-__rte_internal
int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
uint8_t *sdest);
-__rte_internal
int dpio_set_stashing_destination_by_core_id(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
uint8_t core_id);
-__rte_internal
int dpio_set_stashing_destination_source(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
uint8_t ss);
-__rte_internal
int dpio_get_stashing_destination_source(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
@@ -148,7 +138,6 @@ struct dpio_attr {
uint32_t clk;
};
-__rte_internal
int dpio_get_attributes(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/mc/fsl_dprc.h b/drivers/bus/fslmc/mc/fsl_dprc.h
index dba0d2017d..2201a48fe2 100644
--- a/drivers/bus/fslmc/mc/fsl_dprc.h
+++ b/drivers/bus/fslmc/mc/fsl_dprc.h
@@ -37,7 +37,6 @@ struct dprc_endpoint {
uint16_t if_id;
};
-__rte_internal
int dprc_get_connection(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
index d2ddb76baf..f09c5bb9bf 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
@@ -129,7 +129,6 @@ void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp)
}
}
-RTE_EXPORT_INTERNAL_SYMBOL(dpaa2_dpbp_supported)
int dpaa2_dpbp_supported(void)
{
if (TAILQ_EMPTY(&dpbp_dev_list))
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index 2e8c660acf..c4c4f16080 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -50,7 +50,6 @@
#define NUM_HOST_CPUS RTE_MAX_LCORE
-RTE_EXPORT_INTERNAL_SYMBOL(dpaa2_io_portal)
struct dpaa2_io_portal_t dpaa2_io_portal[RTE_MAX_LCORE];
RTE_EXPORT_INTERNAL_SYMBOL(per_lcore__dpaa2_io)
RTE_DEFINE_PER_LCORE(struct dpaa2_io_portal_t, _dpaa2_io);
@@ -280,7 +279,6 @@ int dpaa2_dpio_intr_init(struct dpaa2_dpio_dev *dpio_dev, int threshold,
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(dpaa2_dpio_intr_deinit)
void dpaa2_dpio_intr_deinit(struct dpaa2_dpio_dev *dpio_dev)
{
int ret;
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index 7e2271cc35..6681f5ffdc 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -55,7 +55,6 @@ __rte_internal
int dpaa2_dpio_intr_init(struct dpaa2_dpio_dev *dpio_dev, int threshold,
int timeout, bool build_epoll);
-__rte_internal
void dpaa2_dpio_intr_deinit(struct dpaa2_dpio_dev *dpio_dev);
/* pin a DPIO's MSI IRQ to the calling lcore's core (rx-queue interrupt mode) */
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 556e1b01c0..0643b734f7 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -565,7 +565,6 @@ struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
__rte_internal
void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);
-__rte_internal
int dpaa2_dpbp_supported(void);
__rte_internal
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index b9e7789766..f8f056ae1d 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -481,7 +481,6 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
*
* Return dqrr entry object.
*/
-__rte_internal
struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
/* ------------------------------------------------- */
@@ -990,7 +989,6 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
* @qd_bin: the queuing destination bin
* @qd_prio: the queuing destination priority.
*/
-__rte_internal
void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
uint16_t qd_bin, uint8_t qd_prio);
@@ -1037,7 +1035,6 @@ struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp);
* This value is set into the response id before the enqueue command, which,
* get overwritten by qbman once the enqueue command is complete.
*/
-__rte_internal
void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
/**
@@ -1050,7 +1047,6 @@ void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val);
* copied into the enqueue response to determine if the command has been
* completed, and response has been updated.
*/
-__rte_internal
uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
/**
@@ -1059,7 +1055,6 @@ uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp);
*
* Return 0 when command is successful.
*/
-__rte_internal
uint8_t qbman_result_eqresp_rc(struct qbman_result *eqresp);
/**
diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c
index 7b666d4ef9..71be1a504f 100644
--- a/drivers/bus/fslmc/qbman/qbman_portal.c
+++ b/drivers/bus/fslmc/qbman/qbman_portal.c
@@ -688,7 +688,6 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid)
d->eq.tgtid = fqid;
}
-RTE_EXPORT_INTERNAL_SYMBOL(qbman_eq_desc_set_qd)
void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
uint16_t qd_bin, uint8_t qd_prio)
{
@@ -2493,19 +2492,16 @@ struct qbman_fd *qbman_result_eqresp_fd(struct qbman_result *eqresp)
return (struct qbman_fd *)&eqresp->eq_resp.fd[0];
}
-RTE_EXPORT_INTERNAL_SYMBOL(qbman_result_eqresp_set_rspid)
void qbman_result_eqresp_set_rspid(struct qbman_result *eqresp, uint8_t val)
{
eqresp->eq_resp.rspid = val;
}
-RTE_EXPORT_INTERNAL_SYMBOL(qbman_result_eqresp_rspid)
uint8_t qbman_result_eqresp_rspid(struct qbman_result *eqresp)
{
return eqresp->eq_resp.rspid;
}
-RTE_EXPORT_INTERNAL_SYMBOL(qbman_result_eqresp_rc)
uint8_t qbman_result_eqresp_rc(struct qbman_result *eqresp)
{
if (eqresp->eq_resp.rc == 0xE)
@@ -2962,7 +2958,6 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr)
return QBMAN_IDX_FROM_DQRR(dqrr);
}
-RTE_EXPORT_INTERNAL_SYMBOL(qbman_get_dqrr_from_idx)
struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx)
{
struct qbman_result *dq;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 13/45] bus/dpaa: do not export internal symbols used only in the bus
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (11 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 12/45] bus/fslmc: do not export internal symbols used only in the bus Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:48 ` [PATCH 14/45] common/dpaax: do not export IOVA table dump helper Stephen Hemminger
` (32 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
These QMan and BMan helpers are only used inside the dpaa bus driver.
The dpaa net, crypto and event drivers use the frame queue and buffer
pool interfaces, which keep their exports.
Drop the internal exports and the matching __rte_internal tags.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/dpaa/dpaa_bus_base_symbols.c | 13 -------------
drivers/bus/dpaa/include/fsl_bman.h | 1 -
drivers/bus/dpaa/include/fsl_fman.h | 2 --
drivers/bus/dpaa/include/fsl_qman.h | 6 ------
drivers/bus/dpaa/include/fsl_usd.h | 2 --
drivers/bus/dpaa/include/netcfg.h | 2 --
6 files changed, 26 deletions(-)
diff --git a/drivers/bus/dpaa/dpaa_bus_base_symbols.c b/drivers/bus/dpaa/dpaa_bus_base_symbols.c
index 5fe7b72ebc..d197c94e18 100644
--- a/drivers/bus/dpaa/dpaa_bus_base_symbols.c
+++ b/drivers/bus/dpaa/dpaa_bus_base_symbols.c
@@ -28,7 +28,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fc_threshold)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fc_threshold)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fc_quanta)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fc_quanta)
-RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fdoff)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_err_fqid)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_ic_params)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fdoff)
@@ -36,28 +35,21 @@ RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_maxfrm)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_maxfrm)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_sg_enable)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_sg)
-RTE_EXPORT_INTERNAL_SYMBOL(fman_if_discard_rx_errors)
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_receive_rx_errors)
-RTE_EXPORT_INTERNAL_SYMBOL(netcfg_acquire)
-RTE_EXPORT_INTERNAL_SYMBOL(netcfg_release)
RTE_EXPORT_INTERNAL_SYMBOL(bman_new_pool)
RTE_EXPORT_INTERNAL_SYMBOL(bman_free_bpid)
RTE_EXPORT_INTERNAL_SYMBOL(bman_free_pool)
RTE_EXPORT_INTERNAL_SYMBOL(bman_get_params)
-RTE_EXPORT_INTERNAL_SYMBOL(bman_release)
RTE_EXPORT_INTERNAL_SYMBOL(bman_acquire)
RTE_EXPORT_INTERNAL_SYMBOL(bman_query_free_buffers)
-RTE_EXPORT_INTERNAL_SYMBOL(bman_thread_irq)
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_fqid_range)
RTE_EXPORT_INTERNAL_SYMBOL(qman_reserve_fqid_range)
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_pool_range)
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_cgrid_range)
-RTE_EXPORT_INTERNAL_SYMBOL(qman_release_cgrid_range)
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_intr_enable)
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_intr_disable)
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_ioctl_version_number)
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_link_status)
-RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_qm_channel_pool_num)
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_update_link_status)
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_update_link_speed)
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_restart_link_autoneg)
@@ -69,7 +61,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_portal_irqsource_add)
RTE_EXPORT_INTERNAL_SYMBOL(qman_irqsource_remove)
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_portal_irqsource_remove)
RTE_EXPORT_INTERNAL_SYMBOL(qman_portal_poll_rx)
-RTE_EXPORT_INTERNAL_SYMBOL(qman_clear_irq)
RTE_EXPORT_INTERNAL_SYMBOL(qman_portal_dequeue)
RTE_EXPORT_INTERNAL_SYMBOL(qman_dequeue)
RTE_EXPORT_INTERNAL_SYMBOL(qman_dqrr_consume)
@@ -77,15 +68,11 @@ RTE_EXPORT_INTERNAL_SYMBOL(qman_static_dequeue_add)
RTE_EXPORT_INTERNAL_SYMBOL(qman_dca_index)
RTE_EXPORT_INTERNAL_SYMBOL(qman_create_fq)
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_fqid)
-RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_state)
RTE_EXPORT_INTERNAL_SYMBOL(qman_init_fq)
RTE_EXPORT_INTERNAL_SYMBOL(qman_retire_fq)
RTE_EXPORT_INTERNAL_SYMBOL(qman_oos_fq)
-RTE_EXPORT_INTERNAL_SYMBOL(qman_query_fq_np)
RTE_EXPORT_INTERNAL_SYMBOL(qman_query_fq_frm_cnt)
RTE_EXPORT_INTERNAL_SYMBOL(qman_set_vdq)
-RTE_EXPORT_INTERNAL_SYMBOL(qman_volatile_dequeue)
-RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue)
RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue_multi)
RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue_multi_fq)
RTE_EXPORT_INTERNAL_SYMBOL(qman_modify_cgr)
diff --git a/drivers/bus/dpaa/include/fsl_bman.h b/drivers/bus/dpaa/include/fsl_bman.h
index fcf2f25257..8d4ef4a245 100644
--- a/drivers/bus/dpaa/include/fsl_bman.h
+++ b/drivers/bus/dpaa/include/fsl_bman.h
@@ -345,7 +345,6 @@ const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
* @flags: bit-mask of BMAN_RELEASE_FLAG_*** options
*
*/
-__rte_internal
int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
u32 flags);
__rte_internal
diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
index 0af2fb259e..a4f6eb59fc 100644
--- a/drivers/bus/dpaa/include/fsl_fman.h
+++ b/drivers/bus/dpaa/include/fsl_fman.h
@@ -133,7 +133,6 @@ int fman_if_set_ic_params(struct fman_if *fm_if,
const struct fman_if_ic_params *icp);
/* Get interface fd->offset value */
-__rte_internal
int fman_if_get_fdoff(struct fman_if *fm_if);
/* Set interface fd->offset value */
@@ -160,7 +159,6 @@ void fman_if_set_maxfrm(struct fman_if *fm_if, uint16_t max_frm);
void fman_if_set_dnia(struct fman_if *fm_if, uint32_t nia);
/* discard error packets on rx */
-__rte_internal
void fman_if_discard_rx_errors(struct fman_if *fm_if);
__rte_internal
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index 59b41e17f0..12af1d8029 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -48,7 +48,6 @@ u16 dpaa_get_qm_channel_caam(void);
__rte_internal
u16 dpaa_get_qm_channel_pool(void);
-__rte_internal
u16 dpaa_get_qm_channel_pool_num(void);
/* Portal processing (interrupt) sources */
@@ -1604,7 +1603,6 @@ u32 qman_fq_fqid(struct qman_fq *fq);
* This captures the state, as seen by the driver, at the time the function
* executes.
*/
-__rte_internal
void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
/**
@@ -1715,7 +1713,6 @@ int qman_query_fq_has_pkts(struct qman_fq *fq);
* @fq: the frame queue object to be queried
* @np: storage for the queried FQD fields
*/
-__rte_internal
int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
/**
@@ -1754,7 +1751,6 @@ int qman_query_wq(u8 query_dedicated, struct qm_mcr_querywq *wq);
* callback, or by waiting for the QMAN_FQ_STATE_VDQCR bit to disappear from the
* "flags" retrieved from qman_fq_state().
*/
-__rte_internal
int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
/**
@@ -1790,7 +1786,6 @@ int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
* of an already busy hardware resource by throttling many of the to-be-dropped
* enqueues "at the source".
*/
-__rte_internal
int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags);
__rte_internal
@@ -2071,7 +2066,6 @@ static inline int qman_alloc_cgrid(u32 *result)
* @id: the base CGR ID of the range to deallocate
* @count: the number of CGR IDs in the range
*/
-__rte_internal
void qman_release_cgrid_range(u32 id, unsigned int count);
static inline void qman_release_cgrid(u32 id)
{
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index 183ddac8aa..d4e2ea139d 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -72,11 +72,9 @@ int bman_thread_fd(void);
__rte_internal
void qman_thread_irq(void);
-__rte_internal
void bman_thread_irq(void);
__rte_internal
void qman_fq_portal_thread_irq(struct qman_portal *qp);
-__rte_internal
void qman_clear_irq(void);
/* Global setup */
diff --git a/drivers/bus/dpaa/include/netcfg.h b/drivers/bus/dpaa/include/netcfg.h
index a7d4f54b17..842ce95d92 100644
--- a/drivers/bus/dpaa/include/netcfg.h
+++ b/drivers/bus/dpaa/include/netcfg.h
@@ -33,13 +33,11 @@ struct netcfg_info {
* cfg_file: FMC config XML file
* Returns the configuration information in newly allocated memory.
*/
-__rte_internal
struct netcfg_info *netcfg_acquire(void);
/* cfg_ptr: configuration information pointer.
* Frees the resources allocated by the configuration layer.
*/
-__rte_internal
void netcfg_release(struct netcfg_info *cfg_ptr);
#ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 14/45] common/dpaax: do not export IOVA table dump helper
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (12 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 13/45] bus/dpaa: " Stephen Hemminger
@ 2026-11-29 20:48 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 15/45] net/nfb: do not export MDIO speed capability helper Stephen Hemminger
` (31 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:48 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
dpaax_iova_table_dump() is a debug helper with no caller. The dpaa
and fslmc drivers do not use it.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/dpaax/dpaax_iova_table.c | 1 -
drivers/common/dpaax/dpaax_iova_table.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index 1220d9654b..f76f50378b 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -354,7 +354,6 @@ dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length)
* Dump the table, with its entries, on screen. Only works in Debug Mode
* Not for weak hearted - the tables can get quite large
*/
-RTE_EXPORT_INTERNAL_SYMBOL(dpaax_iova_table_dump)
void
dpaax_iova_table_dump(void)
{
diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index 1f915eb270..f6cfc3e959 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -68,7 +68,6 @@ __rte_internal
void dpaax_iova_table_depopulate(void);
__rte_internal
int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
-__rte_internal
void dpaax_iova_table_dump(void);
static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 15/45] net/nfb: do not export MDIO speed capability helper
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (13 preceding siblings ...)
2026-11-29 20:48 ` [PATCH 14/45] common/dpaax: do not export IOVA table dump helper Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-30 9:56 ` Martin Spinler
2026-11-29 20:49 ` [PATCH 16/45] common/sxe2: do not export internal ioctl channel helpers Stephen Hemminger
` (30 subsequent siblings)
45 siblings, 1 reply; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Martin Spinler
nfb_mdio_cl45_pma_get_speed_capa() is called from nfb_ethdev.c in the
same driver, so it does not need to be an exported internal symbol.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/nfb/nfb_mdio.c | 1 -
drivers/net/nfb/nfb_mdio.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/net/nfb/nfb_mdio.c b/drivers/net/nfb/nfb_mdio.c
index a4a827e734..5d352ef1ea 100644
--- a/drivers/net/nfb/nfb_mdio.c
+++ b/drivers/net/nfb/nfb_mdio.c
@@ -7,7 +7,6 @@
#include "nfb_mdio.h"
-RTE_EXPORT_INTERNAL_SYMBOL(nfb_mdio_cl45_pma_get_speed_capa)
void
nfb_mdio_cl45_pma_get_speed_capa(struct mdio_if_info *info, uint32_t *capa)
{
diff --git a/drivers/net/nfb/nfb_mdio.h b/drivers/net/nfb/nfb_mdio.h
index 7cafe17dc5..0df34839ca 100644
--- a/drivers/net/nfb/nfb_mdio.h
+++ b/drivers/net/nfb/nfb_mdio.h
@@ -33,7 +33,6 @@ static inline int nfb_mdio_if_write_pma(struct mdio_if_info *if_info, uint16_t a
return if_info->mdio_write(if_info->dev, if_info->prtad, NFB_MDIO_DEV_PMA, addr, val);
}
-__rte_internal
void nfb_mdio_cl45_pma_get_speed_capa(struct mdio_if_info *if_info, uint32_t *capa);
#endif /* _NFB_MDIO_H_ */
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 16/45] common/sxe2: do not export internal ioctl channel helpers
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (14 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 15/45] net/nfb: do not export MDIO speed capability helper Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 17/45] common/mlx5: do not export internal symbols used only in common code Stephen Hemminger
` (29 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jie Liu
The ioctl channel open/close/handshake and DMA map helpers, and the
memory event callback, are used only inside the sxe2 common code.
The sxe2 net driver uses the higher level interfaces.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/sxe2/sxe2_common.c | 1 -
drivers/common/sxe2/sxe2_common.h | 1 -
drivers/common/sxe2/sxe2_ioctl_chnl.c | 5 -----
drivers/common/sxe2/sxe2_ioctl_chnl_func.h | 5 -----
4 files changed, 12 deletions(-)
diff --git a/drivers/common/sxe2/sxe2_common.c b/drivers/common/sxe2/sxe2_common.c
index 6e387a8a73..6670f3d814 100644
--- a/drivers/common/sxe2/sxe2_common.c
+++ b/drivers/common/sxe2/sxe2_common.c
@@ -246,7 +246,6 @@ static int32_t sxe2_dma_mem_map(struct sxe2_common_device *cdev,
return ret;
}
-RTE_EXPORT_INTERNAL_SYMBOL(sxe2_common_mem_event_cb)
void
sxe2_common_mem_event_cb(enum rte_mem_event type,
const void *addr, size_t size, void *arg __rte_unused)
diff --git a/drivers/common/sxe2/sxe2_common.h b/drivers/common/sxe2/sxe2_common.h
index efc8d3585a..3d97470e7d 100644
--- a/drivers/common/sxe2/sxe2_common.h
+++ b/drivers/common/sxe2/sxe2_common.h
@@ -68,7 +68,6 @@ struct sxe2_class_driver {
uint32_t intr_rmv;
};
-__rte_internal
void
sxe2_common_mem_event_cb(enum rte_mem_event type,
const void *addr, size_t size, void *arg __rte_unused);
diff --git a/drivers/common/sxe2/sxe2_ioctl_chnl.c b/drivers/common/sxe2/sxe2_ioctl_chnl.c
index 9f455bd8d5..4ddeb7a5d7 100644
--- a/drivers/common/sxe2/sxe2_ioctl_chnl.c
+++ b/drivers/common/sxe2/sxe2_ioctl_chnl.c
@@ -68,7 +68,6 @@ sxe2_drv_cmd_exec(struct sxe2_common_device *cdev,
}
-RTE_EXPORT_INTERNAL_SYMBOL(sxe2_drv_dev_open)
int32_t
sxe2_drv_dev_open(struct sxe2_common_device *cdev, struct rte_pci_device *pci_dev)
{
@@ -101,7 +100,6 @@ sxe2_drv_dev_open(struct sxe2_common_device *cdev, struct rte_pci_device *pci_de
return ret;
}
-RTE_EXPORT_INTERNAL_SYMBOL(sxe2_drv_dev_close)
void
sxe2_drv_dev_close(struct sxe2_common_device *cdev)
{
@@ -115,7 +113,6 @@ sxe2_drv_dev_close(struct sxe2_common_device *cdev)
SXE2_CDEV_TO_CMD_FD(cdev) = SXE2_CMD_FD_INVALID;
}
-RTE_EXPORT_INTERNAL_SYMBOL(sxe2_drv_dev_handshake)
int32_t
sxe2_drv_dev_handshake(struct sxe2_common_device *cdev)
{
@@ -389,7 +386,6 @@ sxe2_drv_dev_munmap(struct sxe2_common_device *cdev __rte_unused, void *virt, ui
return ret;
}
-RTE_EXPORT_INTERNAL_SYMBOL(sxe2_drv_dev_dma_map)
int32_t
sxe2_drv_dev_dma_map(struct sxe2_common_device *cdev, uint64_t vaddr,
uint64_t iova, uint64_t size)
@@ -447,7 +443,6 @@ sxe2_drv_dev_dma_map(struct sxe2_common_device *cdev, uint64_t vaddr,
return ret;
}
-RTE_EXPORT_INTERNAL_SYMBOL(sxe2_drv_dev_dma_unmap)
int32_t
sxe2_drv_dev_dma_unmap(struct sxe2_common_device *cdev, uint64_t iova)
{
diff --git a/drivers/common/sxe2/sxe2_ioctl_chnl_func.h b/drivers/common/sxe2/sxe2_ioctl_chnl_func.h
index 368be16d4f..c6d204fffe 100644
--- a/drivers/common/sxe2/sxe2_ioctl_chnl_func.h
+++ b/drivers/common/sxe2/sxe2_ioctl_chnl_func.h
@@ -24,17 +24,14 @@ int32_t
sxe2_drv_cmd_exec(struct sxe2_common_device *cdev,
struct sxe2_drv_cmd_params *cmd_params);
-__rte_internal
int32_t
sxe2_drv_dev_open(struct sxe2_common_device *cdev,
struct rte_pci_device *pci_dev);
-__rte_internal
void
sxe2_drv_dev_close(struct sxe2_common_device *cdev);
-__rte_internal
int32_t
sxe2_drv_dev_handshake(struct sxe2_common_device *cdev);
@@ -64,12 +61,10 @@ __rte_internal
int32_t
sxe2_drv_dev_munmap(struct sxe2_common_device *cdev, void *virt, uint64_t len);
-__rte_internal
int32_t
sxe2_drv_dev_dma_map(struct sxe2_common_device *cdev, uint64_t vaddr,
uint64_t iova, uint64_t size);
-__rte_internal
int32_t
sxe2_drv_dev_dma_unmap(struct sxe2_common_device *cdev, uint64_t iova);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 17/45] common/mlx5: do not export internal symbols used only in common code
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (15 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 16/45] common/sxe2: do not export internal ioctl channel helpers Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-30 10:50 ` Dariusz Sosnowski
2026-11-29 20:49 ` [PATCH 18/45] net/idpf: do not export internal symbols used only in the driver Stephen Hemminger
` (28 subsequent siblings)
45 siblings, 1 reply; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Dariusz Sosnowski, Viacheslav Ovsiienko,
Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad
These DevX commands, the multi-process request helpers, the list
lookup and the malloc statistics dump are only used inside
common/mlx5. The net, crypto, compress and regex mlx5 drivers use
other entry points, which keep their exports.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/mlx5/mlx5_common.c | 1 -
drivers/common/mlx5/mlx5_common_mp.c | 4 ----
drivers/common/mlx5/mlx5_common_mp.h | 4 ----
drivers/common/mlx5/mlx5_common_utils.c | 1 -
drivers/common/mlx5/mlx5_common_utils.h | 1 -
drivers/common/mlx5/mlx5_devx_cmds.c | 7 -------
drivers/common/mlx5/mlx5_devx_cmds.h | 7 -------
drivers/common/mlx5/mlx5_malloc.c | 1 -
drivers/common/mlx5/mlx5_malloc.h | 1 -
9 files changed, 27 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index f4b8904366..6180402105 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -21,7 +21,6 @@
#include "mlx5_common_defs.h"
#include "mlx5_common_private.h"
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_haswell_broadwell_cpu)
uint8_t mlx5_haswell_broadwell_cpu;
/* Driver type key for new device global syntax. */
diff --git a/drivers/common/mlx5/mlx5_common_mp.c b/drivers/common/mlx5/mlx5_common_mp.c
index 1ff268f348..dd05c17a6e 100644
--- a/drivers/common/mlx5/mlx5_common_mp.c
+++ b/drivers/common/mlx5/mlx5_common_mp.c
@@ -25,7 +25,6 @@
* @return
* 0 on success, a negative errno value otherwise and rte_errno is set.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_mp_req_mr_create)
int
mlx5_mp_req_mr_create(struct mlx5_common_device *cdev, uintptr_t addr)
{
@@ -65,7 +64,6 @@ mlx5_mp_req_mr_create(struct mlx5_common_device *cdev, uintptr_t addr)
* @param reg
* True to register the mempool, False to unregister.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_mp_req_mempool_reg)
int
mlx5_mp_req_mempool_reg(struct mlx5_common_device *cdev,
struct rte_mempool *mempool, bool reg,
@@ -215,7 +213,6 @@ mlx5_mp_init_primary(const char *name, const rte_mp_t primary_action)
/**
* Un-initialize by primary process.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_mp_uninit_primary)
void
mlx5_mp_uninit_primary(const char *name)
{
@@ -237,7 +234,6 @@ mlx5_mp_init_secondary(const char *name, const rte_mp_t secondary_action)
/**
* Un-initialize by secondary process.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_mp_uninit_secondary)
void
mlx5_mp_uninit_secondary(const char *name)
{
diff --git a/drivers/common/mlx5/mlx5_common_mp.h b/drivers/common/mlx5/mlx5_common_mp.h
index ab8bcccba6..eb1d9521a0 100644
--- a/drivers/common/mlx5/mlx5_common_mp.h
+++ b/drivers/common/mlx5/mlx5_common_mp.h
@@ -126,15 +126,11 @@ mp_init_port_agnostic_msg(struct rte_mp_msg *msg, enum mlx5_mp_req_type type)
__rte_internal
int mlx5_mp_init_primary(const char *name, const rte_mp_t primary_action);
-__rte_internal
void mlx5_mp_uninit_primary(const char *name);
__rte_internal
int mlx5_mp_init_secondary(const char *name, const rte_mp_t secondary_action);
-__rte_internal
void mlx5_mp_uninit_secondary(const char *name);
-__rte_internal
int mlx5_mp_req_mr_create(struct mlx5_common_device *cdev, uintptr_t addr);
-__rte_internal
int mlx5_mp_req_mempool_reg(struct mlx5_common_device *cdev,
struct rte_mempool *mempool, bool reg,
bool is_extmem);
diff --git a/drivers/common/mlx5/mlx5_common_utils.c b/drivers/common/mlx5/mlx5_common_utils.c
index 14056cebcb..f6f7c27f76 100644
--- a/drivers/common/mlx5/mlx5_common_utils.c
+++ b/drivers/common/mlx5/mlx5_common_utils.c
@@ -122,7 +122,6 @@ _mlx5_list_lookup(struct mlx5_list_inconst *l_inconst,
return entry;
}
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_list_lookup)
struct mlx5_list_entry *
mlx5_list_lookup(struct mlx5_list *list, void *ctx)
{
diff --git a/drivers/common/mlx5/mlx5_common_utils.h b/drivers/common/mlx5/mlx5_common_utils.h
index e56f367bf2..4f20058245 100644
--- a/drivers/common/mlx5/mlx5_common_utils.h
+++ b/drivers/common/mlx5/mlx5_common_utils.h
@@ -184,7 +184,6 @@ struct mlx5_list *mlx5_list_create(const char *name, void *ctx,
* @return
* Pointer of the list entry if found, NULL otherwise.
*/
-__rte_internal
struct mlx5_list_entry *mlx5_list_lookup(struct mlx5_list *list,
void *ctx);
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index e5d9c92779..93c0d8d329 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -138,7 +138,6 @@ mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id, uint32_t arg,
* @return
* 0 on success, a negative value otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_devx_cmd_register_write)
int
mlx5_devx_cmd_register_write(void *ctx, uint16_t reg_id, uint32_t arg,
uint32_t *data, uint32_t dw_cnt)
@@ -987,7 +986,6 @@ mlx5_devx_query_pkt_integrity_match(void *hcattr)
* @return
* 0 on success, a negative value otherwise.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_devx_cmd_query_hca_attr)
int
mlx5_devx_cmd_query_hca_attr(void *ctx,
struct mlx5_hca_attr *attr)
@@ -1772,7 +1770,6 @@ mlx5_devx_cmd_query_rq(struct mlx5_devx_obj *rq_obj, void *out, size_t outlen)
* @return
* The DevX object created, NULL otherwise and rte_errno is set.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_devx_cmd_create_rmp)
struct mlx5_devx_obj *
mlx5_devx_cmd_create_rmp(void *ctx,
struct mlx5_devx_create_rmp_attr *rmp_attr,
@@ -2359,7 +2356,6 @@ mlx5_devx_cmd_flow_single_dump(void *rule_info __rte_unused,
* @return
* The DevX object created, NULL otherwise and rte_errno is set.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_devx_cmd_create_cq)
struct mlx5_devx_obj *
mlx5_devx_cmd_create_cq(void *ctx, struct mlx5_devx_cq_attr *attr)
{
@@ -2981,7 +2977,6 @@ mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx, uint32_t pd)
* @return
* The DevX object created, NULL otherwise and rte_errno is set.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_devx_cmd_alloc_pd)
struct mlx5_devx_obj *
mlx5_devx_cmd_alloc_pd(void *ctx)
{
@@ -3394,7 +3389,6 @@ mlx5_devx_cmd_create_dek_obj(void *ctx, struct mlx5_devx_dek_attr *attr)
* @return
* The DevX object created, NULL otherwise and rte_errno is set.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_devx_cmd_create_import_kek_obj)
struct mlx5_devx_obj *
mlx5_devx_cmd_create_import_kek_obj(void *ctx,
struct mlx5_devx_import_kek_attr *attr)
@@ -3442,7 +3436,6 @@ mlx5_devx_cmd_create_import_kek_obj(void *ctx,
* @return
* The DevX object created, NULL otherwise and rte_errno is set.
*/
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_devx_cmd_create_credential_obj)
struct mlx5_devx_obj *
mlx5_devx_cmd_create_credential_obj(void *ctx,
struct mlx5_devx_credential_attr *attr)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index 504b4a4f64..d6f0d35d91 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -748,7 +748,6 @@ int mlx5_devx_cmd_flow_counter_query(struct mlx5_devx_obj *dcs,
uint32_t mkey, void *addr,
void *cmd_comp,
uint64_t async_id);
-__rte_internal
int mlx5_devx_cmd_query_hca_attr(void *ctx,
struct mlx5_hca_attr *attr);
__rte_internal
@@ -771,7 +770,6 @@ struct mlx5_devx_obj *mlx5_devx_cmd_create_rq(void *ctx,
__rte_internal
int mlx5_devx_cmd_modify_rq(struct mlx5_devx_obj *rq,
struct mlx5_devx_modify_rq_attr *rq_attr);
-__rte_internal
struct mlx5_devx_obj *mlx5_devx_cmd_create_rmp(void *ctx,
struct mlx5_devx_create_rmp_attr *rq_attr, int socket);
__rte_internal
@@ -805,7 +803,6 @@ int mlx5_devx_cmd_flow_dump(void *fdb_domain, void *rx_domain, void *tx_domain,
FILE *file);
__rte_internal
int mlx5_devx_cmd_flow_single_dump(void *rule, FILE *file);
-__rte_internal
struct mlx5_devx_obj *mlx5_devx_cmd_create_cq(void *ctx,
struct mlx5_devx_cq_attr *attr);
__rte_internal
@@ -846,7 +843,6 @@ __rte_internal
int mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id,
uint32_t arg, uint32_t *data, uint32_t dw_cnt);
-__rte_internal
int mlx5_devx_cmd_register_write(void *ctx, uint16_t reg_id,
uint32_t arg, uint32_t *data, uint32_t dw_cnt);
@@ -890,7 +886,6 @@ int mlx5_devx_cmd_query_virtio_q_counters(struct mlx5_devx_obj *couners_obj,
__rte_internal
struct mlx5_devx_obj *mlx5_devx_cmd_create_flow_hit_aso_obj(void *ctx,
uint32_t pd);
-__rte_internal
struct mlx5_devx_obj *mlx5_devx_cmd_alloc_pd(void *ctx);
__rte_internal
@@ -926,12 +921,10 @@ __rte_internal
struct mlx5_devx_obj *
mlx5_devx_cmd_create_dek_obj(void *ctx, struct mlx5_devx_dek_attr *attr);
-__rte_internal
struct mlx5_devx_obj *
mlx5_devx_cmd_create_import_kek_obj(void *ctx,
struct mlx5_devx_import_kek_attr *attr);
-__rte_internal
struct mlx5_devx_obj *
mlx5_devx_cmd_create_credential_obj(void *ctx,
struct mlx5_devx_credential_attr *attr);
diff --git a/drivers/common/mlx5/mlx5_malloc.c b/drivers/common/mlx5/mlx5_malloc.c
index 86e2b8881e..fc19f5408e 100644
--- a/drivers/common/mlx5/mlx5_malloc.c
+++ b/drivers/common/mlx5/mlx5_malloc.c
@@ -289,7 +289,6 @@ mlx5_free(void *addr)
}
}
-RTE_EXPORT_INTERNAL_SYMBOL(mlx5_memory_stat_dump)
void
mlx5_memory_stat_dump(void)
{
diff --git a/drivers/common/mlx5/mlx5_malloc.h b/drivers/common/mlx5/mlx5_malloc.h
index 46ea5bc8f0..5ca426c55e 100644
--- a/drivers/common/mlx5/mlx5_malloc.h
+++ b/drivers/common/mlx5/mlx5_malloc.h
@@ -47,7 +47,6 @@ void mlx5_malloc_mem_select(uint32_t sys_mem_en);
/**
* Dump the PMD memory usage statistic.
*/
-__rte_internal
void mlx5_memory_stat_dump(void);
/**
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 18/45] net/idpf: do not export internal symbols used only in the driver
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (16 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 17/45] common/mlx5: do not export internal symbols used only in common code Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 19/45] net/iavf: do not export VF reset function Stephen Hemminger
` (27 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jingjing Wu, Praveen Shetty
The single queue and split queue burst functions are installed
through the Rx and Tx path info tables, and the listed virtchnl and
queue helpers are called from the idpf driver itself. The cpfl
driver, which is the only other user of the idpf common code, does
not reference any of them.
Drop the internal exports and the matching __rte_internal tags.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
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 | 9 ---------
drivers/net/intel/idpf/idpf_common_rxtx.h | 16 ----------------
drivers/net/intel/idpf/idpf_common_rxtx_avx2.c | 3 ---
drivers/net/intel/idpf/idpf_common_rxtx_avx512.c | 4 ----
drivers/net/intel/idpf/idpf_common_virtchnl.c | 8 --------
drivers/net/intel/idpf/idpf_common_virtchnl.h | 8 --------
8 files changed, 50 deletions(-)
diff --git a/drivers/net/intel/idpf/idpf_common_device.c b/drivers/net/intel/idpf/idpf_common_device.c
index 1586dae96c..b03f34bae3 100644
--- a/drivers/net/intel/idpf/idpf_common_device.c
+++ b/drivers/net/intel/idpf/idpf_common_device.c
@@ -636,7 +636,6 @@ idpf_vport_rss_config(struct idpf_vport *vport)
return ret;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vport_irq_map_config)
int
idpf_vport_irq_map_config(struct idpf_vport *vport, uint16_t nb_rx_queues)
{
diff --git a/drivers/net/intel/idpf/idpf_common_device.h b/drivers/net/intel/idpf/idpf_common_device.h
index f4c7f1b2d1..96a2bb1d7f 100644
--- a/drivers/net/intel/idpf/idpf_common_device.h
+++ b/drivers/net/intel/idpf/idpf_common_device.h
@@ -250,7 +250,6 @@ __rte_internal
int idpf_vport_deinit(struct idpf_vport *vport);
__rte_internal
int idpf_vport_rss_config(struct idpf_vport *vport);
-__rte_internal
int idpf_vport_irq_map_config(struct idpf_vport *vport, uint16_t nb_rx_queues);
__rte_internal
int idpf_vport_irq_unmap_config(struct idpf_vport *vport, uint16_t nb_rx_queues);
diff --git a/drivers/net/intel/idpf/idpf_common_rxtx.c b/drivers/net/intel/idpf/idpf_common_rxtx.c
index eb29024547..61e5bc035c 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx.c
+++ b/drivers/net/intel/idpf/idpf_common_rxtx.c
@@ -284,7 +284,6 @@ idpf_qc_split_tx_complq_reset(struct idpf_complq *cq)
cq->expected_gen_id = 1;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_splitq_rearm_common)
void
idpf_splitq_rearm_common(struct idpf_rx_queue *rx_bufq)
{
@@ -372,7 +371,6 @@ idpf_qc_single_tx_queue_reset(struct ci_tx_queue *txq)
txq->tx_next_rs = txq->tx_rs_thresh - 1;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_qc_rx_queue_release)
void
idpf_qc_rx_queue_release(void *rxq)
{
@@ -403,7 +401,6 @@ idpf_qc_rx_queue_release(void *rxq)
rte_free(q);
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_qc_tx_queue_release)
void
idpf_qc_tx_queue_release(void *txq)
{
@@ -651,7 +648,6 @@ idpf_split_rx_bufq_refill(struct idpf_rx_queue *rx_bufq)
rx_bufq->rx_tail = next_avail;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_splitq_recv_pkts)
uint16_t
idpf_dp_splitq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
@@ -932,7 +928,6 @@ idpf_get_context_desc(uint64_t ol_flags, const struct rte_mbuf *mbuf,
return 1;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_splitq_xmit_pkts)
uint16_t
idpf_dp_splitq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
@@ -1164,7 +1159,6 @@ idpf_singleq_rx_rss_offload(struct rte_mbuf *mb,
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_singleq_recv_pkts)
uint16_t
idpf_dp_singleq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
@@ -1288,7 +1282,6 @@ idpf_dp_singleq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
return nb_rx;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_singleq_recv_scatter_pkts)
uint16_t
idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
@@ -1434,7 +1427,6 @@ idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
}
/* TX function */
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_singleq_xmit_pkts)
uint16_t
idpf_dp_singleq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
@@ -1444,7 +1436,6 @@ idpf_dp_singleq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
idpf_get_context_desc, NULL, NULL);
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_singleq_xmit_pkts_simple)
uint16_t
idpf_dp_singleq_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
diff --git a/drivers/net/intel/idpf/idpf_common_rxtx.h b/drivers/net/intel/idpf/idpf_common_rxtx.h
index a4843c9f69..128455b595 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx.h
+++ b/drivers/net/intel/idpf/idpf_common_rxtx.h
@@ -221,13 +221,10 @@ __rte_internal
void idpf_qc_split_tx_release_mbufs(struct ci_tx_queue *txq);
__rte_internal
void idpf_qc_split_tx_complq_reset(struct idpf_complq *cq);
-__rte_internal
void idpf_splitq_rearm_common(struct idpf_rx_queue *rx_bufq);
__rte_internal
void idpf_qc_single_tx_queue_reset(struct ci_tx_queue *txq);
-__rte_internal
void idpf_qc_rx_queue_release(void *rxq);
-__rte_internal
void idpf_qc_tx_queue_release(void *txq);
__rte_internal
int idpf_qc_ts_mbuf_register(struct idpf_rx_queue *rxq);
@@ -235,19 +232,14 @@ __rte_internal
int idpf_qc_single_rxq_mbufs_alloc(struct idpf_rx_queue *rxq);
__rte_internal
int idpf_qc_split_rxq_mbufs_alloc(struct idpf_rx_queue *rxq);
-__rte_internal
uint16_t idpf_dp_splitq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_splitq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_singleq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_singleq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_singleq_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
__rte_internal
@@ -257,34 +249,26 @@ __rte_internal
int idpf_qc_singleq_rx_vec_setup(struct idpf_rx_queue *rxq);
__rte_internal
int idpf_qc_splitq_rx_vec_setup(struct idpf_rx_queue *rxq);
-__rte_internal
uint16_t idpf_dp_singleq_recv_pkts_avx512(void *rx_queue,
struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_splitq_recv_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_singleq_xmit_pkts_avx512(void *tx_queue,
struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_splitq_xmit_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_splitq_recv_pkts_avx2(void *rxq, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_splitq_xmit_pkts_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
__rte_internal
uint16_t idpf_dp_singleq_recv_pkts_avx2(void *rx_queue,
struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
-__rte_internal
uint16_t idpf_dp_singleq_xmit_pkts_avx2(void *tx_queue,
struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
diff --git a/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c b/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
index 14f9350c01..7ed407a4df 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
+++ b/drivers/net/intel/idpf/idpf_common_rxtx_avx2.c
@@ -482,7 +482,6 @@ idpf_dp_singleq_recv_pkts_avx2(void *rx_queue, struct rte_mbuf **rx_pkts, uint16
return _idpf_singleq_recv_raw_pkts_vec_avx2(rx_queue, rx_pkts, nb_pkts);
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_splitq_recv_pkts_avx2)
uint16_t
idpf_dp_splitq_recv_pkts_avx2(void *rxq, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
{
@@ -757,7 +756,6 @@ idpf_singleq_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts
return nb_pkts;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_singleq_xmit_pkts_avx2)
uint16_t
idpf_dp_singleq_xmit_pkts_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
@@ -939,7 +937,6 @@ idpf_splitq_xmit_fixed_burst_vec_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
return nb_pkts;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_splitq_xmit_pkts_avx2)
uint16_t
idpf_dp_splitq_xmit_pkts_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
diff --git a/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c b/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c
index 5788a009ab..7d29e0b12d 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c
+++ b/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c
@@ -548,7 +548,6 @@ _idpf_singleq_recv_raw_pkts_avx512(struct idpf_rx_queue *rxq,
* Notice:
* - nb_pkts < IDPF_DESCS_PER_LOOP, just return no packet
*/
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_singleq_recv_pkts_avx512)
uint16_t
idpf_dp_singleq_recv_pkts_avx512(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
@@ -966,7 +965,6 @@ _idpf_splitq_recv_raw_pkts_avx512(struct idpf_rx_queue *rxq,
}
/* only bufq2 can receive pkts */
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_splitq_recv_pkts_avx512)
uint16_t
idpf_dp_splitq_recv_pkts_avx512(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
@@ -1124,7 +1122,6 @@ idpf_singleq_xmit_pkts_vec_avx512_cmn(void *tx_queue, struct rte_mbuf **tx_pkts,
return nb_tx;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_singleq_xmit_pkts_avx512)
uint16_t
idpf_dp_singleq_xmit_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
@@ -1326,7 +1323,6 @@ idpf_splitq_xmit_pkts_vec_avx512_cmn(void *tx_queue, struct rte_mbuf **tx_pkts,
return nb_tx;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_dp_splitq_xmit_pkts_avx512)
uint16_t
idpf_dp_splitq_xmit_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.c b/drivers/net/intel/idpf/idpf_common_virtchnl.c
index 4befd5fc83..b1a13d1c56 100644
--- a/drivers/net/intel/idpf/idpf_common_virtchnl.c
+++ b/drivers/net/intel/idpf/idpf_common_virtchnl.c
@@ -187,7 +187,6 @@ idpf_read_msg_from_cp(struct idpf_adapter *adapter, uint16_t buf_len,
#define MAX_TRY_TIMES 200
#define ASQ_DELAY_MS 10
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_one_msg_read)
int
idpf_vc_one_msg_read(struct idpf_adapter *adapter, uint32_t ops, uint16_t buf_len,
uint8_t *buf)
@@ -262,7 +261,6 @@ idpf_vc_cmd_execute(struct idpf_adapter *adapter, struct idpf_cmd_info *args)
return err;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_api_version_check)
int
idpf_vc_api_version_check(struct idpf_adapter *adapter)
{
@@ -303,7 +301,6 @@ idpf_vc_api_version_check(struct idpf_adapter *adapter)
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_caps_get)
int
idpf_vc_caps_get(struct idpf_adapter *adapter)
{
@@ -328,7 +325,6 @@ idpf_vc_caps_get(struct idpf_adapter *adapter)
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_vport_create)
int
idpf_vc_vport_create(struct idpf_vport *vport,
struct virtchnl2_create_vport *create_vport_info)
@@ -647,7 +643,6 @@ idpf_vc_rss_hash_get(struct idpf_vport *vport)
return err;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_rss_hash_set)
int
idpf_vc_rss_hash_set(struct idpf_vport *vport)
{
@@ -674,7 +669,6 @@ idpf_vc_rss_hash_set(struct idpf_vport *vport)
return err;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_irq_map_unmap_config)
int
idpf_vc_irq_map_unmap_config(struct idpf_vport *vport, uint16_t nb_rxq, bool map)
{
@@ -893,7 +887,6 @@ idpf_vc_queue_switch(struct idpf_vport *vport, uint16_t qid,
}
#define IDPF_RXTX_QUEUE_CHUNKS_NUM 2
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_queues_ena_dis)
int
idpf_vc_queues_ena_dis(struct idpf_vport *vport, bool enable)
{
@@ -988,7 +981,6 @@ idpf_vc_vport_ena_dis(struct idpf_vport *vport, bool enable)
return err;
}
-RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_ptype_info_query)
int
idpf_vc_ptype_info_query(struct idpf_adapter *adapter,
struct virtchnl2_get_ptype_info *req_ptype_info,
diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.h b/drivers/net/intel/idpf/idpf_common_virtchnl.h
index 90fce65676..a8c693240a 100644
--- a/drivers/net/intel/idpf/idpf_common_virtchnl.h
+++ b/drivers/net/intel/idpf/idpf_common_virtchnl.h
@@ -8,11 +8,8 @@
#include "idpf_common_device.h"
#include "idpf_common_rxtx.h"
-__rte_internal
int idpf_vc_api_version_check(struct idpf_adapter *adapter);
-__rte_internal
int idpf_vc_caps_get(struct idpf_adapter *adapter);
-__rte_internal
int idpf_vc_vport_create(struct idpf_vport *vport,
struct virtchnl2_create_vport *vport_info);
__rte_internal
@@ -21,9 +18,7 @@ __rte_internal
int idpf_vc_rss_key_set(struct idpf_vport *vport);
__rte_internal
int idpf_vc_rss_lut_set(struct idpf_vport *vport);
-__rte_internal
int idpf_vc_rss_hash_set(struct idpf_vport *vport);
-__rte_internal
int idpf_vc_irq_map_unmap_config(struct idpf_vport *vport,
uint16_t nb_rxq, bool map);
__rte_internal
@@ -32,7 +27,6 @@ int idpf_vc_cmd_execute(struct idpf_adapter *adapter,
__rte_internal
int idpf_vc_queue_switch(struct idpf_vport *vport, uint16_t qid,
bool rx, bool on, uint32_t type);
-__rte_internal
int idpf_vc_queues_ena_dis(struct idpf_vport *vport, bool enable);
__rte_internal
int idpf_vc_vport_ena_dis(struct idpf_vport *vport, bool enable);
@@ -40,11 +34,9 @@ __rte_internal
int idpf_vc_vectors_alloc(struct idpf_vport *vport, uint16_t num_vectors);
__rte_internal
int idpf_vc_vectors_dealloc(struct idpf_vport *vport);
-__rte_internal
int idpf_vc_ptype_info_query(struct idpf_adapter *adapter,
struct virtchnl2_get_ptype_info *req_ptype_info,
struct virtchnl2_get_ptype_info *recv_ptype_info);
-__rte_internal
int idpf_vc_one_msg_read(struct idpf_adapter *adapter, uint32_t ops,
uint16_t buf_len, uint8_t *buf);
__rte_internal
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 19/45] net/iavf: do not export VF reset function
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (17 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 18/45] net/idpf: do not export internal symbols used only in the driver Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 20/45] eal: do not export unused Windows interrupt handle accessors Stephen Hemminger
` (26 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Vladimir Medvedkin
iavf_vf_reset() is called from iavf_ethdev.c in the same driver.
The ice driver, which also builds the iavf base code, does not use
it, so it does not need to be an exported internal symbol.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/iavf/base/iavf_prototype.h | 1 -
drivers/net/intel/iavf/iavf_base_symbols.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/net/intel/iavf/base/iavf_prototype.h b/drivers/net/intel/iavf/base/iavf_prototype.h
index 5d2ee0a785..083d3d7547 100644
--- a/drivers/net/intel/iavf/base/iavf_prototype.h
+++ b/drivers/net/intel/iavf/base/iavf_prototype.h
@@ -87,7 +87,6 @@ STATIC INLINE struct iavf_rx_ptype_decoded decode_rx_desc_ptype(u8 ptype)
__rte_internal
void iavf_vf_parse_hw_config(struct iavf_hw *hw,
struct virtchnl_vf_resource *msg);
-__rte_internal
enum iavf_status iavf_vf_reset(struct iavf_hw *hw);
__rte_internal
enum iavf_status iavf_aq_send_msg_to_pf(struct iavf_hw *hw,
diff --git a/drivers/net/intel/iavf/iavf_base_symbols.c b/drivers/net/intel/iavf/iavf_base_symbols.c
index 2111b14aa8..4566b48299 100644
--- a/drivers/net/intel/iavf/iavf_base_symbols.c
+++ b/drivers/net/intel/iavf/iavf_base_symbols.c
@@ -11,4 +11,3 @@ RTE_EXPORT_INTERNAL_SYMBOL(iavf_clean_arq_element)
RTE_EXPORT_INTERNAL_SYMBOL(iavf_set_mac_type)
RTE_EXPORT_INTERNAL_SYMBOL(iavf_aq_send_msg_to_pf)
RTE_EXPORT_INTERNAL_SYMBOL(iavf_vf_parse_hw_config)
-RTE_EXPORT_INTERNAL_SYMBOL(iavf_vf_reset)
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 20/45] eal: do not export unused Windows interrupt handle accessors
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (18 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 19/45] net/iavf: do not export VF reset function Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 21/45] common/cnxk: do not export internal symbols used only in roc Stephen Hemminger
` (25 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Harman Kalra
rte_intr_instance_windows_handle_get() and the matching set function
have no caller. Windows drivers use the interrupt instance accessors
for the file descriptor fields instead.
Drop the internal exports. Only the Linux build is compile tested
here, but these functions are built from common code.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/common/eal_common_interrupts.c | 2 --
lib/eal/include/rte_interrupts.h | 2 --
2 files changed, 4 deletions(-)
diff --git a/lib/eal/common/eal_common_interrupts.c b/lib/eal/common/eal_common_interrupts.c
index f3eee636df..aa3ff0da50 100644
--- a/lib/eal/common/eal_common_interrupts.c
+++ b/lib/eal/common/eal_common_interrupts.c
@@ -520,7 +520,6 @@ void rte_intr_vec_list_free(struct rte_intr_handle *intr_handle)
intr_handle->vec_list_size = 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_instance_windows_handle_get)
void *rte_intr_instance_windows_handle_get(struct rte_intr_handle *intr_handle)
{
CHECK_VALID_INTR_HANDLE(intr_handle);
@@ -530,7 +529,6 @@ void *rte_intr_instance_windows_handle_get(struct rte_intr_handle *intr_handle)
return NULL;
}
-RTE_EXPORT_INTERNAL_SYMBOL(rte_intr_instance_windows_handle_set)
int rte_intr_instance_windows_handle_set(struct rte_intr_handle *intr_handle,
void *windows_handle)
{
diff --git a/lib/eal/include/rte_interrupts.h b/lib/eal/include/rte_interrupts.h
index cfc3562a33..a0b83c99d1 100644
--- a/lib/eal/include/rte_interrupts.h
+++ b/lib/eal/include/rte_interrupts.h
@@ -778,7 +778,6 @@ rte_intr_event_list_update(struct rte_intr_handle *intr_handle, int size);
* - On success, Windows handle.
* - On failure, NULL.
*/
-__rte_internal
void *
rte_intr_instance_windows_handle_get(struct rte_intr_handle *intr_handle);
@@ -795,7 +794,6 @@ rte_intr_instance_windows_handle_get(struct rte_intr_handle *intr_handle);
* - On success, zero
* - On failure, a negative value and rte_errno is set.
*/
-__rte_internal
int
rte_intr_instance_windows_handle_set(struct rte_intr_handle *intr_handle,
void *windows_handle);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 21/45] common/cnxk: do not export internal symbols used only in roc
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (19 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 20/45] eal: do not export unused Windows interrupt handle accessors Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 22/45] common/sfc_efx: do not export internal symbols unused outside base Stephen Hemminger
` (24 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Srikanth Yalavarthi
171 roc functions are only called from inside common/cnxk itself.
The cnxk net, crypto, event, dma, ml and raw drivers, including the
per-offload template files that are not built in a default config,
do not reference any of them.
Drop the internal exports and the __roc_api tags on the matching
declarations, and re-indent the continuation lines that were aligned
to the longer first line.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/cnxk/cnxk_security.c | 7 -
drivers/common/cnxk/cnxk_security.h | 16 +-
drivers/common/cnxk/roc_aes.h | 2 +-
drivers/common/cnxk/roc_bphy_irq.h | 2 +-
drivers/common/cnxk/roc_cpt.h | 12 +-
drivers/common/cnxk/roc_dpi.h | 10 +-
drivers/common/cnxk/roc_hash.h | 8 +-
drivers/common/cnxk/roc_idev.h | 22 +-
drivers/common/cnxk/roc_ie_ow.h | 2 +-
drivers/common/cnxk/roc_mcs.h | 38 ++--
drivers/common/cnxk/roc_ml.h | 22 +-
drivers/common/cnxk/roc_nix.h | 190 +++++++++---------
drivers/common/cnxk/roc_nix_inl.c | 2 +-
drivers/common/cnxk/roc_nix_inl.h | 30 +--
drivers/common/cnxk/roc_npa.h | 44 ++--
drivers/common/cnxk/roc_npc.h | 30 +--
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.h | 14 +-
drivers/common/cnxk/roc_rvu_lf.h | 2 +-
drivers/common/cnxk/roc_sso.h | 16 +-
22 files changed, 231 insertions(+), 403 deletions(-)
diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c
index ed5d7d0ba3..f2e25264ec 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -596,35 +596,30 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_ot_ipsec_inb_sa_valid)
bool
cnxk_ot_ipsec_inb_sa_valid(struct roc_ot_ipsec_inb_sa *sa)
{
return !!sa->w2.s.valid;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_ot_ipsec_outb_sa_valid)
bool
cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa)
{
return !!sa->w2.s.valid;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_ow_ipsec_inb_sa_valid)
bool
cnxk_ow_ipsec_inb_sa_valid(struct roc_ow_ipsec_inb_sa *sa)
{
return !!sa->w2.s.valid;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_ow_ipsec_outb_sa_valid)
bool
cnxk_ow_ipsec_outb_sa_valid(struct roc_ow_ipsec_outb_sa *sa)
{
return !!sa->w2.s.valid;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_ipsec_ivlen_get)
uint8_t
cnxk_ipsec_ivlen_get(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_auth_algorithm a_algo,
@@ -661,7 +656,6 @@ cnxk_ipsec_ivlen_get(enum rte_crypto_cipher_algorithm c_algo,
return ivlen;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_ipsec_icvlen_get)
uint8_t
cnxk_ipsec_icvlen_get(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_auth_algorithm a_algo,
@@ -708,7 +702,6 @@ cnxk_ipsec_icvlen_get(enum rte_crypto_cipher_algorithm c_algo,
return icv;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_ipsec_outb_roundup_byte)
uint8_t
cnxk_ipsec_outb_roundup_byte(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_aead_algorithm aead_algo)
diff --git a/drivers/common/cnxk/cnxk_security.h b/drivers/common/cnxk/cnxk_security.h
index 10e7d5b520..55992e375b 100644
--- a/drivers/common/cnxk/cnxk_security.h
+++ b/drivers/common/cnxk/cnxk_security.h
@@ -26,17 +26,17 @@ int __roc_api
cnxk_ipsec_outb_rlens_get(struct cnxk_ipsec_outb_rlens *rlens,
struct rte_security_ipsec_xform *ipsec_xfrm,
struct rte_crypto_sym_xform *crypto_xfrm);
-uint8_t __roc_api
+uint8_t
cnxk_ipsec_ivlen_get(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_auth_algorithm a_algo,
enum rte_crypto_aead_algorithm aead_algo);
-uint8_t __roc_api
+uint8_t
cnxk_ipsec_icvlen_get(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_auth_algorithm a_algo,
enum rte_crypto_aead_algorithm aead_algo);
-uint8_t __roc_api cnxk_ipsec_outb_roundup_byte(enum rte_crypto_cipher_algorithm c_algo,
- enum rte_crypto_aead_algorithm aead_algo);
+uint8_t cnxk_ipsec_outb_roundup_byte(enum rte_crypto_cipher_algorithm c_algo,
+ enum rte_crypto_aead_algorithm aead_algo);
/* [CN10K] */
int __roc_api cnxk_ot_ipsec_inb_sa_fill(struct roc_ot_ipsec_inb_sa *sa,
@@ -46,8 +46,8 @@ int __roc_api cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
struct rte_security_ipsec_xform *ipsec_xfrm,
struct rte_crypto_sym_xform *crypto_xfrm,
uint8_t ctx_ilen);
-bool __roc_api cnxk_ot_ipsec_inb_sa_valid(struct roc_ot_ipsec_inb_sa *sa);
-bool __roc_api cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa);
+bool cnxk_ot_ipsec_inb_sa_valid(struct roc_ot_ipsec_inb_sa *sa);
+bool cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa);
/* [CN9K] */
int __roc_api cnxk_on_ipsec_inb_sa_create(struct rte_security_ipsec_xform *ipsec,
@@ -65,8 +65,8 @@ int __roc_api cnxk_ow_ipsec_outb_sa_fill(struct roc_ow_ipsec_outb_sa *sa,
struct rte_security_ipsec_xform *ipsec_xfrm,
struct rte_crypto_sym_xform *crypto_xfrm,
uint8_t ctx_ilen);
-bool __roc_api cnxk_ow_ipsec_inb_sa_valid(struct roc_ow_ipsec_inb_sa *sa);
-bool __roc_api cnxk_ow_ipsec_outb_sa_valid(struct roc_ow_ipsec_outb_sa *sa);
+bool cnxk_ow_ipsec_inb_sa_valid(struct roc_ow_ipsec_inb_sa *sa);
+bool cnxk_ow_ipsec_outb_sa_valid(struct roc_ow_ipsec_outb_sa *sa);
static inline int
ipsec_xform_cipher_verify(struct rte_crypto_sym_xform *crypto_xform)
diff --git a/drivers/common/cnxk/roc_aes.h b/drivers/common/cnxk/roc_aes.h
index 3b4b921bcd..280febeb1d 100644
--- a/drivers/common/cnxk/roc_aes.h
+++ b/drivers/common/cnxk/roc_aes.h
@@ -8,7 +8,7 @@
/*
* Derive k1, k2, k3 from 128 bit AES key
*/
-void __roc_api roc_aes_xcbc_key_derive(const uint8_t *auth_key, uint8_t *derived_key);
+void roc_aes_xcbc_key_derive(const uint8_t *auth_key, uint8_t *derived_key);
void __roc_api roc_aes_hash_key_derive(const uint8_t *key, uint16_t len, uint8_t *hash_key);
#endif /* _ROC_AES_H_ */
diff --git a/drivers/common/cnxk/roc_bphy_irq.h b/drivers/common/cnxk/roc_bphy_irq.h
index 93335e0d6d..6b18c01299 100644
--- a/drivers/common/cnxk/roc_bphy_irq.h
+++ b/drivers/common/cnxk/roc_bphy_irq.h
@@ -33,7 +33,7 @@ struct roc_bphy_intr {
__roc_api struct roc_bphy_irq_chip *roc_bphy_intr_init(void);
__roc_api void roc_bphy_intr_fini(struct roc_bphy_irq_chip *irq_chip);
__roc_api void roc_bphy_intr_handler(unsigned int irq_num);
-__roc_api bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip,
+bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip,
int irq_num);
__roc_api int roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num);
__roc_api uint64_t roc_bphy_intr_max_get(struct roc_bphy_irq_chip *irq_chip);
diff --git a/drivers/common/cnxk/roc_cpt.h b/drivers/common/cnxk/roc_cpt.h
index 56f1693e1f..ed566c86b0 100644
--- a/drivers/common/cnxk/roc_cpt.h
+++ b/drivers/common/cnxk/roc_cpt.h
@@ -239,12 +239,12 @@ void __roc_api roc_cpt_lf_reset(struct roc_cpt_lf *lf);
int __roc_api roc_cpt_lf_ctx_flush(struct roc_cpt_lf *lf, void *cptr,
bool inval);
int __roc_api roc_cpt_lf_ctx_reload(struct roc_cpt_lf *lf, void *cptr);
-int __roc_api roc_cpt_inline_ipsec_cfg(struct dev *dev, uint8_t slot,
- struct roc_nix *nix);
-int __roc_api roc_cpt_inline_ipsec_inb_cfg_read(struct roc_cpt *roc_cpt,
+int roc_cpt_inline_ipsec_cfg(struct dev *dev, uint8_t slot,
+ struct roc_nix *nix);
+int roc_cpt_inline_ipsec_inb_cfg_read(struct roc_cpt *roc_cpt,
struct roc_cpt_inline_ipsec_inb_cfg *cfg);
-int __roc_api roc_cpt_inline_ipsec_inb_cfg(struct roc_cpt *roc_cpt,
- struct roc_cpt_inline_ipsec_inb_cfg *cfg);
+int roc_cpt_inline_ipsec_inb_cfg(struct roc_cpt *roc_cpt,
+ struct roc_cpt_inline_ipsec_inb_cfg *cfg);
int __roc_api roc_cpt_afs_print(struct roc_cpt *roc_cpt);
int __roc_api roc_cpt_lfs_print(struct roc_cpt *roc_cpt);
void __roc_api roc_cpt_iq_disable(struct roc_cpt_lf *lf);
@@ -263,6 +263,6 @@ int __roc_api roc_cpt_int_misc_cb_unregister(roc_cpt_int_misc_cb_t cb, void *arg
bool roc_cpt_has_ie_engines(void);
-void __roc_api roc_cpt_cq_dump(FILE *file, const struct cpt_cq_s *cq);
+void roc_cpt_cq_dump(FILE *file, const struct cpt_cq_s *cq);
#endif /* _ROC_CPT_H_ */
diff --git a/drivers/common/cnxk/roc_dpi.h b/drivers/common/cnxk/roc_dpi.h
index 1aebfc8326..7d6281bb14 100644
--- a/drivers/common/cnxk/roc_dpi.h
+++ b/drivers/common/cnxk/roc_dpi.h
@@ -79,8 +79,8 @@ int __roc_api roc_dpi_dev_fini(struct roc_dpi *roc_dpi);
int __roc_api roc_dpi_rsrc_init(struct roc_dpi *roc_dpi);
int __roc_api roc_dpi_rsrc_fini(struct roc_dpi *roc_dpi);
-int __roc_api roc_dpi_configure(struct roc_dpi *dpi, uint32_t chunk_sz, uint64_t aura,
- uint64_t chunk_base);
+int roc_dpi_configure(struct roc_dpi *dpi, uint32_t chunk_sz, uint64_t aura,
+ uint64_t chunk_base);
int __roc_api roc_dpi_configure_v2(struct roc_dpi *roc_dpi, uint32_t chunk_sz, uint64_t aura,
uint64_t chunk_base);
int __roc_api roc_dpi_enable(struct roc_dpi *dpi);
@@ -89,13 +89,13 @@ int __roc_api roc_dpi_disable(struct roc_dpi *dpi);
int __roc_api roc_dpi_reset(struct roc_dpi *dpi);
int __roc_api roc_dpi_lf_ring_init(struct roc_dpi_lf_que *que, struct roc_dpi_lf_ring_cfg *rcfg);
-void __roc_api roc_dpi_lf_ring_fini(struct roc_dpi_lf_que *que);
+void roc_dpi_lf_ring_fini(struct roc_dpi_lf_que *que);
int __roc_api roc_dpi_lf_pffunc_cfg(struct roc_dpi_lf *lf);
-int __roc_api roc_dpi_lf_ring_chan_cfg(struct roc_dpi_lf_que *que, union roc_dpi_lf_ccfg *cfg);
+int roc_dpi_lf_ring_chan_cfg(struct roc_dpi_lf_que *que, union roc_dpi_lf_ccfg *cfg);
int __roc_api roc_dpi_lf_chan_tbl_alloc(struct roc_dpi_lf *lf, uint16_t tbl_sz);
int __roc_api roc_dpi_lf_chan_tbl_free(struct roc_dpi_lf *lf);
int __roc_api roc_dpi_lf_chan_tbl_select(struct roc_dpi_lf *lf);
-int __roc_api roc_dpi_lf_chan_tbl_ena_dis(struct roc_dpi_lf *lf, bool ena);
+int roc_dpi_lf_chan_tbl_ena_dis(struct roc_dpi_lf *lf, bool ena);
int __roc_api roc_dpi_lf_chan_tbl_update(struct roc_dpi_lf *lf, uint64_t *config, uint16_t offset,
uint16_t entries);
int __roc_api roc_dpi_lf_dump(struct roc_dpi_lf *lf, FILE *file);
diff --git a/drivers/common/cnxk/roc_hash.h b/drivers/common/cnxk/roc_hash.h
index c3ddb9407b..929e4c6788 100644
--- a/drivers/common/cnxk/roc_hash.h
+++ b/drivers/common/cnxk/roc_hash.h
@@ -9,9 +9,9 @@
* Compute a partial hash with the assumption that msg is the first block.
* Based on implementation from RFC 3174
*/
-void __roc_api roc_hash_md5_gen(uint8_t *msg, uint32_t *hash);
-void __roc_api roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash);
-void __roc_api roc_hash_sha256_gen(uint8_t *msg, uint32_t *hash, int hash_size);
-void __roc_api roc_hash_sha512_gen(uint8_t *msg, uint64_t *hash, int hash_size);
+void roc_hash_md5_gen(uint8_t *msg, uint32_t *hash);
+void roc_hash_sha1_gen(uint8_t *msg, uint32_t *hash);
+void roc_hash_sha256_gen(uint8_t *msg, uint32_t *hash, int hash_size);
+void roc_hash_sha512_gen(uint8_t *msg, uint64_t *hash, int hash_size);
#endif /* _ROC_HASH_H_ */
diff --git a/drivers/common/cnxk/roc_idev.h b/drivers/common/cnxk/roc_idev.h
index 3803963b07..3d272ec641 100644
--- a/drivers/common/cnxk/roc_idev.h
+++ b/drivers/common/cnxk/roc_idev.h
@@ -13,27 +13,27 @@ void __roc_api roc_idev_npa_halo_ena_set(int halo_ena);
/* LMT */
uint64_t __roc_api roc_idev_lmt_base_addr_get(void);
-uint16_t __roc_api roc_idev_num_lmtlines_get(void);
+uint16_t roc_idev_num_lmtlines_get(void);
struct roc_cpt *__roc_api roc_idev_cpt_get(void);
-void __roc_api roc_idev_cpt_set(struct roc_cpt *cpt);
+void roc_idev_cpt_set(struct roc_cpt *cpt);
struct roc_nix *__roc_api roc_idev_npa_nix_get(void);
-uint64_t __roc_api roc_idev_nix_inl_meta_aura_get(void);
-struct roc_nix_list *__roc_api roc_idev_nix_list_get(void);
+uint64_t roc_idev_nix_inl_meta_aura_get(void);
+struct roc_nix_list *roc_idev_nix_list_get(void);
-struct roc_mcs *__roc_api roc_idev_mcs_get(uint8_t mcs_idx);
-void __roc_api roc_idev_mcs_set(struct roc_mcs *mcs);
-void __roc_api roc_idev_mcs_free(struct roc_mcs *mcs);
+struct roc_mcs *roc_idev_mcs_get(uint8_t mcs_idx);
+void roc_idev_mcs_set(struct roc_mcs *mcs);
+void roc_idev_mcs_free(struct roc_mcs *mcs);
uint8_t __roc_api roc_idev_nix_rx_inject_get(uint16_t port);
void __roc_api roc_idev_nix_rx_inject_set(uint16_t port, uint8_t enable);
uint16_t *__roc_api roc_idev_nix_rx_chan_base_get(void);
-void __roc_api roc_idev_nix_rx_chan_set(uint16_t port, uint16_t chan);
+void roc_idev_nix_rx_chan_set(uint16_t port, uint16_t chan);
uint16_t __roc_api roc_idev_nix_inl_dev_pffunc_get(void);
-struct roc_rvu_lf *__roc_api roc_idev_rvu_lf_get(uint8_t rvu_lf_idx);
-void __roc_api roc_idev_rvu_lf_set(struct roc_rvu_lf *rvu);
-void __roc_api roc_idev_rvu_lf_free(struct roc_rvu_lf *rvu);
+struct roc_rvu_lf *roc_idev_rvu_lf_get(uint8_t rvu_lf_idx);
+void roc_idev_rvu_lf_set(struct roc_rvu_lf *rvu);
+void roc_idev_rvu_lf_free(struct roc_rvu_lf *rvu);
#endif /* _ROC_IDEV_H_ */
diff --git a/drivers/common/cnxk/roc_ie_ow.h b/drivers/common/cnxk/roc_ie_ow.h
index 4a3291d458..24c2a7cb4f 100644
--- a/drivers/common/cnxk/roc_ie_ow.h
+++ b/drivers/common/cnxk/roc_ie_ow.h
@@ -533,7 +533,7 @@ PLT_STATIC_ASSERT(offsetof(struct roc_ow_ipsec_outb_sa, ctx) == 31 * sizeof(uint
(PLT_MAX(sizeof(struct roc_ow_ipsec_inb_sa), sizeof(struct roc_ow_ipsec_outb_sa)))
void __roc_api roc_ow_ipsec_inb_sa_init(struct roc_ow_ipsec_inb_sa *sa);
-void __roc_api roc_ow_reass_inb_sa_init(struct roc_ow_ipsec_inb_sa *sa);
+void roc_ow_reass_inb_sa_init(struct roc_ow_ipsec_inb_sa *sa);
void __roc_api roc_ow_ipsec_outb_sa_init(struct roc_ow_ipsec_outb_sa *sa);
#endif /* __ROC_IE_OW_H__ */
diff --git a/drivers/common/cnxk/roc_mcs.h b/drivers/common/cnxk/roc_mcs.h
index 3ac82f6f8c..eb50219561 100644
--- a/drivers/common/cnxk/roc_mcs.h
+++ b/drivers/common/cnxk/roc_mcs.h
@@ -508,20 +508,20 @@ __roc_api struct roc_mcs *roc_mcs_dev_get(uint8_t mcs_idx);
/* HW info get */
__roc_api int roc_mcs_hw_info_get(struct roc_mcs_hw_info *hw_info);
/* Active lmac bmap set */
-__roc_api int roc_mcs_active_lmac_set(struct roc_mcs *mcs, struct roc_mcs_set_active_lmac *lmac);
+int roc_mcs_active_lmac_set(struct roc_mcs *mcs, struct roc_mcs_set_active_lmac *lmac);
/* Port bypass mode set */
-__roc_api int roc_mcs_lmac_mode_set(struct roc_mcs *mcs, struct roc_mcs_set_lmac_mode *port);
+int roc_mcs_lmac_mode_set(struct roc_mcs *mcs, struct roc_mcs_set_lmac_mode *port);
/* (X)PN threshold set */
__roc_api int roc_mcs_pn_threshold_set(struct roc_mcs *mcs, struct roc_mcs_set_pn_threshold *pn);
/* Reset port */
-__roc_api int roc_mcs_port_reset(struct roc_mcs *mcs, struct roc_mcs_port_reset_req *port);
+int roc_mcs_port_reset(struct roc_mcs *mcs, struct roc_mcs_port_reset_req *port);
/* Get port config */
-__roc_api int roc_mcs_port_cfg_set(struct roc_mcs *mcs, struct roc_mcs_port_cfg_set_req *req);
+int roc_mcs_port_cfg_set(struct roc_mcs *mcs, struct roc_mcs_port_cfg_set_req *req);
/* Set port config */
-__roc_api int roc_mcs_port_cfg_get(struct roc_mcs *mcs, struct roc_mcs_port_cfg_get_req *req,
+int roc_mcs_port_cfg_get(struct roc_mcs *mcs, struct roc_mcs_port_cfg_get_req *req,
struct roc_mcs_port_cfg_get_rsp *rsp);
/* Get custom tag config */
-__roc_api int roc_mcs_custom_tag_cfg_get(struct roc_mcs *mcs,
+int roc_mcs_custom_tag_cfg_get(struct roc_mcs *mcs,
struct roc_mcs_custom_tag_cfg_get_req *req,
struct roc_mcs_custom_tag_cfg_get_rsp *rsp);
@@ -532,36 +532,36 @@ __roc_api int roc_mcs_rsrc_free(struct roc_mcs *mcs, struct roc_mcs_free_rsrc_re
/* SA policy read and write */
__roc_api int roc_mcs_sa_policy_write(struct roc_mcs *mcs,
struct roc_mcs_sa_plcy_write_req *sa_plcy);
-__roc_api int roc_mcs_sa_policy_read(struct roc_mcs *mcs,
+int roc_mcs_sa_policy_read(struct roc_mcs *mcs,
struct roc_mcs_sa_plcy_write_req *sa_plcy);
/* PN Table read and write */
__roc_api int roc_mcs_pn_table_write(struct roc_mcs *mcs,
struct roc_mcs_pn_table_write_req *pn_table);
-__roc_api int roc_mcs_pn_table_read(struct roc_mcs *mcs,
+int roc_mcs_pn_table_read(struct roc_mcs *mcs,
struct roc_mcs_pn_table_write_req *pn_table);
/* RX SC read, write and enable */
__roc_api int roc_mcs_rx_sc_cam_write(struct roc_mcs *mcs,
struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam);
-__roc_api int roc_mcs_rx_sc_cam_read(struct roc_mcs *mcs,
+int roc_mcs_rx_sc_cam_read(struct roc_mcs *mcs,
struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam);
-__roc_api int roc_mcs_rx_sc_cam_enable(struct roc_mcs *mcs,
+int roc_mcs_rx_sc_cam_enable(struct roc_mcs *mcs,
struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam);
/* SECY policy read and write */
__roc_api int roc_mcs_secy_policy_write(struct roc_mcs *mcs,
struct roc_mcs_secy_plcy_write_req *secy_plcy);
-__roc_api int roc_mcs_secy_policy_read(struct roc_mcs *mcs,
+int roc_mcs_secy_policy_read(struct roc_mcs *mcs,
struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam);
/* RX SC-SA MAP read and write */
__roc_api int roc_mcs_rx_sc_sa_map_write(struct roc_mcs *mcs,
struct roc_mcs_rx_sc_sa_map *rx_sc_sa_map);
-__roc_api int roc_mcs_rx_sc_sa_map_read(struct roc_mcs *mcs,
+int roc_mcs_rx_sc_sa_map_read(struct roc_mcs *mcs,
struct roc_mcs_rx_sc_sa_map *rx_sc_sa_map);
/* TX SC-SA MAP read and write */
__roc_api int roc_mcs_tx_sc_sa_map_write(struct roc_mcs *mcs,
struct roc_mcs_tx_sc_sa_map *tx_sc_sa_map);
-__roc_api int roc_mcs_tx_sc_sa_map_read(struct roc_mcs *mcs,
+int roc_mcs_tx_sc_sa_map_read(struct roc_mcs *mcs,
struct roc_mcs_tx_sc_sa_map *tx_sc_sa_map);
/* SA to Port map update */
__roc_api void roc_mcs_sa_port_map_update(struct roc_mcs *mcs, int sa_id, uint8_t port_id);
@@ -569,18 +569,18 @@ __roc_api void roc_mcs_sa_port_map_update(struct roc_mcs *mcs, int sa_id, uint8_
/* Flow entry read, write and enable */
__roc_api int roc_mcs_flowid_entry_write(struct roc_mcs *mcs,
struct roc_mcs_flowid_entry_write_req *flowid_req);
-__roc_api int roc_mcs_flowid_entry_read(struct roc_mcs *mcs,
+int roc_mcs_flowid_entry_read(struct roc_mcs *mcs,
struct roc_mcs_flowid_entry_write_req *flowid_rsp);
-__roc_api int roc_mcs_flowid_entry_enable(struct roc_mcs *mcs,
+int roc_mcs_flowid_entry_enable(struct roc_mcs *mcs,
struct roc_mcs_flowid_ena_dis_entry *entry);
/* Control packet rule alloc, free and write */
-__roc_api int roc_mcs_ctrl_pkt_rule_alloc(struct roc_mcs *mcs,
+int roc_mcs_ctrl_pkt_rule_alloc(struct roc_mcs *mcs,
struct roc_mcs_alloc_ctrl_pkt_rule_req *req,
struct roc_mcs_alloc_ctrl_pkt_rule_rsp *rsp);
-__roc_api int roc_mcs_ctrl_pkt_rule_free(struct roc_mcs *mcs,
+int roc_mcs_ctrl_pkt_rule_free(struct roc_mcs *mcs,
struct roc_mcs_free_ctrl_pkt_rule_req *req);
-__roc_api int roc_mcs_ctrl_pkt_rule_write(struct roc_mcs *mcs,
+int roc_mcs_ctrl_pkt_rule_write(struct roc_mcs *mcs,
struct roc_mcs_ctrl_pkt_rule_write_req *req);
/* Flow id stats get */
@@ -608,7 +608,7 @@ __roc_api int roc_mcs_event_cb_unregister(struct roc_mcs *mcs, enum roc_mcs_even
__roc_api int roc_mcs_intr_configure(struct roc_mcs *mcs, struct roc_mcs_intr_cfg *config);
/* Port recovery from fatal errors */
-__roc_api int roc_mcs_port_recovery(struct roc_mcs *mcs, union roc_mcs_event_data *mdata,
+int roc_mcs_port_recovery(struct roc_mcs *mcs, union roc_mcs_event_data *mdata,
uint8_t port_id);
/* FIPS reset */
diff --git a/drivers/common/cnxk/roc_ml.h b/drivers/common/cnxk/roc_ml.h
index 3cd82be6a6..8d4f5b5097 100644
--- a/drivers/common/cnxk/roc_ml.h
+++ b/drivers/common/cnxk/roc_ml.h
@@ -117,14 +117,14 @@ void __roc_api roc_ml_reg_write32(struct roc_ml *roc_ml, uint32_t val, uint64_t
void __roc_api roc_ml_reg_save(struct roc_ml *roc_ml, uint64_t offset);
/* Address translation functions */
-uint64_t __roc_api roc_ml_addr_pa_to_offset(struct roc_ml *roc_ml, uint64_t phys_addr);
-uint64_t __roc_api roc_ml_addr_offset_to_pa(struct roc_ml *roc_ml, uint64_t offset);
+uint64_t roc_ml_addr_pa_to_offset(struct roc_ml *roc_ml, uint64_t phys_addr);
+uint64_t roc_ml_addr_offset_to_pa(struct roc_ml *roc_ml, uint64_t offset);
void *__roc_api roc_ml_addr_ap2mlip(struct roc_ml *roc_ml, void *addr);
void *__roc_api roc_ml_addr_mlip2ap(struct roc_ml *roc_ml, void *addr);
/* Scratch and JCMDQ functions */
-void __roc_api roc_ml_scratch_write_job(struct roc_ml *roc_ml, void *jd);
-bool __roc_api roc_ml_scratch_is_valid_bit_set(struct roc_ml *roc_ml);
+void roc_ml_scratch_write_job(struct roc_ml *roc_ml, void *jd);
+bool roc_ml_scratch_is_valid_bit_set(struct roc_ml *roc_ml);
bool __roc_api roc_ml_scratch_is_done_bit_set(struct roc_ml *roc_ml);
bool __roc_api roc_ml_scratch_enqueue(struct roc_ml *roc_ml, void *work_ptr);
bool __roc_api roc_ml_scratch_dequeue(struct roc_ml *roc_ml, void *work_ptr);
@@ -133,20 +133,20 @@ bool __roc_api roc_ml_jcmdq_enqueue_lf(struct roc_ml *roc_ml, struct ml_job_cmd_
bool __roc_api roc_ml_jcmdq_enqueue_sl(struct roc_ml *roc_ml, struct ml_job_cmd_s *job_cmd);
/* Device management functions */
-void __roc_api roc_ml_clk_force_on(struct roc_ml *roc_ml);
-void __roc_api roc_ml_clk_force_off(struct roc_ml *roc_ml);
-void __roc_api roc_ml_dma_stall_on(struct roc_ml *roc_ml);
-void __roc_api roc_ml_dma_stall_off(struct roc_ml *roc_ml);
+void roc_ml_clk_force_on(struct roc_ml *roc_ml);
+void roc_ml_clk_force_off(struct roc_ml *roc_ml);
+void roc_ml_dma_stall_on(struct roc_ml *roc_ml);
+void roc_ml_dma_stall_off(struct roc_ml *roc_ml);
bool __roc_api roc_ml_mlip_is_enabled(struct roc_ml *roc_ml);
int __roc_api roc_ml_mlip_reset(struct roc_ml *roc_ml, bool force);
/* Device / block functions */
int __roc_api roc_ml_dev_init(struct roc_ml *roc_ml);
int __roc_api roc_ml_dev_fini(struct roc_ml *roc_ml);
-int __roc_api roc_ml_blk_init(struct roc_bphy *roc_bphy, struct roc_ml *roc_ml);
-int __roc_api roc_ml_blk_fini(struct roc_bphy *roc_bphy, struct roc_ml *roc_ml);
+int roc_ml_blk_init(struct roc_bphy *roc_bphy, struct roc_ml *roc_ml);
+int roc_ml_blk_fini(struct roc_bphy *roc_bphy, struct roc_ml *roc_ml);
/* Utility functions */
-uint16_t __roc_api roc_ml_sso_pf_func_get(void);
+uint16_t roc_ml_sso_pf_func_get(void);
#endif /*_ROC_ML_H_*/
diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 35a90f982b..6afc4e4922 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -667,7 +667,7 @@ bool __roc_api roc_nix_is_sdp(struct roc_nix *roc_nix);
bool __roc_api roc_nix_is_pf(struct roc_nix *roc_nix);
bool __roc_api roc_nix_is_vf_or_sdp(struct roc_nix *roc_nix);
int __roc_api roc_nix_get_base_chan(struct roc_nix *roc_nix);
-uint8_t __roc_api roc_nix_get_rx_chan_cnt(struct roc_nix *roc_nix);
+uint8_t roc_nix_get_rx_chan_cnt(struct roc_nix *roc_nix);
int __roc_api roc_nix_get_pf(struct roc_nix *roc_nix);
int __roc_api roc_nix_get_vf(struct roc_nix *roc_nix);
uint16_t __roc_api roc_nix_get_pf_func(struct roc_nix *roc_nix);
@@ -678,9 +678,9 @@ int __roc_api roc_nix_max_pkt_len(struct roc_nix *roc_nix);
int __roc_api roc_nix_lf_alloc(struct roc_nix *roc_nix, uint32_t nb_rxq,
uint32_t nb_txq, uint64_t rx_cfg);
int __roc_api roc_nix_lf_free(struct roc_nix *roc_nix);
-int __roc_api roc_nix_lf_inl_ipsec_cfg(struct roc_nix *roc_nix,
- struct roc_nix_ipsec_cfg *cfg, bool enb);
-int __roc_api roc_nix_cpt_ctx_cache_sync(struct roc_nix *roc_nix);
+int roc_nix_lf_inl_ipsec_cfg(struct roc_nix *roc_nix,
+ struct roc_nix_ipsec_cfg *cfg, bool enb);
+int roc_nix_cpt_ctx_cache_sync(struct roc_nix *roc_nix);
int __roc_api roc_nix_rx_drop_re_set(struct roc_nix *roc_nix, bool ena);
/* Debug */
@@ -812,7 +812,7 @@ int __roc_api roc_nix_tm_node_add(struct roc_nix *roc_nix,
struct roc_nix_tm_node *roc_node);
int __roc_api roc_nix_tm_node_delete(struct roc_nix *roc_nix, uint32_t node_id,
bool free);
-int __roc_api roc_nix_tm_free_resources(struct roc_nix *roc_nix, bool hw_only);
+int roc_nix_tm_free_resources(struct roc_nix *roc_nix, bool hw_only);
int __roc_api roc_nix_tm_node_suspend_resume(struct roc_nix *roc_nix,
uint32_t node_id, bool suspend);
int __roc_api roc_nix_tm_node_parent_update(struct roc_nix *roc_nix,
@@ -823,26 +823,26 @@ int __roc_api roc_nix_tm_node_shaper_update(struct roc_nix *roc_nix,
uint32_t node_id,
uint32_t profile_id,
bool force_update);
-int __roc_api roc_nix_tm_node_pkt_mode_update(struct roc_nix *roc_nix,
- uint32_t node_id, bool pkt_mode);
+int roc_nix_tm_node_pkt_mode_update(struct roc_nix *roc_nix,
+ uint32_t node_id, bool pkt_mode);
int __roc_api roc_nix_tm_shaper_profile_add(
struct roc_nix *roc_nix, struct roc_nix_tm_shaper_profile *profile);
-int __roc_api roc_nix_tm_shaper_profile_update(
+int roc_nix_tm_shaper_profile_update(
struct roc_nix *roc_nix, struct roc_nix_tm_shaper_profile *profile);
int __roc_api roc_nix_tm_shaper_profile_delete(struct roc_nix *roc_nix,
uint32_t id);
-int __roc_api roc_nix_tm_prealloc_res(struct roc_nix *roc_nix, uint8_t lvl,
- uint16_t discontig, uint16_t contig);
+int roc_nix_tm_prealloc_res(struct roc_nix *roc_nix, uint8_t lvl,
+ uint16_t discontig, uint16_t contig);
uint16_t __roc_api roc_nix_tm_leaf_cnt(struct roc_nix *roc_nix);
struct roc_nix_tm_node *__roc_api roc_nix_tm_node_get(struct roc_nix *roc_nix,
uint32_t node_id);
-struct roc_nix_tm_node *__roc_api
+struct roc_nix_tm_node *
roc_nix_tm_node_next(struct roc_nix *roc_nix, struct roc_nix_tm_node *__prev);
struct roc_nix_tm_shaper_profile *__roc_api
roc_nix_tm_shaper_profile_get(struct roc_nix *roc_nix, uint32_t profile_id);
-struct roc_nix_tm_shaper_profile *__roc_api roc_nix_tm_shaper_profile_next(
+struct roc_nix_tm_shaper_profile *roc_nix_tm_shaper_profile_next(
struct roc_nix *roc_nix, struct roc_nix_tm_shaper_profile *__prev);
int __roc_api roc_nix_tm_node_stats_get(struct roc_nix *roc_nix,
@@ -865,21 +865,21 @@ int __roc_api roc_nix_tm_hierarchy_disable(struct roc_nix *roc_nix);
int __roc_api roc_nix_tm_hierarchy_enable(struct roc_nix *roc_nix,
enum roc_nix_tm_tree tree,
bool xmit_enable);
-int __roc_api roc_nix_tm_hierarchy_xmit_enable(struct roc_nix *roc_nix, enum roc_nix_tm_tree tree);
+int roc_nix_tm_hierarchy_xmit_enable(struct roc_nix *roc_nix, enum roc_nix_tm_tree tree);
/*
* TM utilities API.
*/
-int __roc_api roc_nix_tm_node_lvl(struct roc_nix *roc_nix, uint32_t node_id);
-bool __roc_api roc_nix_tm_root_has_sp(struct roc_nix *roc_nix);
-void __roc_api roc_nix_tm_rsrc_max(bool pf, uint16_t schq[ROC_TM_LVL_MAX]);
+int roc_nix_tm_node_lvl(struct roc_nix *roc_nix, uint32_t node_id);
+bool roc_nix_tm_root_has_sp(struct roc_nix *roc_nix);
+void roc_nix_tm_rsrc_max(bool pf, uint16_t schq[ROC_TM_LVL_MAX]);
int __roc_api roc_nix_tm_rsrc_count(struct roc_nix *roc_nix,
uint16_t schq[ROC_TM_LVL_MAX]);
-int __roc_api roc_nix_tm_node_name_get(struct roc_nix *roc_nix,
- uint32_t node_id, char *buf,
- size_t buflen);
-int __roc_api roc_nix_smq_flush(struct roc_nix *roc_nix);
+int roc_nix_tm_node_name_get(struct roc_nix *roc_nix,
+ uint32_t node_id, char *buf,
+ size_t buflen);
+int roc_nix_smq_flush(struct roc_nix *roc_nix);
int __roc_api roc_nix_tm_max_prio(struct roc_nix *roc_nix, int lvl);
int __roc_api roc_nix_tm_lvl_is_leaf(struct roc_nix *roc_nix, int lvl);
void __roc_api
@@ -889,7 +889,7 @@ int __roc_api roc_nix_tm_lvl_cnt_get(struct roc_nix *roc_nix);
int __roc_api roc_nix_tm_lvl_have_link_access(struct roc_nix *roc_nix, int lvl);
int __roc_api roc_nix_tm_prepare_rate_limited_tree(struct roc_nix *roc_nix);
int __roc_api roc_nix_tm_pfc_prepare_tree(struct roc_nix *roc_nix);
-int __roc_api roc_nix_tm_sdp_prepare_tree(struct roc_nix *roc_nix);
+int roc_nix_tm_sdp_prepare_tree(struct roc_nix *roc_nix);
bool __roc_api roc_nix_tm_is_user_hierarchy_enabled(struct roc_nix *nix);
int __roc_api roc_nix_tm_tree_type_get(struct roc_nix *nix);
int __roc_api roc_nix_tm_mark_config(struct roc_nix *roc_nix,
@@ -897,8 +897,8 @@ int __roc_api roc_nix_tm_mark_config(struct roc_nix *roc_nix,
int mark_red);
uint64_t __roc_api roc_nix_tm_mark_format_get(struct roc_nix *roc_nix,
uint64_t *flags);
-int __roc_api roc_nix_tm_egress_link_cfg_set(struct roc_nix *roc_nix, uint64_t dst_pf_func,
- bool enable);
+int roc_nix_tm_egress_link_cfg_set(struct roc_nix *roc_nix, uint64_t dst_pf_func,
+ bool enable);
/* Ingress Policer API */
int __roc_api roc_nix_bpf_timeunit_get(struct roc_nix *roc_nix,
@@ -916,7 +916,7 @@ int __roc_api roc_nix_bpf_free(struct roc_nix *roc_nix,
struct roc_nix_bpf_objs *profs,
uint8_t num_prof);
-int __roc_api roc_nix_bpf_free_all(struct roc_nix *roc_nix);
+int roc_nix_bpf_free_all(struct roc_nix *roc_nix);
int __roc_api roc_nix_bpf_config(struct roc_nix *roc_nix, uint16_t id,
enum roc_nix_bpf_level_flag lvl_flag,
@@ -925,8 +925,8 @@ int __roc_api roc_nix_bpf_config(struct roc_nix *roc_nix, uint16_t id,
int __roc_api roc_nix_bpf_ena_dis(struct roc_nix *roc_nix, uint16_t id,
struct roc_nix_rq *rq, bool enable);
-int __roc_api roc_nix_bpf_dump(struct roc_nix *roc_nix, uint16_t id,
- enum roc_nix_bpf_level_flag lvl_flag);
+int roc_nix_bpf_dump(struct roc_nix *roc_nix, uint16_t id,
+ enum roc_nix_bpf_level_flag lvl_flag);
int __roc_api roc_nix_bpf_pre_color_tbl_setup(
struct roc_nix *roc_nix, uint16_t id,
@@ -946,12 +946,12 @@ int __roc_api roc_nix_bpf_stats_reset(struct roc_nix *roc_nix, uint16_t id,
uint64_t mask,
enum roc_nix_bpf_level_flag lvl_flag);
-int __roc_api
+int
roc_nix_bpf_lf_stats_read(struct roc_nix *roc_nix, uint64_t mask,
uint64_t stats[ROC_NIX_BPF_STATS_MAX] /* Out */);
-int __roc_api roc_nix_bpf_lf_stats_reset(struct roc_nix *roc_nix,
- uint64_t mask);
+int roc_nix_bpf_lf_stats_reset(struct roc_nix *roc_nix,
+ uint64_t mask);
uint8_t __roc_api
roc_nix_bpf_level_to_idx(enum roc_nix_bpf_level_flag lvl_flag);
@@ -959,7 +959,7 @@ roc_nix_bpf_level_to_idx(enum roc_nix_bpf_level_flag lvl_flag);
uint8_t __roc_api roc_nix_bpf_stats_to_idx(enum roc_nix_bpf_stats lvl_flag);
/* MAC */
-int __roc_api roc_nix_mac_rxtx_start_stop(struct roc_nix *roc_nix, bool start);
+int roc_nix_mac_rxtx_start_stop(struct roc_nix *roc_nix, bool start);
int __roc_api roc_nix_mac_link_event_start_stop(struct roc_nix *roc_nix,
bool start);
int __roc_api roc_nix_mac_loopback_enable(struct roc_nix *roc_nix, bool enable);
@@ -977,7 +977,7 @@ int __roc_api roc_nix_mac_link_info_get(struct roc_nix *roc_nix,
struct roc_nix_link_info *link_info);
int __roc_api roc_nix_mac_fec_set(struct roc_nix *roc_nix, int fec);
int __roc_api roc_nix_mac_fec_supported_get(struct roc_nix *roc_nix, uint64_t *supported_fec);
-int __roc_api roc_nix_mac_mtu_set(struct roc_nix *roc_nix, uint16_t mtu);
+int roc_nix_mac_mtu_set(struct roc_nix *roc_nix, uint16_t mtu);
int __roc_api roc_nix_mac_max_rx_len_set(struct roc_nix *roc_nix,
uint16_t maxlen);
int __roc_api roc_nix_mac_link_cb_register(struct roc_nix *roc_nix,
@@ -985,9 +985,9 @@ int __roc_api roc_nix_mac_link_cb_register(struct roc_nix *roc_nix,
void __roc_api roc_nix_mac_link_cb_unregister(struct roc_nix *roc_nix);
int __roc_api roc_nix_mac_link_info_get_cb_register(
struct roc_nix *roc_nix, link_info_get_t link_info_get);
-void __roc_api roc_nix_mac_link_info_get_cb_unregister(struct roc_nix *roc_nix);
+void roc_nix_mac_link_info_get_cb_unregister(struct roc_nix *roc_nix);
int __roc_api roc_nix_q_err_cb_register(struct roc_nix *roc_nix, q_err_get_t sq_err_handle);
-void __roc_api roc_nix_q_err_cb_unregister(struct roc_nix *roc_nix);
+void roc_nix_q_err_cb_unregister(struct roc_nix *roc_nix);
int __roc_api roc_nix_mac_stats_reset(struct roc_nix *roc_nix);
int __roc_api roc_nix_mac_fwdata_get(struct roc_nix *roc_nix, struct roc_nix_mac_fwdata *fwdata);
@@ -998,11 +998,11 @@ int __roc_api roc_nix_switch_hdr_set(struct roc_nix *roc_nix, uint64_t switch_he
int __roc_api roc_nix_lso_fmt_setup(struct roc_nix *roc_nix);
int __roc_api roc_nix_lso_fmt_get(struct roc_nix *roc_nix, uint8_t udp_tun[ROC_NIX_LSO_TUN_MAX],
uint8_t tun[ROC_NIX_LSO_TUN_MAX]);
-int __roc_api roc_nix_lso_fmt_ipv4_frag_get(struct roc_nix *roc_nix);
-int __roc_api roc_nix_lso_custom_fmt_setup(struct roc_nix *roc_nix, struct nix_lso_format *fields,
- uint16_t nb_fields);
-int __roc_api roc_nix_lso_alt_flags_profile_setup(struct roc_nix *roc_nix,
- nix_lso_alt_flg_format_t *fmt);
+int roc_nix_lso_fmt_ipv4_frag_get(struct roc_nix *roc_nix);
+int roc_nix_lso_custom_fmt_setup(struct roc_nix *roc_nix, struct nix_lso_format *fields,
+ uint16_t nb_fields);
+int roc_nix_lso_alt_flags_profile_setup(struct roc_nix *roc_nix,
+ nix_lso_alt_flg_format_t *fmt);
int __roc_api roc_nix_eeprom_info_get(struct roc_nix *roc_nix,
struct roc_nix_eeprom_info *info);
@@ -1011,8 +1011,8 @@ int __roc_api roc_nix_eeprom_info_get(struct roc_nix *roc_nix,
int __roc_api roc_nix_fc_config_set(struct roc_nix *roc_nix,
struct roc_nix_fc_cfg *fc_cfg);
-int __roc_api roc_nix_fc_config_get(struct roc_nix *roc_nix,
- struct roc_nix_fc_cfg *fc_cfg);
+int roc_nix_fc_config_get(struct roc_nix *roc_nix,
+ struct roc_nix_fc_cfg *fc_cfg);
int __roc_api roc_nix_fc_mode_set(struct roc_nix *roc_nix,
enum roc_nix_fc_mode mode);
@@ -1020,25 +1020,25 @@ int __roc_api roc_nix_fc_mode_set(struct roc_nix *roc_nix,
int __roc_api roc_nix_pfc_mode_set(struct roc_nix *roc_nix,
struct roc_nix_pfc_cfg *pfc_cfg);
-int __roc_api roc_nix_pfc_mode_get(struct roc_nix *roc_nix,
- struct roc_nix_pfc_cfg *pfc_cfg);
+int roc_nix_pfc_mode_get(struct roc_nix *roc_nix,
+ struct roc_nix_pfc_cfg *pfc_cfg);
uint16_t __roc_api roc_nix_chan_count_get(struct roc_nix *roc_nix);
enum roc_nix_fc_mode __roc_api roc_nix_fc_mode_get(struct roc_nix *roc_nix);
-void __roc_api roc_nix_fc_npa_bp_cfg(struct roc_nix *roc_nix, uint64_t pool_id, uint8_t ena,
- uint8_t force, uint8_t tc, uint64_t drop_percent);
-int __roc_api roc_nix_bpids_alloc(struct roc_nix *roc_nix, uint8_t type,
- uint8_t bp_cnt, uint16_t *bpids);
-int __roc_api roc_nix_bpids_free(struct roc_nix *roc_nix, uint8_t bp_cnt,
- uint16_t *bpids);
-int __roc_api roc_nix_rx_chan_cfg_get(struct roc_nix *roc_nix, uint16_t chan,
- bool is_cpt, uint64_t *cfg);
-int __roc_api roc_nix_rx_chan_cfg_set(struct roc_nix *roc_nix, uint16_t chan,
- bool is_cpt, uint64_t val);
-int __roc_api roc_nix_chan_bpid_set(struct roc_nix *roc_nix, uint16_t chan,
- uint64_t bpid, int ena, bool cpt_chan);
+void roc_nix_fc_npa_bp_cfg(struct roc_nix *roc_nix, uint64_t pool_id, uint8_t ena,
+ uint8_t force, uint8_t tc, uint64_t drop_percent);
+int roc_nix_bpids_alloc(struct roc_nix *roc_nix, uint8_t type,
+ uint8_t bp_cnt, uint16_t *bpids);
+int roc_nix_bpids_free(struct roc_nix *roc_nix, uint8_t bp_cnt,
+ uint16_t *bpids);
+int roc_nix_rx_chan_cfg_get(struct roc_nix *roc_nix, uint16_t chan,
+ bool is_cpt, uint64_t *cfg);
+int roc_nix_rx_chan_cfg_set(struct roc_nix *roc_nix, uint16_t chan,
+ bool is_cpt, uint64_t val);
+int roc_nix_chan_bpid_set(struct roc_nix *roc_nix, uint16_t chan,
+ uint64_t bpid, int ena, bool cpt_chan);
/* NPC */
int __roc_api roc_nix_npc_promisc_ena_dis(struct roc_nix *roc_nix, int enable);
@@ -1052,11 +1052,11 @@ int __roc_api roc_nix_npc_rx_ena_dis(struct roc_nix *roc_nix, bool enable);
int __roc_api roc_nix_npc_mcast_config(struct roc_nix *roc_nix,
bool mcast_enable, bool prom_enable);
-int __roc_api roc_nix_af_rx_flow_vec_ctrl_set(struct roc_nix *roc_nix);
+int roc_nix_af_rx_flow_vec_ctrl_set(struct roc_nix *roc_nix);
/* RSS */
-void __roc_api roc_nix_rss_key_default_fill(struct roc_nix *roc_nix,
- uint8_t key[ROC_NIX_RSS_KEY_LEN]);
+void roc_nix_rss_key_default_fill(struct roc_nix *roc_nix,
+ uint8_t key[ROC_NIX_RSS_KEY_LEN]);
void __roc_api roc_nix_rss_key_set(struct roc_nix *roc_nix,
const uint8_t key[ROC_NIX_RSS_KEY_LEN]);
void __roc_api roc_nix_rss_key_get(struct roc_nix *roc_nix,
@@ -1080,7 +1080,7 @@ int __roc_api roc_nix_stats_queue_get(struct roc_nix *roc_nix, uint16_t qid,
struct roc_nix_stats_queue *qstats);
int __roc_api roc_nix_stats_queue_reset(struct roc_nix *roc_nix, uint16_t qid,
bool is_rx);
-int __roc_api roc_nix_num_xstats_get(struct roc_nix *roc_nix);
+int roc_nix_num_xstats_get(struct roc_nix *roc_nix);
int __roc_api roc_nix_xstats_get(struct roc_nix *roc_nix,
struct roc_nix_xstat *xstats, unsigned int n);
int __roc_api roc_nix_xstats_names_get(struct roc_nix *roc_nix,
@@ -1094,9 +1094,9 @@ int __roc_api roc_nix_rq_modify(struct roc_nix *roc_nix, struct roc_nix_rq *rq,
bool ena);
int __roc_api roc_nix_rq_cman_config(struct roc_nix *roc_nix, struct roc_nix_rq *rq);
int __roc_api roc_nix_rq_ena_dis(struct roc_nix_rq *rq, bool enable);
-int __roc_api roc_nix_rq_multi_ena_dis(struct roc_nix *roc_nix, struct roc_nix_rq *rqs,
- int nb_rx_queues, bool enable);
-int __roc_api roc_nix_rq_is_sso_enable(struct roc_nix *roc_nix, uint32_t qid);
+int roc_nix_rq_multi_ena_dis(struct roc_nix *roc_nix, struct roc_nix_rq *rqs,
+ int nb_rx_queues, bool enable);
+int roc_nix_rq_is_sso_enable(struct roc_nix *roc_nix, uint32_t qid);
int __roc_api roc_nix_rq_fini(struct roc_nix_rq *rq);
int __roc_api roc_nix_cq_init(struct roc_nix *roc_nix, struct roc_nix_cq *cq);
int __roc_api roc_nix_cq_fini(struct roc_nix_cq *cq);
@@ -1107,8 +1107,8 @@ int __roc_api roc_nix_sq_fini(struct roc_nix_sq *sq);
int __roc_api roc_nix_sq_ena_dis(struct roc_nix_sq *sq, bool enable);
void __roc_api roc_nix_sq_head_tail_get(struct roc_nix *roc_nix, uint16_t qid,
uint32_t *head, uint32_t *tail);
-int __roc_api roc_nix_sq_cnt_update(struct roc_nix_sq *sq, bool enable);
-int __roc_api roc_nix_sq_resize(struct roc_nix_sq *sq, uint32_t nb_desc);
+int roc_nix_sq_cnt_update(struct roc_nix_sq *sq, bool enable);
+int roc_nix_sq_resize(struct roc_nix_sq *sq, uint32_t nb_desc);
/* PTP */
int __roc_api roc_nix_ptp_rx_ena_dis(struct roc_nix *roc_nix, int enable);
@@ -1119,44 +1119,44 @@ int __roc_api roc_nix_ptp_sync_time_adjust(struct roc_nix *roc_nix,
int64_t delta);
int __roc_api roc_nix_ptp_info_cb_register(struct roc_nix *roc_nix,
ptp_info_update_t ptp_update);
-void __roc_api roc_nix_ptp_info_cb_unregister(struct roc_nix *roc_nix);
+void roc_nix_ptp_info_cb_unregister(struct roc_nix *roc_nix);
bool __roc_api roc_nix_ptp_is_enable(struct roc_nix *roc_nix);
/* VLAN */
-int __roc_api
+int
roc_nix_vlan_mcam_entry_read(struct roc_nix *roc_nix, uint32_t index,
void **rsp);
-int __roc_api roc_nix_vlan_mcam_entry_write(struct roc_nix *roc_nix, uint32_t index, void *entry,
- uint8_t intf, uint8_t enable);
-int __roc_api roc_nix_vlan_mcam_entry_alloc_and_write(struct roc_nix *roc_nix, void *entry,
- uint8_t intf, uint8_t priority,
- uint8_t ref_entry);
-int __roc_api roc_nix_vlan_mcam_entry_free(struct roc_nix *roc_nix,
- uint32_t index);
-int __roc_api roc_nix_vlan_mcam_entry_ena_dis(struct roc_nix *roc_nix,
- uint32_t index, const int enable);
-int __roc_api roc_nix_vlan_strip_vtag_ena_dis(struct roc_nix *roc_nix,
- bool enable);
-int __roc_api roc_nix_vlan_insert_ena_dis(struct roc_nix *roc_nix,
- struct roc_nix_vlan_config *vlan_cfg,
- uint64_t *mcam_index, bool enable);
-int __roc_api roc_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type,
- uint16_t tpid);
+int roc_nix_vlan_mcam_entry_write(struct roc_nix *roc_nix, uint32_t index, void *entry,
+ uint8_t intf, uint8_t enable);
+int roc_nix_vlan_mcam_entry_alloc_and_write(struct roc_nix *roc_nix, void *entry,
+ uint8_t intf, uint8_t priority,
+ uint8_t ref_entry);
+int roc_nix_vlan_mcam_entry_free(struct roc_nix *roc_nix,
+ uint32_t index);
+int roc_nix_vlan_mcam_entry_ena_dis(struct roc_nix *roc_nix,
+ uint32_t index, const int enable);
+int roc_nix_vlan_strip_vtag_ena_dis(struct roc_nix *roc_nix,
+ bool enable);
+int roc_nix_vlan_insert_ena_dis(struct roc_nix *roc_nix,
+ struct roc_nix_vlan_config *vlan_cfg,
+ uint64_t *mcam_index, bool enable);
+int roc_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type,
+ uint16_t tpid);
/* MCAST*/
-int __roc_api roc_nix_mcast_mcam_entry_alloc(struct roc_nix *roc_nix,
- uint16_t nb_entries,
- uint8_t priority,
- uint16_t index[]);
-int __roc_api roc_nix_mcast_mcam_entry_free(struct roc_nix *roc_nix,
- uint32_t index);
-int __roc_api roc_nix_mcast_mcam_entry_write(struct roc_nix *roc_nix, void *entry, uint32_t index,
- uint8_t intf, uint64_t action);
-int __roc_api roc_nix_mcast_mcam_entry_ena_dis(struct roc_nix *roc_nix, uint32_t index,
- bool enable);
-int __roc_api roc_nix_mcast_list_setup(struct mbox *mbox, uint8_t intf, int nb_entries,
- uint16_t *pf_funcs, uint16_t *channels, uint32_t *rqs,
- uint32_t *grp_index, uint32_t *start_index);
-int __roc_api roc_nix_mcast_list_free(struct mbox *mbox, uint32_t mcast_grp_index);
+int roc_nix_mcast_mcam_entry_alloc(struct roc_nix *roc_nix,
+ uint16_t nb_entries,
+ uint8_t priority,
+ uint16_t index[]);
+int roc_nix_mcast_mcam_entry_free(struct roc_nix *roc_nix,
+ uint32_t index);
+int roc_nix_mcast_mcam_entry_write(struct roc_nix *roc_nix, void *entry, uint32_t index,
+ uint8_t intf, uint64_t action);
+int roc_nix_mcast_mcam_entry_ena_dis(struct roc_nix *roc_nix, uint32_t index,
+ bool enable);
+int roc_nix_mcast_list_setup(struct mbox *mbox, uint8_t intf, int nb_entries,
+ uint16_t *pf_funcs, uint16_t *channels, uint32_t *rqs,
+ uint32_t *grp_index, uint32_t *start_index);
+int roc_nix_mcast_list_free(struct mbox *mbox, uint32_t mcast_grp_index);
int __roc_api roc_nix_max_rep_count(struct roc_nix *roc_nix);
#endif /* _ROC_NIX_H_ */
diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 4c0ddb66ed..0eea0536aa 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -2434,7 +2434,7 @@ roc_nix_inl_dev_rq(struct roc_nix *roc_nix)
return NULL;
}
-uint16_t __roc_api
+uint16_t
roc_nix_inl_outb_sso_pffunc_get(struct roc_nix *roc_nix)
{
struct nix *nix = roc_nix_to_nix_priv(roc_nix);
diff --git a/drivers/common/cnxk/roc_nix_inl.h b/drivers/common/cnxk/roc_nix_inl.h
index 06ccb304a1..30f4196581 100644
--- a/drivers/common/cnxk/roc_nix_inl.h
+++ b/drivers/common/cnxk/roc_nix_inl.h
@@ -146,14 +146,14 @@ struct roc_nix_cpt_lf_stats {
int __roc_api roc_nix_inl_dev_init(struct roc_nix_inl_dev *roc_inl_dev);
int __roc_api roc_nix_inl_dev_fini(struct roc_nix_inl_dev *roc_inl_dev);
void __roc_api roc_nix_inl_dev_dump(struct roc_nix_inl_dev *roc_inl_dev, FILE *file);
-bool __roc_api roc_nix_inl_dev_is_probed(void);
+bool roc_nix_inl_dev_is_probed(void);
void __roc_api roc_nix_inl_dev_lock(void);
void __roc_api roc_nix_inl_dev_unlock(void);
int __roc_api roc_nix_inl_dev_xaq_realloc(uint64_t aura_handle);
-int __roc_api roc_nix_inl_dev_stats_get(struct roc_nix_stats *stats);
-int __roc_api roc_nix_inl_dev_stats_reset(void);
-int __roc_api roc_nix_inl_dev_cpt_setup(bool use_inl_dev_sso);
-int __roc_api roc_nix_inl_dev_cpt_release(void);
+int roc_nix_inl_dev_stats_get(struct roc_nix_stats *stats);
+int roc_nix_inl_dev_stats_reset(void);
+int roc_nix_inl_dev_cpt_setup(bool use_inl_dev_sso);
+int roc_nix_inl_dev_cpt_release(void);
bool __roc_api roc_nix_inl_dev_is_multi_channel(void);
/* NIX Inline Inbound API */
@@ -177,12 +177,12 @@ bool __roc_api roc_nix_inl_inb_rx_inject_enable(struct roc_nix *roc_nix, bool in
uint32_t __roc_api roc_nix_inl_inb_spi_range(struct roc_nix *roc_nix,
bool inl_dev_sa, uint32_t *min,
uint32_t *max);
-uint32_t __roc_api roc_nix_inl_inb_sa_sz(struct roc_nix *roc_nix,
- bool inl_dev_sa);
+uint32_t roc_nix_inl_inb_sa_sz(struct roc_nix *roc_nix,
+ bool inl_dev_sa);
uintptr_t __roc_api roc_nix_inl_inb_sa_get(struct roc_nix *roc_nix,
bool inl_dev_sa, uint32_t spi);
void __roc_api roc_nix_inb_mode_set(struct roc_nix *roc_nix, bool use_inl_dev);
-void __roc_api roc_nix_inl_inb_set(struct roc_nix *roc_nix, bool ena);
+void roc_nix_inl_inb_set(struct roc_nix *roc_nix, bool ena);
int __roc_api roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq, bool ena);
int __roc_api roc_nix_inl_dev_rq_put(struct roc_nix_rq *rq);
bool __roc_api roc_nix_inb_is_with_inl_dev(struct roc_nix *roc_nix);
@@ -190,23 +190,23 @@ struct roc_nix_rq *__roc_api roc_nix_inl_dev_rq(struct roc_nix *roc_nix);
int __roc_api roc_nix_inl_inb_tag_update(struct roc_nix *roc_nix, uint32_t tag_const, uint8_t tt);
int __roc_api roc_nix_reassembly_configure(struct roc_cpt_rxc_time_cfg *req_cfg,
uint32_t max_wait_time);
-int __roc_api roc_nix_inl_ts_pkind_set(struct roc_nix *roc_nix, bool ts_ena, bool inb_inl_dev,
- uint8_t profile_id);
+int roc_nix_inl_ts_pkind_set(struct roc_nix *roc_nix, bool ts_ena, bool inb_inl_dev,
+ uint8_t profile_id);
int __roc_api roc_nix_inl_rq_ena_dis(struct roc_nix *roc_nix, bool ena);
-int __roc_api roc_nix_inl_meta_aura_check(struct roc_nix *roc_nix, struct roc_nix_rq *rq);
+int roc_nix_inl_meta_aura_check(struct roc_nix *roc_nix, struct roc_nix_rq *rq);
/* NIX Inline Outbound API */
int __roc_api roc_nix_inl_outb_init(struct roc_nix *roc_nix);
int __roc_api roc_nix_inl_outb_fini(struct roc_nix *roc_nix);
-bool __roc_api roc_nix_inl_outb_is_enabled(struct roc_nix *roc_nix);
+bool roc_nix_inl_outb_is_enabled(struct roc_nix *roc_nix);
uintptr_t __roc_api roc_nix_inl_outb_sa_base_get(struct roc_nix *roc_nix);
struct roc_cpt_lf *__roc_api
roc_nix_inl_outb_lf_base_get(struct roc_nix *roc_nix);
struct roc_cpt_lf *__roc_api roc_nix_inl_inb_inj_lf_get(struct roc_nix *roc_nix);
-uint16_t __roc_api roc_nix_inl_outb_sso_pffunc_get(struct roc_nix *roc_nix);
+uint16_t roc_nix_inl_outb_sso_pffunc_get(struct roc_nix *roc_nix);
int __roc_api roc_nix_inl_cb_register(roc_nix_inl_sso_work_cb_t cb, void *args);
-int __roc_api roc_nix_inl_cb_unregister(roc_nix_inl_sso_work_cb_t cb,
- void *args);
+int roc_nix_inl_cb_unregister(roc_nix_inl_sso_work_cb_t cb,
+ void *args);
int __roc_api roc_nix_inl_outb_soft_exp_poll_switch(struct roc_nix *roc_nix,
bool poll);
uint64_t *__roc_api roc_nix_inl_outb_ring_base_get(struct roc_nix *roc_nix);
diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h
index a31f908955..576460f1d7 100644
--- a/drivers/common/cnxk/roc_npa.h
+++ b/drivers/common/cnxk/roc_npa.h
@@ -195,13 +195,13 @@ static inline void
roc_npa_pool_op_dpc_reset(uint64_t aura_handle, uint8_t counter_id)
{
plt_write64(0, roc_npa_aura_handle_to_base(aura_handle) +
- NPA_LF_DPCX_ALLOC_CNT(counter_id));
+ NPA_LF_DPCX_ALLOC_CNT(counter_id));
plt_write64(0, roc_npa_aura_handle_to_base(aura_handle) +
- NPA_LF_DPCX_FREE_CNT(counter_id));
+ NPA_LF_DPCX_FREE_CNT(counter_id));
plt_write64(0, roc_npa_aura_handle_to_base(aura_handle) +
- NPA_LF_DPCX_OUTST_BUF_CNT(counter_id));
+ NPA_LF_DPCX_OUTST_BUF_CNT(counter_id));
plt_write64(0, roc_npa_aura_handle_to_base(aura_handle) +
- NPA_LF_DPCX_CNT_HI_WM(counter_id));
+ NPA_LF_DPCX_CNT_HI_WM(counter_id));
}
static inline uint64_t
@@ -876,14 +876,14 @@ int __roc_api roc_npa_aura_create(uint64_t *aura_handle, uint32_t block_count,
struct npa_aura_s *aura, int pool_id,
uint32_t flags);
int __roc_api roc_npa_aura_destroy(uint64_t aura_handle);
-uint64_t __roc_api roc_npa_zero_aura_handle(void);
+uint64_t roc_npa_zero_aura_handle(void);
int __roc_api roc_npa_buf_type_update(uint64_t aura_handle, enum roc_npa_buf_type type, int cnt);
-uint64_t __roc_api roc_npa_buf_type_mask(uint64_t aura_handle);
-uint64_t __roc_api roc_npa_buf_type_limit_get(uint64_t type_mask);
-int __roc_api roc_npa_aura_bp_configure(uint64_t aura_id, uint16_t bpid, uint8_t bp_intf,
- uint8_t bp_thresh, bool enable);
-int __roc_api roc_npa_pool_bp_configure(uint64_t pool_id, uint16_t bpid, uint8_t bp_thresh,
- uint8_t bp_class, bool enable);
+uint64_t roc_npa_buf_type_mask(uint64_t aura_handle);
+uint64_t roc_npa_buf_type_limit_get(uint64_t type_mask);
+int roc_npa_aura_bp_configure(uint64_t aura_id, uint16_t bpid, uint8_t bp_intf,
+ uint8_t bp_thresh, bool enable);
+int roc_npa_pool_bp_configure(uint64_t pool_id, uint16_t bpid, uint8_t bp_thresh,
+ uint8_t bp_class, bool enable);
/* Init callbacks */
typedef int (*roc_npa_lf_init_cb_t)(struct plt_pci_device *pci_dev);
@@ -893,20 +893,20 @@ int __roc_api roc_npa_lf_init_cb_register(roc_npa_lf_init_cb_t cb);
uint16_t __roc_api roc_npa_pf_func_get(void);
/* Debug */
-int __roc_api roc_npa_ctx_dump(void);
-int __roc_api roc_npa_dump(void);
+int roc_npa_ctx_dump(void);
+int roc_npa_dump(void);
/* Reset operation performance counter. */
-int __roc_api roc_npa_pool_op_pc_reset(uint64_t aura_handle);
+int roc_npa_pool_op_pc_reset(uint64_t aura_handle);
-int __roc_api roc_npa_aura_drop_set(uint64_t aura_handle, uint64_t limit,
- bool ena);
+int roc_npa_aura_drop_set(uint64_t aura_handle, uint64_t limit,
+ bool ena);
-void __roc_api roc_npa_dev_lock(void);
-void __roc_api roc_npa_dev_unlock(void);
-int __roc_api roc_npa_dpc_alloc(uint8_t *counter_id, uint64_t conf);
-int __roc_api roc_npa_dpc_free(uint8_t counter_id);
-int __roc_api roc_npa_pool_dpc_enable(uint64_t aura_handle, uint8_t counter_id, uint32_t flags);
-int __roc_api roc_npa_pool_dpc_disable(uint64_t aura_handle, uint32_t flags);
+void roc_npa_dev_lock(void);
+void roc_npa_dev_unlock(void);
+int roc_npa_dpc_alloc(uint8_t *counter_id, uint64_t conf);
+int roc_npa_dpc_free(uint8_t counter_id);
+int roc_npa_pool_dpc_enable(uint64_t aura_handle, uint8_t counter_id, uint32_t flags);
+int roc_npa_pool_dpc_disable(uint64_t aura_handle, uint32_t flags);
#endif /* _ROC_NPA_H_ */
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 21fa493c74..60aa9cdbed 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -453,7 +453,7 @@ struct roc_npc {
int __roc_api roc_npc_init(struct roc_npc *roc_npc);
int __roc_api roc_npc_fini(struct roc_npc *roc_npc);
const char *__roc_api roc_npc_profile_name_get(struct roc_npc *roc_npc);
-int __roc_api roc_npc_kex_capa_get(struct roc_nix *roc_nix, uint64_t *kex_capability);
+int roc_npc_kex_capa_get(struct roc_nix *roc_nix, uint64_t *kex_capability);
struct roc_npc_flow *__roc_api roc_npc_flow_create(struct roc_npc *roc_npc,
const struct roc_npc_attr *attr,
@@ -467,22 +467,22 @@ int __roc_api roc_npc_mcam_free_entry(struct roc_npc *roc_npc, uint32_t entry);
int __roc_api roc_npc_mcam_enable_all_entries(struct roc_npc *roc_npc, bool enable);
int __roc_api roc_npc_mcam_alloc_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam,
struct roc_npc_flow *ref_mcam, int prio, int *resp_count);
-int __roc_api roc_npc_mcam_alloc_entries(struct roc_npc *roc_npc, int ref_entry, int *alloc_entry,
- int req_count, int priority, int *resp_count,
- bool is_conti);
-int __roc_api roc_npc_mcam_ena_dis_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam,
- bool enable);
+int roc_npc_mcam_alloc_entries(struct roc_npc *roc_npc, int ref_entry, int *alloc_entry,
+ int req_count, int priority, int *resp_count,
+ bool is_conti);
+int roc_npc_mcam_ena_dis_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam,
+ bool enable);
int __roc_api roc_npc_mcam_write_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam);
-void __roc_api roc_npc_mcam_write_rx_finalize(struct roc_npc *roc_npc, struct roc_npc_flow *flow);
+void roc_npc_mcam_write_rx_finalize(struct roc_npc *roc_npc, struct roc_npc_flow *flow);
-void __roc_api roc_npc_defrag_mcam_banks(struct roc_npc *roc_npc);
+void roc_npc_defrag_mcam_banks(struct roc_npc *roc_npc);
uint8_t __roc_api roc_npc_get_key_type(struct roc_npc *roc_npc, struct roc_npc_flow *flow);
-uint8_t __roc_api roc_npc_kex_key_type_config_get(struct roc_npc *roc_npc);
+uint8_t roc_npc_kex_key_type_config_get(struct roc_npc *roc_npc);
int __roc_api roc_npc_flow_parse(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
const struct roc_npc_item_info pattern[],
const struct roc_npc_action actions[], struct roc_npc_flow *flow);
-int __roc_api roc_npc_get_low_priority_mcam(struct roc_npc *roc_npc);
+int roc_npc_get_low_priority_mcam(struct roc_npc *roc_npc);
int __roc_api roc_npc_mcam_free_counter(struct roc_npc *roc_npc, uint16_t ctr_id);
int __roc_api roc_npc_mcam_read_counter(struct roc_npc *roc_npc, uint32_t ctr_id, uint64_t *count);
int __roc_api roc_npc_mcam_clear_counter(struct roc_npc *roc_npc, uint32_t ctr_id);
@@ -501,13 +501,13 @@ int __roc_api roc_npc_vtag_actions_sub_return(struct roc_npc *roc_npc, uint32_t
int __roc_api roc_npc_mcam_merge_base_steering_rule(struct roc_npc *roc_npc,
struct roc_npc_flow *flow);
int __roc_api roc_npc_mcam_default_rule_action_get(struct roc_npc *roc_npc, uint64_t *action);
-int __roc_api roc_npc_validate_portid_action(struct roc_npc *roc_npc_src,
- struct roc_npc *roc_npc_dst);
-int __roc_api roc_npc_mcam_init(struct roc_npc *roc_npc, struct roc_npc_flow *flow, int mcam_id);
+int roc_npc_validate_portid_action(struct roc_npc *roc_npc_src,
+ struct roc_npc *roc_npc_dst);
+int roc_npc_mcam_init(struct roc_npc *roc_npc, struct roc_npc_flow *flow, int mcam_id);
int __roc_api roc_npc_mcam_move(struct roc_npc *roc_npc, uint16_t old_ent, uint16_t new_ent);
void *__roc_api roc_npc_aged_flow_ctx_get(struct roc_npc *roc_npc, uint32_t mcam_id);
-void __roc_api roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base,
- uint16_t *chan_mask);
+void roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base,
+ uint16_t *chan_mask);
int __roc_api roc_npc_mcam_get_stats(struct roc_npc *roc_npc, struct roc_npc_flow *flow,
uint64_t *count);
int __roc_api roc_npc_skip_size_pkind_get(struct roc_npc *roc_npc);
diff --git a/drivers/common/cnxk/roc_platform.c b/drivers/common/cnxk/roc_platform.c
index 0a1b96092b..46091f200f 100644
--- a/drivers/common/cnxk/roc_platform.c
+++ b/drivers/common/cnxk/roc_platform.c
@@ -372,7 +372,6 @@ roc_plt_control_lmt_id_get(void)
return ROC_NUM_LMT_LINES - 1;
}
-RTE_EXPORT_INTERNAL_SYMBOL(roc_plt_lmt_validate)
uint16_t
roc_plt_lmt_validate(void)
{
@@ -429,7 +428,6 @@ roc_plt_init(void)
RTE_EXPORT_INTERNAL_SYMBOL(cnxk_logtype_base)
RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_base, base, INFO);
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_logtype_mbox)
RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_mbox, mbox, NOTICE);
RTE_EXPORT_INTERNAL_SYMBOL(cnxk_logtype_cpt)
RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_cpt, crypto, NOTICE);
@@ -445,7 +443,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(cnxk_logtype_sso)
RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_sso, event, NOTICE);
RTE_EXPORT_INTERNAL_SYMBOL(cnxk_logtype_tim)
RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_tim, timer, NOTICE);
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_logtype_tm)
RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_tm, tm, NOTICE);
RTE_EXPORT_INTERNAL_SYMBOL(cnxk_logtype_dpi)
RTE_LOG_REGISTER_SUFFIX(cnxk_logtype_dpi, dpi, NOTICE);
diff --git a/drivers/common/cnxk/roc_platform.h b/drivers/common/cnxk/roc_platform.h
index 70937e8b3a..8a6ee621be 100644
--- a/drivers/common/cnxk/roc_platform.h
+++ b/drivers/common/cnxk/roc_platform.h
@@ -393,7 +393,6 @@ int roc_plt_init(void);
__rte_internal
uint16_t roc_plt_control_lmt_id_get(void);
-__rte_internal
uint16_t roc_plt_lmt_validate(void);
/* Init callbacks */
diff --git a/drivers/common/cnxk/roc_platform_base_symbols.c b/drivers/common/cnxk/roc_platform_base_symbols.c
index be5038fb0e..7e9fe17a85 100644
--- a/drivers/common/cnxk/roc_platform_base_symbols.c
+++ b/drivers/common/cnxk/roc_platform_base_symbols.c
@@ -9,7 +9,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_ae_ec_grp_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ae_ec_grp_put)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ae_fpm_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ae_fpm_put)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_aes_xcbc_key_derive)
RTE_EXPORT_INTERNAL_SYMBOL(roc_aes_hash_key_derive)
RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_dev_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_dev_fini)
@@ -34,13 +33,9 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_cgx_cpri_mode_misc)
RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_intr_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_intr_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_intr_handler)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_intr_available)
RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_intr_max_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_intr_clear)
RTE_EXPORT_INTERNAL_SYMBOL(roc_bphy_intr_register)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_inline_ipsec_cfg)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_inline_ipsec_inb_cfg_read)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_inline_ipsec_inb_cfg)
RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_rxc_time_cfg)
RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_dev_configure)
RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_lf_init)
@@ -63,20 +58,15 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_int_misc_cb_unregister)
RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_parse_hdr_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_afs_print)
RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_lfs_print)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_cpt_cq_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_wait_queue_idle)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_disable)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_configure)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_configure_v2)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_dev_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_dev_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_lf_ring_init)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_lf_ring_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_lf_pffunc_cfg)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_lf_ring_chan_cfg)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_lf_chan_tbl_select)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_lf_chan_tbl_ena_dis)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_lf_chan_tbl_update)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_access_pair_group_create)
RTE_EXPORT_INTERNAL_SYMBOL(roc_dpi_access_pair_group_destroy)
@@ -97,53 +87,26 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_eswitch_nix_process_repte_notify_cb_register)
RTE_EXPORT_INTERNAL_SYMBOL(roc_eswitch_nix_process_repte_notify_cb_unregister)
RTE_EXPORT_INTERNAL_SYMBOL(roc_eswitch_nix_repte_stats)
RTE_EXPORT_INTERNAL_SYMBOL(roc_eswitch_is_repte_pfs_vf)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_hash_md5_gen)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_hash_sha1_gen)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_hash_sha256_gen)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_hash_sha512_gen)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_npa_maxpools_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_npa_maxpools_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_npa_halo_ena_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_npa_halo_ena_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_lmt_base_addr_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_num_lmtlines_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_cpt_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_rvu_lf_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_rvu_lf_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_rvu_lf_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_mcs_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_mcs_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_mcs_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_af_rx_flow_vec_ctrl_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_ring_base_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_nix_list_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_cpt_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_npa_nix_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_nix_inl_meta_aura_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_nix_rx_inject_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_nix_rx_inject_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_nix_rx_chan_base_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_nix_rx_chan_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_idev_nix_inl_dev_pffunc_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ot_ipsec_inb_sa_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ot_ipsec_outb_sa_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ow_ipsec_inb_sa_init)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ow_reass_inb_sa_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ow_ipsec_outb_sa_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_is_supported)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_hw_info_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_active_lmac_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_lmac_mode_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_pn_threshold_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_ctrl_pkt_rule_alloc)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_ctrl_pkt_rule_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_ctrl_pkt_rule_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_port_cfg_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_port_cfg_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_custom_tag_cfg_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_intr_configure)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_port_recovery)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_port_reset)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_event_cb_register)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_event_cb_unregister)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_dev_init)
@@ -151,21 +114,12 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_dev_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_rsrc_alloc)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_rsrc_free)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_sa_policy_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_sa_policy_read)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_pn_table_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_pn_table_read)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_rx_sc_cam_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_rx_sc_cam_read)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_rx_sc_cam_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_secy_policy_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_secy_policy_read)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_rx_sc_sa_map_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_rx_sc_sa_map_read)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_tx_sc_sa_map_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_tx_sc_sa_map_read)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_flowid_entry_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_flowid_entry_read)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_flowid_entry_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_sa_port_map_update)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_flowid_stats_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_mcs_secy_stats_get)
@@ -179,32 +133,20 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_reg_write32)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_reg_save)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_addr_ap2mlip)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_addr_mlip2ap)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_addr_pa_to_offset)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_addr_offset_to_pa)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_scratch_write_job)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_scratch_is_valid_bit_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_scratch_is_done_bit_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_scratch_enqueue)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_scratch_dequeue)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_scratch_queue_reset)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_jcmdq_enqueue_lf)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_jcmdq_enqueue_sl)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_clk_force_on)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_clk_force_off)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_dma_stall_on)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_dma_stall_off)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_mlip_is_enabled)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_mlip_reset)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_dev_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_dev_fini)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_blk_init)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_blk_fini)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ml_sso_pf_func_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_model)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_is_lbk)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_is_esw)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_get_base_chan)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_get_rx_chan_cnt)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_get_vwqe_interval)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_is_sdp)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_is_pf)
@@ -212,8 +154,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_get_pf)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_get_vf)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_is_vf_or_sdp)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_get_pf_func)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lf_inl_ipsec_cfg)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_cpt_ctx_cache_sync)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_max_pkt_len)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lf_alloc)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lf_free)
@@ -226,16 +166,12 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_timeunit_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_count_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_alloc)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_free_all)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_config)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_ena_dis)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_pre_color_tbl_setup)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_connect)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_stats_read)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_stats_reset)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_lf_stats_read)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpf_lf_stats_reset)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lf_get_reg_count)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lf_reg_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_queues_ctx_dump)
@@ -244,26 +180,16 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rq_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_cq_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_sq_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_dump)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_sdp_prepare_tree)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_reass_profile_id_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_cpt_lfs_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_sq_desc_dump)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_fc_config_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_fc_config_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_fc_mode_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_fc_mode_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_fc_npa_bp_cfg)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_pfc_mode_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_pfc_mode_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_chan_count_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpids_alloc)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_bpids_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rx_chan_cfg_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rx_chan_cfg_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_chan_bpid_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_meta_aura_check)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_lf_base_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_inj_lf_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_sa_base_get)
@@ -273,33 +199,26 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_custom_profile_setup)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_custom_profile_release)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_rx_inject_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_spi_range)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_sa_sz)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_sa_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_reassembly_configure)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_fini)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_is_probed)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_is_multi_channel)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_is_enabled)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_is_enabled)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_rq_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_rq_put)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_rq_ena_dis)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inb_mode_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_soft_exp_poll_switch)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inb_is_with_inl_dev)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_rq)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_outb_sso_pffunc_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_cb_register)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_cb_unregister)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_inb_tag_update)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_sa_sync)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_ctx_write)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_cpt_lf_stats_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_ts_pkind_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_lock)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_unlock)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_meta_pool_cb_register)
@@ -308,12 +227,8 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_custom_meta_pool_cb_register)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_xaq_realloc)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_qptr_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_is_cq_ena)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_stats_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_stats_reset)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_fini)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_cpt_setup)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_inl_dev_cpt_release)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rx_queue_intr_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rx_queue_intr_disable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_err_intr_ena_dis)
@@ -322,7 +237,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_register_queue_irqs)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_unregister_queue_irqs)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_register_cq_irqs)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_unregister_cq_irqs)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_rxtx_start_stop)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_link_event_start_stop)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_loopback_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_addr_set)
@@ -335,30 +249,19 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_promisc_mode_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_link_info_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_link_state_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_link_info_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_mtu_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_max_rx_len_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_stats_reset)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_fwdata_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_link_cb_register)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_link_cb_unregister)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_link_info_get_cb_register)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mac_link_info_get_cb_unregister)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mcast_mcam_entry_alloc)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mcast_mcam_entry_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mcast_mcam_entry_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mcast_mcam_entry_ena_dis)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mcast_list_setup)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_mcast_list_free)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_npc_promisc_ena_dis)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_npc_mac_addr_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_npc_mac_addr_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_npc_rx_ena_dis)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_npc_mcast_config)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lso_alt_flags_profile_setup)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lso_custom_fmt_setup)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lso_fmt_setup)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lso_fmt_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_lso_fmt_ipv4_frag_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_switch_hdr_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_eeprom_info_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rx_drop_re_set)
@@ -367,34 +270,26 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_ptp_tx_ena_dis)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_ptp_clock_read)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_ptp_sync_time_adjust)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_ptp_info_cb_register)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_ptp_info_cb_unregister)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_ptp_is_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_sq_ena_dis)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rq_ena_dis)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rq_is_sso_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rq_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rq_modify)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rq_multi_ena_dis)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rq_cman_config)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rq_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_cq_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_cq_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_sq_init)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_sq_resize)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_sq_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_cq_head_tail_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_sq_head_tail_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_q_err_cb_register)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_q_err_cb_unregister)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rss_key_default_fill)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rss_key_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rss_key_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rss_reta_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rss_reta_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rss_flowkey_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_rss_default_setup)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_num_xstats_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_sq_cnt_update)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_stats_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_stats_reset)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_stats_queue_get)
@@ -407,20 +302,13 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_pfc_prepare_tree)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_mark_config)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_mark_format_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_sq_aura_fc)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_free_resources)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_shaper_profile_add)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_shaper_profile_update)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_shaper_profile_delete)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_add)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_pkt_mode_update)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_name_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_delete)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_smq_flush)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_hierarchy_disable)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_hierarchy_xmit_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_hierarchy_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_suspend_resume)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_prealloc_res)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_shaper_update)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_parent_update)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_init)
@@ -428,15 +316,9 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_pfc_rlimit_sq)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_rlimit_sq)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_rsrc_count)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_rsrc_max)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_root_has_sp)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_egress_link_cfg_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_leaf_cnt)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_lvl)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_next)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_shaper_profile_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_shaper_profile_next)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_node_stats_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_is_user_hierarchy_enabled)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_tree_type_get)
@@ -445,43 +327,20 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_lvl_is_leaf)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_shaper_default_red_algo)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_lvl_cnt_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_tm_lvl_have_link_access)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_vlan_mcam_entry_read)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_vlan_mcam_entry_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_vlan_mcam_entry_alloc_and_write)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_vlan_mcam_entry_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_vlan_mcam_entry_ena_dis)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_vlan_strip_vtag_ena_dis)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_vlan_insert_ena_dis)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_nix_vlan_tpid_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_lf_init_cb_register)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pf_func_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pool_op_range_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_aura_op_range_set)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_aura_op_range_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pool_op_pc_reset)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_aura_drop_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pool_bp_configure)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pool_create)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_aura_create)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_aura_limit_modify)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pool_destroy)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_aura_destroy)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pool_range_update_check)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_zero_aura_handle)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_aura_bp_configure)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_dev_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_dev_fini)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_dev_lock)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_dev_unlock)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_ctx_dump)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_buf_type_update)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_buf_type_mask)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_buf_type_limit_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_dpc_alloc)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_dpc_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pool_dpc_enable)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npa_pool_dpc_disable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mark_actions_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mark_actions_sub_return)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_vtag_actions_get)
@@ -497,31 +356,21 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_get_stats)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_clear_counter)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_free_entry)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_move)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_free_all_resources)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_alloc_entries)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_enable_all_entries)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_alloc_entry)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_ena_dis_entry)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_write_entry)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_write_rx_finalize)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_get_low_priority_mcam)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_profile_name_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_kex_capa_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_kex_key_type_config_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_fini)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_validate_portid_action)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_flow_parse)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_sdp_channel_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_skip_size_pkind_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_flow_create)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_flow_destroy)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_flow_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_mcam_merge_base_steering_rule)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_aged_flow_ctx_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_defrag_mcam_banks)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_get_key_type)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_flow_mcam_dump)
RTE_EXPORT_INTERNAL_SYMBOL(roc_npc_flow_configure)
@@ -544,15 +393,11 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_re_ml_zeta_put)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_queues_attach)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_queues_detach)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_msix_offsets_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_config_lf)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_af_reg_read)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_af_reg_write)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_rule_db_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_rule_db_len_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_rule_db_prog)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_qp_get_base)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_err_intr_unregister)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_err_intr_register)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_iq_enable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_iq_disable)
RTE_EXPORT_INTERNAL_SYMBOL(roc_ree_dev_init)
@@ -561,7 +406,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_rvu_lf_dev_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_rvu_lf_dev_fini)
RTE_EXPORT_INTERNAL_SYMBOL(roc_rvu_lf_pf_func_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_rvu_lf_msg_id_range_set)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_rvu_lf_msg_id_range_check)
RTE_EXPORT_INTERNAL_SYMBOL(roc_rvu_lf_msg_process)
RTE_EXPORT_INTERNAL_SYMBOL(roc_rvu_lf_irq_register)
RTE_EXPORT_INTERNAL_SYMBOL(roc_rvu_lf_irq_unregister)
@@ -574,22 +418,17 @@ RTE_EXPORT_INTERNAL_SYMBOL(roc_se_ctx_init)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hws_base_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_base_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_pf_func_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_ns_to_gw)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hws_link)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hws_unlink)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hws_stats_get)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hws_gwc_invalidate)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_agq_alloc)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_agq_free)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_agq_release)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_agq_from_tag)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_stats_get)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_hws_link_status)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_qos_config)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_init_xaq_aura)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_free_xaq_aura)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_alloc_xaq)
-RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_release_xaq)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_set_priority)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_hwgrp_stash_config)
RTE_EXPORT_INTERNAL_SYMBOL(roc_sso_rsrc_init)
diff --git a/drivers/common/cnxk/roc_ree.h b/drivers/common/cnxk/roc_ree.h
index bf994e7124..9e9bd983aa 100644
--- a/drivers/common/cnxk/roc_ree.h
+++ b/drivers/common/cnxk/roc_ree.h
@@ -111,12 +111,12 @@ int __roc_api roc_ree_dev_fini(struct roc_ree_vf *vf);
int __roc_api roc_ree_queues_attach(struct roc_ree_vf *vf, uint8_t nb_queues);
int __roc_api roc_ree_queues_detach(struct roc_ree_vf *vf);
int __roc_api roc_ree_msix_offsets_get(struct roc_ree_vf *vf);
-int __roc_api roc_ree_config_lf(struct roc_ree_vf *vf, uint8_t lf, uint8_t pri,
- uint32_t size);
-int __roc_api roc_ree_af_reg_read(struct roc_ree_vf *vf, uint64_t reg,
- uint64_t *val);
-int __roc_api roc_ree_af_reg_write(struct roc_ree_vf *vf, uint64_t reg,
- uint64_t val);
+int roc_ree_config_lf(struct roc_ree_vf *vf, uint8_t lf, uint8_t pri,
+ uint32_t size);
+int roc_ree_af_reg_read(struct roc_ree_vf *vf, uint64_t reg,
+ uint64_t *val);
+int roc_ree_af_reg_write(struct roc_ree_vf *vf, uint64_t reg,
+ uint64_t val);
int __roc_api roc_ree_rule_db_get(struct roc_ree_vf *vf, char *rule_db,
uint32_t rule_db_len, char *rule_dbi,
uint32_t rule_dbi_len);
@@ -128,7 +128,7 @@ int __roc_api roc_ree_rule_db_prog(struct roc_ree_vf *vf, const char *rule_db,
uint32_t rule_dbi_len);
uintptr_t __roc_api roc_ree_qp_get_base(struct roc_ree_vf *vf, uint16_t qp_id);
void __roc_api roc_ree_err_intr_unregister(struct roc_ree_vf *vf);
-int __roc_api roc_ree_err_intr_register(struct roc_ree_vf *vf);
+int roc_ree_err_intr_register(struct roc_ree_vf *vf);
int __roc_api roc_ree_iq_enable(struct roc_ree_vf *vf,
const struct roc_ree_qp *qp, uint8_t pri,
uint32_t size_div128);
diff --git a/drivers/common/cnxk/roc_rvu_lf.h b/drivers/common/cnxk/roc_rvu_lf.h
index 8c71876cbc..98ec6c4eb1 100644
--- a/drivers/common/cnxk/roc_rvu_lf.h
+++ b/drivers/common/cnxk/roc_rvu_lf.h
@@ -30,7 +30,7 @@ int __roc_api roc_rvu_lf_msg_process(struct roc_rvu_lf *roc_rvu_lf,
int __roc_api roc_rvu_lf_msg_id_range_set(struct roc_rvu_lf *roc_rvu_lf,
uint16_t from, uint16_t to);
-bool __roc_api roc_rvu_lf_msg_id_range_check(struct roc_rvu_lf *roc_rvu_lf, uint16_t msg_id);
+bool roc_rvu_lf_msg_id_range_check(struct roc_rvu_lf *roc_rvu_lf, uint16_t msg_id);
typedef void (*roc_rvu_lf_intr_cb_fn)(void *cb_arg);
typedef int (*roc_rvu_lf_msg_handler_cb_fn)(uint16_t vf, uint16_t msg_id,
void *req, uint16_t req_len,
diff --git a/drivers/common/cnxk/roc_sso.h b/drivers/common/cnxk/roc_sso.h
index 9d8356abb1..43af938a8e 100644
--- a/drivers/common/cnxk/roc_sso.h
+++ b/drivers/common/cnxk/roc_sso.h
@@ -88,18 +88,18 @@ int __roc_api roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso,
uint16_t nb_qos);
int __roc_api roc_sso_hwgrp_alloc_xaq(struct roc_sso *roc_sso,
uint32_t npa_aura_id, uint16_t hwgrps);
-int __roc_api roc_sso_hwgrp_release_xaq(struct roc_sso *roc_sso,
- uint16_t hwgrps);
+int roc_sso_hwgrp_release_xaq(struct roc_sso *roc_sso,
+ uint16_t hwgrps);
int __roc_api roc_sso_hwgrp_set_priority(struct roc_sso *roc_sso,
uint16_t hwgrp, uint8_t weight,
uint8_t affinity, uint8_t priority);
-uint64_t __roc_api roc_sso_ns_to_gw(uint64_t base, uint64_t ns);
+uint64_t roc_sso_ns_to_gw(uint64_t base, uint64_t ns);
int __roc_api roc_sso_hws_link(struct roc_sso *roc_sso, uint8_t hws, uint16_t hwgrp[],
uint16_t nb_hwgrp, uint8_t set, bool use_mbox);
int __roc_api roc_sso_hws_unlink(struct roc_sso *roc_sso, uint8_t hws, uint16_t hwgrp[],
uint16_t nb_hwgrp, uint8_t set, bool use_mbox);
-int __roc_api roc_sso_hwgrp_hws_link_status(struct roc_sso *roc_sso,
- uint8_t hws, uint16_t hwgrp);
+int roc_sso_hwgrp_hws_link_status(struct roc_sso *roc_sso,
+ uint8_t hws, uint16_t hwgrp);
uintptr_t __roc_api roc_sso_hws_base_get(struct roc_sso *roc_sso, uint8_t hws);
uintptr_t __roc_api roc_sso_hwgrp_base_get(struct roc_sso *roc_sso,
uint16_t hwgrp);
@@ -115,9 +115,9 @@ void __roc_api roc_sso_hws_gwc_invalidate(struct roc_sso *roc_sso, uint8_t *hws,
int __roc_api roc_sso_hwgrp_agq_alloc(struct roc_sso *roc_sso, uint16_t hwgrp,
struct roc_sso_agq_data *data, uint32_t *agq_id);
void __roc_api roc_sso_hwgrp_agq_free(struct roc_sso *roc_sso, uint16_t hwgrp, uint32_t agq_id);
-void __roc_api roc_sso_hwgrp_agq_release(struct roc_sso *roc_sso, uint16_t hwgrp);
-uint32_t __roc_api roc_sso_hwgrp_agq_from_tag(struct roc_sso *roc_sso, uint16_t hwgrp, uint32_t tag,
- uint8_t xqe_type);
+void roc_sso_hwgrp_agq_release(struct roc_sso *roc_sso, uint16_t hwgrp);
+uint32_t roc_sso_hwgrp_agq_from_tag(struct roc_sso *roc_sso, uint16_t hwgrp, uint32_t tag,
+ uint8_t xqe_type);
/* Utility function */
uint16_t __roc_api roc_sso_pf_func_get(void);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 22/45] common/sfc_efx: do not export internal symbols unused outside base
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (20 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 21/45] common/cnxk: do not export internal symbols used only in roc Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 23/45] crypto/cnxk: do not export internal Rx inject helpers Stephen Hemminger
` (23 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Andrew Rybchenko
72 libefx functions have no user outside common/sfc_efx. The sfc net
driver and the sfc_efx mcdi code use other entry points.
Drop the internal exports and the matching LIBEFX_API tags. Many of
these functions have no caller at all and can be removed later; this
commit only takes them out of the internal ABI.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/sfc_efx/base/efx.h | 71 ----------------------
drivers/common/sfc_efx/base/efx_mcdi.h | 1 -
drivers/common/sfc_efx/sfc_base_symbols.c | 73 -----------------------
3 files changed, 145 deletions(-)
diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index b8d1ccd7bd..3aaa682a1e 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -81,7 +81,6 @@ typedef struct efx_bar_region_s {
} efx_bar_region_t;
/* The function is deprecated. It is used only if Riverhead is not supported. */
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_family(
__in uint16_t venid,
@@ -133,7 +132,6 @@ typedef struct efx_pci_ops_s {
* A user of the API must be aware of memory bars indexes (not available
* on Windows).
*/
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_family_probe_bar(
__in uint16_t venid,
@@ -217,7 +215,6 @@ enum {
};
/* Calculate the IEEE 802.3 CRC32 of a MAC addr */
-LIBEFX_API
extern __checkReturn uint32_t
efx_crc32_calculate(
__in uint32_t crc_init,
@@ -271,12 +268,10 @@ extern __checkReturn efx_rc_t
efx_nic_reset(
__in efx_nic_t *enp);
-LIBEFX_API
extern __checkReturn boolean_t
efx_nic_hw_unavailable(
__in efx_nic_t *enp);
-LIBEFX_API
extern void
efx_nic_set_hw_unavailable(
__in efx_nic_t *enp);
@@ -316,14 +311,12 @@ typedef enum efx_pcie_link_performance_e {
EFX_PCIE_LINK_PERFORMANCE_OPTIMAL
} efx_pcie_link_performance_t;
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_nic_calculate_pcie_link_bandwidth(
__in uint32_t pcie_link_width,
__in uint32_t pcie_link_gen,
__out uint32_t *bandwidth_mbpsp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_nic_check_pcie_link_speed(
__in efx_nic_t *enp,
@@ -379,13 +372,11 @@ typedef struct efx_mcdi_transport_s {
#endif /* EFSYS_OPT_MCDI_PROXY_AUTH_SERVER */
} efx_mcdi_transport_t;
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_mcdi_init(
__in efx_nic_t *enp,
__in const efx_mcdi_transport_t *mtp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_mcdi_reboot(
__in efx_nic_t *enp);
@@ -395,26 +386,22 @@ extern void
efx_mcdi_new_epoch(
__in efx_nic_t *enp);
-LIBEFX_API
extern void
efx_mcdi_get_timeout(
__in efx_nic_t *enp,
__in efx_mcdi_req_t *emrp,
__out uint32_t *usec_timeoutp);
-LIBEFX_API
extern void
efx_mcdi_request_start(
__in efx_nic_t *enp,
__in efx_mcdi_req_t *emrp,
__in boolean_t ev_cpl);
-LIBEFX_API
extern __checkReturn boolean_t
efx_mcdi_request_poll(
__in efx_nic_t *enp);
-LIBEFX_API
extern __checkReturn boolean_t
efx_mcdi_request_abort(
__in efx_nic_t *enp);
@@ -434,7 +421,6 @@ efx_mcdi_get_own_client_handle(
__in efx_nic_t *enp,
__out uint32_t *handle);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_mcdi_client_mac_addr_get(
__in efx_nic_t *enp,
@@ -449,7 +435,6 @@ efx_mcdi_client_mac_addr_set(
__in uint32_t client_handle,
__in const uint8_t addr_bytes[EFX_MAC_ADDR_LEN]);
-LIBEFX_API
extern void
efx_mcdi_fini(
__in efx_nic_t *enp);
@@ -486,14 +471,12 @@ extern void
efx_intr_disable(
__in efx_nic_t *enp);
-LIBEFX_API
extern void
efx_intr_disable_unlocked(
__in efx_nic_t *enp);
#define EFX_INTR_NEVQS 32
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_intr_trigger(
__in efx_nic_t *enp,
@@ -708,7 +691,6 @@ efx_mac_pdu_from_sdu(
__in efx_nic_t *enp,
__in size_t sdu);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_mac_pdu_get(
__in efx_nic_t *enp,
@@ -767,7 +749,6 @@ efx_mac_drain(
__in efx_nic_t *enp,
__in boolean_t enabled);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_mac_up(
__in efx_nic_t *enp,
@@ -888,14 +869,12 @@ typedef enum efx_mon_type_e {
#if EFSYS_OPT_NAMES
-LIBEFX_API
extern const char *
efx_mon_name(
__in efx_nic_t *enp);
#endif /* EFSYS_OPT_NAMES */
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_mon_init(
__in efx_nic_t *enp);
@@ -1083,14 +1062,12 @@ efx_mon_limits_update(
#endif /* EFSYS_OPT_MON_STATS */
-LIBEFX_API
extern void
efx_mon_fini(
__in efx_nic_t *enp);
/* PHY */
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_phy_verify(
__in efx_nic_t *enp);
@@ -1170,7 +1147,6 @@ typedef enum efx_loopback_kind_e {
EFX_LOOPBACK_NKINDS
} efx_loopback_kind_t;
-LIBEFX_API
extern void
efx_loopback_mask(
__in efx_loopback_kind_t loopback_kind,
@@ -1185,7 +1161,6 @@ efx_port_loopback_set(
#if EFSYS_OPT_NAMES
-LIBEFX_API
extern __checkReturn const char *
efx_loopback_type_name(
__in efx_nic_t *enp,
@@ -1262,7 +1237,6 @@ efx_phy_adv_cap_set(
__in efx_nic_t *enp,
__in uint32_t mask);
-LIBEFX_API
extern void
efx_phy_lp_cap_get(
__in efx_nic_t *enp,
@@ -1290,7 +1264,6 @@ efx_phy_lane_count_set(
__in efx_nic_t *enp,
__in efx_phy_lane_count_t lane_count);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_phy_oui_get(
__in efx_nic_t *enp,
@@ -1314,7 +1287,6 @@ typedef enum efx_phy_media_type_e {
* the module, then this will be the media type of the module.
* Otherwise it will be the media type of the port.
*/
-LIBEFX_API
extern void
efx_phy_media_type_get(
__in efx_nic_t *enp,
@@ -1347,7 +1319,6 @@ efx_phy_media_type_get(
#define EFX_PHY_MEDIA_INFO_MAX_OFFSET 0x100
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_phy_module_get_info(
__in efx_nic_t *enp,
@@ -1881,7 +1852,6 @@ efx_nic_set_drv_limits(
* should be advertised. It is valid to set the version string
* only before efx_nic_probe() is called.
*/
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_nic_set_drv_version(
__inout efx_nic_t *enp,
@@ -1893,7 +1863,6 @@ typedef enum efx_nic_region_e {
EFX_REGION_PIO_WRITE_VI, /* Memory BAR WC mapping */
} efx_nic_region_t;
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_nic_get_bar_region(
__in efx_nic_t *enp,
@@ -2391,7 +2360,6 @@ efx_sram_test(
#endif /* EFSYS_OPT_DIAG */
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_sram_buf_tbl_set(
__in efx_nic_t *enp,
@@ -2399,7 +2367,6 @@ efx_sram_buf_tbl_set(
__in efsys_mem_t *esmp,
__in size_t n);
-LIBEFX_API
extern void
efx_sram_buf_tbl_clear(
__in efx_nic_t *enp,
@@ -2480,7 +2447,6 @@ efx_evq_size(
__in unsigned int ndescs,
__in uint32_t flags);
-LIBEFX_API
extern __checkReturn unsigned int
efx_evq_nbufs(
__in const efx_nic_t *enp,
@@ -2510,7 +2476,6 @@ efx_evq_nbufs(
#define EFX_EVQ_FLAGS_EXTENDED_WIDTH (0x20)
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_ev_qcreate(
__in efx_nic_t *enp,
@@ -2535,7 +2500,6 @@ efx_ev_qcreate_irq(
__in uint32_t irq,
__deref_out efx_evq_t **eepp);
-LIBEFX_API
extern void
efx_ev_qpost(
__in efx_evq_t *eep,
@@ -2769,7 +2733,6 @@ typedef struct efx_ev_callbacks_s {
} efx_ev_callbacks_t;
-LIBEFX_API
extern __checkReturn boolean_t
efx_ev_qpending(
__in efx_evq_t *eep,
@@ -2800,14 +2763,12 @@ efx_ev_qpoll(
__in const efx_ev_callbacks_t *eecp,
__in_opt void *arg);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_ev_usecs_to_ticks(
__in efx_nic_t *enp,
__in unsigned int usecs,
__out unsigned int *ticksp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_ev_qmoderate(
__in efx_evq_t *eep,
@@ -3020,7 +2981,6 @@ efx_rx_scale_default_support_get(
__in efx_nic_t *enp,
__out efx_rx_scale_context_type_t *typep);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_rx_scale_context_alloc(
__in efx_nic_t *enp,
@@ -3090,7 +3050,6 @@ efx_rxq_size(
__in const efx_nic_t *enp,
__in unsigned int ndescs);
-LIBEFX_API
extern __checkReturn unsigned int
efx_rxq_nbufs(
__in const efx_nic_t *enp,
@@ -3371,7 +3330,6 @@ efx_txq_size(
__in const efx_nic_t *enp,
__in unsigned int ndescs);
-LIBEFX_API
extern __checkReturn unsigned int
efx_txq_nbufs(
__in const efx_nic_t *enp,
@@ -3399,7 +3357,6 @@ efx_tx_qcreate(
__deref_out efx_txq_t **etpp,
__out unsigned int *addedp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_tx_qpost(
__in efx_txq_t *etp,
@@ -3408,7 +3365,6 @@ efx_tx_qpost(
__in unsigned int completed,
__inout unsigned int *addedp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_tx_qpace(
__in efx_txq_t *etp,
@@ -3431,17 +3387,14 @@ extern void
efx_tx_qenable(
__in efx_txq_t *etp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_tx_qpio_enable(
__in efx_txq_t *etp);
-LIBEFX_API
extern void
efx_tx_qpio_disable(
__in efx_txq_t *etp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_tx_qpio_write(
__in efx_txq_t *etp,
@@ -3449,7 +3402,6 @@ efx_tx_qpio_write(
__in size_t buf_length,
__in size_t pio_buf_offset);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_tx_qpio_post(
__in efx_txq_t *etp,
@@ -3475,7 +3427,6 @@ efx_tx_qdesc_dma_create(
__in boolean_t eop,
__out efx_desc_t *edp);
-LIBEFX_API
extern void
efx_tx_qdesc_tso_create(
__in efx_txq_t *etp,
@@ -3508,7 +3459,6 @@ efx_tx_qdesc_vlantci_create(
__in uint16_t tci,
__out efx_desc_t *edp);
-LIBEFX_API
extern void
efx_tx_qdesc_checksum_create(
__in efx_txq_t *etp,
@@ -3692,7 +3642,6 @@ efx_filter_remove(
__in efx_nic_t *enp,
__inout efx_filter_spec_t *spec);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_restore(
__in efx_nic_t *enp);
@@ -3705,7 +3654,6 @@ efx_filter_supported_filters(
__in size_t buffer_length,
__out size_t *list_lengthp);
-LIBEFX_API
extern void
efx_filter_spec_init_rx(
__out efx_filter_spec_t *spec,
@@ -3713,13 +3661,11 @@ efx_filter_spec_init_rx(
__in efx_filter_flags_t flags,
__in efx_rxq_t *erp);
-LIBEFX_API
extern void
efx_filter_spec_init_tx(
__out efx_filter_spec_t *spec,
__in efx_txq_t *etp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_ipv4_local(
__inout efx_filter_spec_t *spec,
@@ -3727,7 +3673,6 @@ efx_filter_spec_set_ipv4_local(
__in uint32_t host,
__in uint16_t port);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_ipv4_full(
__inout efx_filter_spec_t *spec,
@@ -3744,13 +3689,11 @@ efx_filter_spec_set_eth_local(
__in uint16_t vid,
__in const uint8_t *addr);
-LIBEFX_API
extern void
efx_filter_spec_set_ether_type(
__inout efx_filter_spec_t *spec,
__in uint16_t ether_type);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_uc_def(
__inout efx_filter_spec_t *spec);
@@ -3766,14 +3709,12 @@ typedef enum efx_filter_inner_frame_match_e {
EFX_FILTER_INNER_FRAME_MATCH_UNKNOWN_UCAST_DST
} efx_filter_inner_frame_match_t;
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_encap_type(
__inout efx_filter_spec_t *spec,
__in efx_tunnel_protocol_t encap_type,
__in efx_filter_inner_frame_match_t inner_frame_match);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_vxlan(
__inout efx_filter_spec_t *spec,
@@ -3781,7 +3722,6 @@ efx_filter_spec_set_vxlan(
__in const uint8_t *inner_addr,
__in const uint8_t *outer_addr);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_geneve(
__inout efx_filter_spec_t *spec,
@@ -3789,7 +3729,6 @@ efx_filter_spec_set_geneve(
__in const uint8_t *inner_addr,
__in const uint8_t *outer_addr);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_nvgre(
__inout efx_filter_spec_t *spec,
@@ -3798,7 +3737,6 @@ efx_filter_spec_set_nvgre(
__in const uint8_t *outer_addr);
#if EFSYS_OPT_RX_SCALE
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_rss_context(
__inout efx_filter_spec_t *spec,
@@ -3808,14 +3746,12 @@ efx_filter_spec_set_rss_context(
/* HASH */
-LIBEFX_API
extern __checkReturn uint32_t
efx_hash_dwords(
__in_ecount(count) uint32_t const *input,
__in size_t count,
__in uint32_t init);
-LIBEFX_API
extern __checkReturn uint32_t
efx_hash_bytes(
__in_ecount(length) uint8_t const *input,
@@ -4183,7 +4119,6 @@ efx_evb_vswitch_destroy(
__in efx_nic_t *enp,
__in efx_vswitch_t *evp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_evb_vport_mac_set(
__in efx_nic_t *enp,
@@ -4191,7 +4126,6 @@ efx_evb_vport_mac_set(
__in efx_vport_id_t vport_id,
__in_bcount(EFX_MAC_ADDR_LEN) uint8_t *addrp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_evb_vport_vlan_set(
__in efx_nic_t *enp,
@@ -4199,7 +4133,6 @@ efx_evb_vport_vlan_set(
__in efx_vport_id_t vport_id,
__in uint16_t vid);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_evb_vport_reset(
__in efx_nic_t *enp,
@@ -4209,7 +4142,6 @@ efx_evb_vport_reset(
__in uint16_t vid,
__out boolean_t *is_fn_resetp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_evb_vport_stats(
__in efx_nic_t *enp,
@@ -4940,7 +4872,6 @@ typedef struct efx_counter_s {
uint32_t id;
} efx_counter_t;
-LIBEFX_API
extern __checkReturn unsigned int
efx_mae_action_set_get_nb_count(
__in const efx_mae_actions_t *spec);
@@ -4995,7 +4926,6 @@ efx_mae_action_set_alloc(
* deallocation or counter stream stop should provide the parameter in
* functions that free the counters and stop the counter stream.
*/
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_mae_counters_alloc(
__in efx_nic_t *enp,
@@ -5267,7 +5197,6 @@ efx_virtio_get_features(
__in efx_virtio_device_type_t type,
__out uint64_t *featuresp);
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_virtio_verify_features(
__in efx_nic_t *enp,
diff --git a/drivers/common/sfc_efx/base/efx_mcdi.h b/drivers/common/sfc_efx/base/efx_mcdi.h
index 4e82717015..3d4638f0c6 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.h
+++ b/drivers/common/sfc_efx/base/efx_mcdi.h
@@ -77,7 +77,6 @@ efx_mcdi_ev_cpl(
__in int errcode);
#if EFSYS_OPT_MCDI_PROXY_AUTH
-LIBEFX_API
extern __checkReturn efx_rc_t
efx_mcdi_get_proxy_handle(
__in efx_nic_t *enp,
diff --git a/drivers/common/sfc_efx/sfc_base_symbols.c b/drivers/common/sfc_efx/sfc_base_symbols.c
index bbb6f39924..01f1e74753 100644
--- a/drivers/common/sfc_efx/sfc_base_symbols.c
+++ b/drivers/common/sfc_efx/sfc_base_symbols.c
@@ -5,68 +5,38 @@
#include <eal_export.h>
/* Symbols from the base driver are exported separately below. */
-RTE_EXPORT_INTERNAL_SYMBOL(efx_crc32_calculate)
RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_init)
RTE_EXPORT_INTERNAL_SYMBOL(efx_evq_size)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_evq_nbufs)
RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qcreate_irq)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qcreate)
RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qdestroy)
RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qprime)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qpending)
RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qcreate_check_init_done)
RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qpoll)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qpost)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_usecs_to_ticks)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_ev_qmoderate)
RTE_EXPORT_INTERNAL_SYMBOL(efx_evb_init)
RTE_EXPORT_INTERNAL_SYMBOL(efx_evb_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_evb_vswitch_create)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_evb_vport_mac_set)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_evb_vport_vlan_set)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_evb_vport_reset)
RTE_EXPORT_INTERNAL_SYMBOL(efx_evb_vswitch_destroy)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_evb_vport_stats)
RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_insert)
RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_remove)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_restore)
RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_init)
RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_supported_filters)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_init_rx)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_init_tx)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_ipv4_local)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_ipv4_full)
RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_eth_local)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_ether_type)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_uc_def)
RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_mc_def)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_encap_type)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_vxlan)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_geneve)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_nvgre)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_filter_spec_set_rss_context)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_hash_dwords)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_hash_bytes)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_hash_bytes)
RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_init)
RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_enable)
RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_disable)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_disable_unlocked)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_trigger)
RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_status_line)
RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_status_message)
RTE_EXPORT_INTERNAL_SYMBOL(efx_intr_fatal)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_pdu_from_sdu)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_pdu_set)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_pdu_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_addr_set)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_filter_set)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_filter_get_all_ucast_mcast)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_drain)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_up)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_fcntl_set)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_fcntl_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mac_multicast_list_set)
@@ -131,11 +101,9 @@ RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_encap_header_update)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_encap_header_free)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_action_set_fill_in_eh_id)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_action_set_alloc)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_action_set_get_nb_count)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_action_set_fill_in_counter_id)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_action_set_clear_fw_rsrc_ids)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_counters_alloc_type)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_counters_alloc)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_counters_free_type)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_counters_free)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_counters_stream_start)
@@ -150,29 +118,13 @@ RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_read_mport_journal)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_action_set_replay)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_action_set_list_alloc)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mae_action_set_list_free)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_init)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_new_epoch)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_request_start)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_request_poll)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_request_abort)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_get_client_handle)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_get_own_client_handle)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_client_mac_addr_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_client_mac_addr_set)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_get_timeout)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_get_proxy_handle)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mcdi_reboot)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mon_name)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mon_init)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_mon_fini)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_family)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_family_probe_bar)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_create)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_probe)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_set_drv_limits)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_set_drv_version)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_get_bar_region)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_get_vi_pool)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_init)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_fini)
@@ -182,30 +134,19 @@ RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_reset)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_cfg_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_get_fw_version)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_get_board_info)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_hw_unavailable)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_set_hw_unavailable)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_loopback_mask)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_calculate_pcie_link_bandwidth)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_get_fw_subvariant)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_set_fw_subvariant)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_check_pcie_link_speed)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_dma_config_add)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_dma_reconfigure)
RTE_EXPORT_INTERNAL_SYMBOL(efx_nic_dma_map)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_verify)
RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_adv_cap_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_adv_cap_set)
RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_lane_count_set)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_lp_cap_get)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_oui_get)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_media_type_get)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_module_get_info)
RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_fec_type_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_phy_link_state_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_port_init)
RTE_EXPORT_INTERNAL_SYMBOL(efx_port_poll)
RTE_EXPORT_INTERNAL_SYMBOL(efx_port_loopback_set)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_loopback_type_name)
RTE_EXPORT_INTERNAL_SYMBOL(efx_port_vlan_strip_set)
RTE_EXPORT_INTERNAL_SYMBOL(efx_port_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_init)
@@ -213,7 +154,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_scale_hash_flags_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_hash_default_support_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_scale_default_support_get)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_scale_context_alloc)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_scale_context_alloc_v2)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_scale_context_free)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_scale_mode_set)
@@ -223,7 +163,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_qpost)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_qpush)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_qflush)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rxq_size)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_rxq_nbufs)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_qenable)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_qcreate)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_qcreate_es_super_buffer)
@@ -232,8 +171,6 @@ RTE_EXPORT_INTERNAL_SYMBOL(efx_pseudo_hdr_pkt_length_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_pseudo_hdr_hash_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_prefix_get_layout)
RTE_EXPORT_INTERNAL_SYMBOL(efx_rx_prefix_layout_check)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_sram_buf_tbl_set)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_sram_buf_tbl_clear)
RTE_EXPORT_INTERNAL_SYMBOL(efx_table_list)
RTE_EXPORT_INTERNAL_SYMBOL(efx_table_supported_num_get)
RTE_EXPORT_INTERNAL_SYMBOL(efx_table_is_supported)
@@ -249,24 +186,15 @@ RTE_EXPORT_INTERNAL_SYMBOL(efx_tunnel_reconfigure)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_init)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_txq_size)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_txq_nbufs)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qcreate)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qdestroy)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qpost)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qpush)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qpace)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qflush)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qenable)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qpio_enable)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qpio_disable)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qpio_write)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qpio_post)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qdesc_post)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qdesc_dma_create)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qdesc_tso_create)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qdesc_tso2_create)
RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qdesc_vlantci_create)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_tx_qdesc_checksum_create)
RTE_EXPORT_INTERNAL_SYMBOL(efx_virtio_init)
RTE_EXPORT_INTERNAL_SYMBOL(efx_virtio_fini)
RTE_EXPORT_INTERNAL_SYMBOL(efx_virtio_qcreate)
@@ -275,4 +203,3 @@ RTE_EXPORT_INTERNAL_SYMBOL(efx_virtio_qstop)
RTE_EXPORT_INTERNAL_SYMBOL(efx_virtio_qdestroy)
RTE_EXPORT_INTERNAL_SYMBOL(efx_virtio_get_doorbell_offset)
RTE_EXPORT_INTERNAL_SYMBOL(efx_virtio_get_features)
-RTE_EXPORT_INTERNAL_SYMBOL(efx_virtio_verify_features)
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 23/45] crypto/cnxk: do not export internal Rx inject helpers
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (21 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 22/45] common/sfc_efx: do not export internal symbols unused outside base Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 24/45] net/cnxk: do not export inline inbound mode setter Stephen Hemminger
` (22 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Ankur Dwivedi, Anoob Joseph, Tejasree Kondoj
The cn10k and cn20k Rx inject functions are installed through the
security capability ops inside the crypto driver. The cnxk net
driver drives Rx inject through the roc layer, not through these,
so they do not need to be exported.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
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 --
4 files changed, 10 deletions(-)
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
index 365e3a8535..3ae784af95 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.c
@@ -1340,7 +1340,6 @@ cn10k_cpt_dequeue_burst(void *qptr, struct rte_crypto_op **ops, uint16_t nb_ops)
}
#if defined(RTE_ARCH_ARM64)
-RTE_EXPORT_INTERNAL_SYMBOL(cn10k_cryptodev_sec_inb_rx_inject)
uint16_t __rte_hot
cn10k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
struct rte_security_session **sess, uint16_t nb_pkts)
@@ -1484,7 +1483,6 @@ cn10k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
return count + i;
}
#else
-RTE_EXPORT_INTERNAL_SYMBOL(cn10k_cryptodev_sec_inb_rx_inject)
uint16_t __rte_hot
cn10k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
struct rte_security_session **sess, uint16_t nb_pkts)
@@ -1981,7 +1979,6 @@ cn10k_sym_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
return 0;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cn10k_cryptodev_sec_rx_inject_configure)
int
cn10k_cryptodev_sec_rx_inject_configure(void *device, uint16_t port_id, bool enable)
{
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
index be76c49a65..8fd5d2d7f5 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn10k_cryptodev_ops.h
@@ -25,12 +25,10 @@ extern struct rte_cryptodev_ops cn10k_cpt_ops;
void cn10k_cpt_set_enqdeq_fns(struct rte_cryptodev *dev, struct cnxk_cpt_vf *vf);
-__rte_internal
uint16_t __rte_hot cn10k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
struct rte_security_session **sess,
uint16_t nb_pkts);
-__rte_internal
int cn10k_cryptodev_sec_rx_inject_configure(void *device, uint16_t port_id, bool enable);
__rte_internal
diff --git a/drivers/crypto/cnxk/cn20k_cryptodev_ops.c b/drivers/crypto/cnxk/cn20k_cryptodev_ops.c
index c654dbf88d..f99ffaff54 100644
--- a/drivers/crypto/cnxk/cn20k_cryptodev_ops.c
+++ b/drivers/crypto/cnxk/cn20k_cryptodev_ops.c
@@ -1509,7 +1509,6 @@ cn20k_sym_configure_raw_dp_ctx(struct rte_cryptodev *dev, uint16_t qp_id,
}
#if defined(RTE_ARCH_ARM64)
-RTE_EXPORT_INTERNAL_SYMBOL(cn20k_cryptodev_sec_inb_rx_inject)
uint16_t __rte_hot
cn20k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
struct rte_security_session **sess, uint16_t nb_pkts)
@@ -1653,7 +1652,6 @@ cn20k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
return count + i;
}
#else
-RTE_EXPORT_INTERNAL_SYMBOL(cn20k_cryptodev_sec_inb_rx_inject)
uint16_t __rte_hot
cn20k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
struct rte_security_session **sess, uint16_t nb_pkts)
@@ -1666,7 +1664,6 @@ cn20k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
}
#endif
-RTE_EXPORT_INTERNAL_SYMBOL(cn20k_cryptodev_sec_rx_inject_configure)
int
cn20k_cryptodev_sec_rx_inject_configure(void *device, uint16_t port_id, bool enable)
{
diff --git a/drivers/crypto/cnxk/cn20k_cryptodev_ops.h b/drivers/crypto/cnxk/cn20k_cryptodev_ops.h
index ffcdb5a96b..028a47db69 100644
--- a/drivers/crypto/cnxk/cn20k_cryptodev_ops.h
+++ b/drivers/crypto/cnxk/cn20k_cryptodev_ops.h
@@ -26,12 +26,10 @@ extern struct rte_cryptodev_ops cn20k_cpt_ops;
void cn20k_cpt_set_enqdeq_fns(struct rte_cryptodev *dev);
-__rte_internal
uint16_t __rte_hot cn20k_cryptodev_sec_inb_rx_inject(void *dev, struct rte_mbuf **pkts,
struct rte_security_session **sess,
uint16_t nb_pkts);
-__rte_internal
int cn20k_cryptodev_sec_rx_inject_configure(void *device, uint16_t port_id, bool enable);
__rte_internal
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 24/45] net/cnxk: do not export inline inbound mode setter
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (22 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 23/45] crypto/cnxk: do not export internal Rx inject helpers Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 25/45] common/sfc_efx: remove unused libefx functions Stephen Hemminger
` (21 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra
cnxk_nix_inb_mode_set() is only called from cnxk_ethdev.c in the
same driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/cnxk/cnxk_ethdev.c | 1 -
drivers/net/cnxk/cnxk_ethdev.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index 0bd0302d6a..c0ce326475 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -189,7 +189,6 @@ cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb)
cnxk_ethdev_rx_offload_cb = cb;
}
-RTE_EXPORT_INTERNAL_SYMBOL(cnxk_nix_inb_mode_set)
int
cnxk_nix_inb_mode_set(struct cnxk_eth_dev *dev, bool use_inl_dev)
{
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index f99bfdb89c..f358a32311 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -790,7 +790,6 @@ int cnxk_nix_lookup_mem_metapool_clear(struct cnxk_eth_dev *dev);
int cnxk_nix_lookup_mem_bufsize_set(struct cnxk_eth_dev *dev, uint64_t size);
int cnxk_nix_lookup_mem_bufsize_clear(struct cnxk_eth_dev *dev);
-__rte_internal
int cnxk_nix_inb_mode_set(struct cnxk_eth_dev *dev, bool use_inl_dev);
__rte_internal
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 25/45] common/sfc_efx: remove unused libefx functions
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (23 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 24/45] net/cnxk: do not export inline inbound mode setter Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 26/45] common/cnxk: remove unused roc functions Stephen Hemminger
` (20 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Andrew Rybchenko
48 libefx functions have no caller anywhere in the tree. Deleting
them orphaned a few internal helpers that existed only to serve
them: efx_filter_spec_set_tunnel(), the MCDI capability predicates
and efx_mcdi_get_phy_media_info().
Remove the functions, their declarations in efx.h and efx_mcdi.h,
and the helpers that became unreachable. A rescan of the remaining
libefx globals finds no further unused ones.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/sfc_efx/base/efx.h | 321 -----------------------
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 | 27 --
drivers/common/sfc_efx/base/efx_mon.c | 81 ------
drivers/common/sfc_efx/base/efx_nic.c | 130 ---------
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 ---
18 files changed, 2034 deletions(-)
diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 3aaa682a1e..5626563cb8 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -272,10 +272,6 @@ extern __checkReturn boolean_t
efx_nic_hw_unavailable(
__in efx_nic_t *enp);
-extern void
-efx_nic_set_hw_unavailable(
- __in efx_nic_t *enp);
-
#if EFSYS_OPT_DIAG
LIBEFX_API
@@ -317,13 +313,6 @@ efx_nic_calculate_pcie_link_bandwidth(
__in uint32_t pcie_link_gen,
__out uint32_t *bandwidth_mbpsp);
-extern __checkReturn efx_rc_t
-efx_nic_check_pcie_link_speed(
- __in efx_nic_t *enp,
- __in uint32_t pcie_link_width,
- __in uint32_t pcie_link_gen,
- __out efx_pcie_link_performance_t *resultp);
-
typedef enum efx_port_usage_e {
EFX_PORT_USAGE_UNKNOWN = 0,
EFX_PORT_USAGE_EXCLUSIVE, /* Port only used by this PF */
@@ -377,21 +366,11 @@ efx_mcdi_init(
__in efx_nic_t *enp,
__in const efx_mcdi_transport_t *mtp);
-extern __checkReturn efx_rc_t
-efx_mcdi_reboot(
- __in efx_nic_t *enp);
-
LIBEFX_API
extern void
efx_mcdi_new_epoch(
__in efx_nic_t *enp);
-extern void
-efx_mcdi_get_timeout(
- __in efx_nic_t *enp,
- __in efx_mcdi_req_t *emrp,
- __out uint32_t *usec_timeoutp);
-
extern void
efx_mcdi_request_start(
__in efx_nic_t *enp,
@@ -471,17 +450,8 @@ extern void
efx_intr_disable(
__in efx_nic_t *enp);
-extern void
-efx_intr_disable_unlocked(
- __in efx_nic_t *enp);
-
#define EFX_INTR_NEVQS 32
-extern __checkReturn efx_rc_t
-efx_intr_trigger(
- __in efx_nic_t *enp,
- __in unsigned int level);
-
LIBEFX_API
extern void
efx_intr_status_line(
@@ -691,11 +661,6 @@ efx_mac_pdu_from_sdu(
__in efx_nic_t *enp,
__in size_t sdu);
-extern __checkReturn efx_rc_t
-efx_mac_pdu_get(
- __in efx_nic_t *enp,
- __out size_t *pdu);
-
LIBEFX_API
extern __checkReturn efx_rc_t
efx_mac_pdu_set(
@@ -749,11 +714,6 @@ efx_mac_drain(
__in efx_nic_t *enp,
__in boolean_t enabled);
-extern __checkReturn efx_rc_t
-efx_mac_up(
- __in efx_nic_t *enp,
- __out boolean_t *mac_upp);
-
#define EFX_FCNTL_RESPOND 0x00000001
#define EFX_FCNTL_GENERATE 0x00000002
@@ -869,16 +829,8 @@ typedef enum efx_mon_type_e {
#if EFSYS_OPT_NAMES
-extern const char *
-efx_mon_name(
- __in efx_nic_t *enp);
-
#endif /* EFSYS_OPT_NAMES */
-extern __checkReturn efx_rc_t
-efx_mon_init(
- __in efx_nic_t *enp);
-
#if EFSYS_OPT_MON_STATS
#define EFX_MON_STATS_PAGE_SIZE 0x100
@@ -1062,16 +1014,8 @@ efx_mon_limits_update(
#endif /* EFSYS_OPT_MON_STATS */
-extern void
-efx_mon_fini(
- __in efx_nic_t *enp);
-
/* PHY */
-extern __checkReturn efx_rc_t
-efx_phy_verify(
- __in efx_nic_t *enp);
-
typedef enum efx_phy_led_mode_e {
EFX_PHY_LED_DEFAULT = 0,
EFX_PHY_LED_OFF,
@@ -1161,11 +1105,6 @@ efx_port_loopback_set(
#if EFSYS_OPT_NAMES
-extern __checkReturn const char *
-efx_loopback_type_name(
- __in efx_nic_t *enp,
- __in efx_loopback_type_t type);
-
#endif /* EFSYS_OPT_NAMES */
#endif /* EFSYS_OPT_LOOPBACK */
@@ -1237,11 +1176,6 @@ efx_phy_adv_cap_set(
__in efx_nic_t *enp,
__in uint32_t mask);
-extern void
-efx_phy_lp_cap_get(
- __in efx_nic_t *enp,
- __out uint32_t *maskp);
-
typedef enum efx_phy_lane_count_e {
EFX_PHY_LANE_COUNT_DEFAULT = 0,
EFX_PHY_LANE_COUNT_1 = 1,
@@ -1264,11 +1198,6 @@ efx_phy_lane_count_set(
__in efx_nic_t *enp,
__in efx_phy_lane_count_t lane_count);
-extern __checkReturn efx_rc_t
-efx_phy_oui_get(
- __in efx_nic_t *enp,
- __out uint32_t *ouip);
-
typedef enum efx_phy_media_type_e {
EFX_PHY_MEDIA_INVALID = 0,
EFX_PHY_MEDIA_XAUI,
@@ -1281,17 +1210,6 @@ typedef enum efx_phy_media_type_e {
EFX_PHY_MEDIA_NTYPES
} efx_phy_media_type_t;
-/*
- * Get the type of medium currently used. If the board has ports for
- * modules, a module is present, and we recognise the media type of
- * the module, then this will be the media type of the module.
- * Otherwise it will be the media type of the port.
- */
-extern void
-efx_phy_media_type_get(
- __in efx_nic_t *enp,
- __out efx_phy_media_type_t *typep);
-
/*
* 2-wire device address of the base information in accordance with SFF-8472
* Diagnostic Monitoring Interface for Optical Transceivers section
@@ -1319,14 +1237,6 @@ efx_phy_media_type_get(
#define EFX_PHY_MEDIA_INFO_MAX_OFFSET 0x100
-extern __checkReturn efx_rc_t
-efx_phy_module_get_info(
- __in efx_nic_t *enp,
- __in uint8_t dev_addr,
- __in size_t offset,
- __in size_t len,
- __out_bcount(len) uint8_t *data);
-
#if EFSYS_OPT_PHY_STATS
/* START MKCONFIG GENERATED PhyHeaderStatsBlock 30ed56ad501f8e36 */
@@ -1845,31 +1755,11 @@ efx_nic_set_drv_limits(
__inout efx_nic_t *enp,
__in efx_drv_limits_t *edlp);
-/*
- * Register the OS driver version string for management agents
- * (e.g. via NC-SI). The content length is provided (i.e. no
- * NUL terminator). Use length 0 to indicate no version string
- * should be advertised. It is valid to set the version string
- * only before efx_nic_probe() is called.
- */
-extern __checkReturn efx_rc_t
-efx_nic_set_drv_version(
- __inout efx_nic_t *enp,
- __in_ecount(length) char const *verp,
- __in size_t length);
-
typedef enum efx_nic_region_e {
EFX_REGION_VI, /* Memory BAR UC mapping */
EFX_REGION_PIO_WRITE_VI, /* Memory BAR WC mapping */
} efx_nic_region_t;
-extern __checkReturn efx_rc_t
-efx_nic_get_bar_region(
- __in efx_nic_t *enp,
- __in efx_nic_region_t region,
- __out uint32_t *offsetp,
- __out size_t *sizep);
-
LIBEFX_API
extern __checkReturn efx_rc_t
efx_nic_get_vi_pool(
@@ -2360,19 +2250,6 @@ efx_sram_test(
#endif /* EFSYS_OPT_DIAG */
-extern __checkReturn efx_rc_t
-efx_sram_buf_tbl_set(
- __in efx_nic_t *enp,
- __in uint32_t id,
- __in efsys_mem_t *esmp,
- __in size_t n);
-
-extern void
-efx_sram_buf_tbl_clear(
- __in efx_nic_t *enp,
- __in uint32_t id,
- __in size_t n);
-
#define EFX_BUF_TBL_SIZE 0x20000
#define EFX_BUF_SIZE 4096
@@ -2476,17 +2353,6 @@ efx_evq_nbufs(
#define EFX_EVQ_FLAGS_EXTENDED_WIDTH (0x20)
-extern __checkReturn efx_rc_t
-efx_ev_qcreate(
- __in efx_nic_t *enp,
- __in unsigned int index,
- __in efsys_mem_t *esmp,
- __in size_t ndescs,
- __in uint32_t id,
- __in uint32_t us,
- __in uint32_t flags,
- __deref_out efx_evq_t **eepp);
-
LIBEFX_API
extern __checkReturn efx_rc_t
efx_ev_qcreate_irq(
@@ -2500,11 +2366,6 @@ efx_ev_qcreate_irq(
__in uint32_t irq,
__deref_out efx_evq_t **eepp);
-extern void
-efx_ev_qpost(
- __in efx_evq_t *eep,
- __in uint16_t data);
-
typedef __checkReturn boolean_t
(*efx_initialized_ev_t)(
__in_opt void *arg);
@@ -2733,11 +2594,6 @@ typedef struct efx_ev_callbacks_s {
} efx_ev_callbacks_t;
-extern __checkReturn boolean_t
-efx_ev_qpending(
- __in efx_evq_t *eep,
- __in unsigned int count);
-
#if EFSYS_OPT_EV_PREFETCH
LIBEFX_API
@@ -2769,11 +2625,6 @@ efx_ev_usecs_to_ticks(
__in unsigned int usecs,
__out unsigned int *ticksp);
-extern __checkReturn efx_rc_t
-efx_ev_qmoderate(
- __in efx_evq_t *eep,
- __in unsigned int us);
-
LIBEFX_API
extern __checkReturn efx_rc_t
efx_ev_qprime(
@@ -2981,13 +2832,6 @@ efx_rx_scale_default_support_get(
__in efx_nic_t *enp,
__out efx_rx_scale_context_type_t *typep);
-extern __checkReturn efx_rc_t
-efx_rx_scale_context_alloc(
- __in efx_nic_t *enp,
- __in efx_rx_scale_context_type_t type,
- __in uint32_t num_queues,
- __out uint32_t *rss_contextp);
-
LIBEFX_API
extern __checkReturn efx_rc_t
efx_rx_scale_context_alloc_v2(
@@ -3357,14 +3201,6 @@ efx_tx_qcreate(
__deref_out efx_txq_t **etpp,
__out unsigned int *addedp);
-extern __checkReturn efx_rc_t
-efx_tx_qpost(
- __in efx_txq_t *etp,
- __in_ecount(ndescs) efx_buffer_t *eb,
- __in unsigned int ndescs,
- __in unsigned int completed,
- __inout unsigned int *addedp);
-
extern __checkReturn efx_rc_t
efx_tx_qpace(
__in efx_txq_t *etp,
@@ -3387,28 +3223,6 @@ extern void
efx_tx_qenable(
__in efx_txq_t *etp);
-extern __checkReturn efx_rc_t
-efx_tx_qpio_enable(
- __in efx_txq_t *etp);
-
-extern void
-efx_tx_qpio_disable(
- __in efx_txq_t *etp);
-
-extern __checkReturn efx_rc_t
-efx_tx_qpio_write(
- __in efx_txq_t *etp,
- __in_ecount(buf_length) uint8_t *buffer,
- __in size_t buf_length,
- __in size_t pio_buf_offset);
-
-extern __checkReturn efx_rc_t
-efx_tx_qpio_post(
- __in efx_txq_t *etp,
- __in size_t pkt_length,
- __in unsigned int completed,
- __inout unsigned int *addedp);
-
LIBEFX_API
extern __checkReturn efx_rc_t
efx_tx_qdesc_post(
@@ -3427,14 +3241,6 @@ efx_tx_qdesc_dma_create(
__in boolean_t eop,
__out efx_desc_t *edp);
-extern void
-efx_tx_qdesc_tso_create(
- __in efx_txq_t *etp,
- __in uint16_t ipv4_id,
- __in uint32_t tcp_seq,
- __in uint8_t tcp_flags,
- __out efx_desc_t *edp);
-
/* Number of FATSOv2 option descriptors */
#define EFX_TX_FATSOV2_OPT_NDESCS 2
@@ -3459,12 +3265,6 @@ efx_tx_qdesc_vlantci_create(
__in uint16_t tci,
__out efx_desc_t *edp);
-extern void
-efx_tx_qdesc_checksum_create(
- __in efx_txq_t *etp,
- __in uint16_t flags,
- __out efx_desc_t *edp);
-
#if EFSYS_OPT_QSTATS
#if EFSYS_OPT_NAMES
@@ -3642,10 +3442,6 @@ efx_filter_remove(
__in efx_nic_t *enp,
__inout efx_filter_spec_t *spec);
-extern __checkReturn efx_rc_t
-efx_filter_restore(
- __in efx_nic_t *enp);
-
LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_supported_filters(
@@ -3661,27 +3457,6 @@ efx_filter_spec_init_rx(
__in efx_filter_flags_t flags,
__in efx_rxq_t *erp);
-extern void
-efx_filter_spec_init_tx(
- __out efx_filter_spec_t *spec,
- __in efx_txq_t *etp);
-
-extern __checkReturn efx_rc_t
-efx_filter_spec_set_ipv4_local(
- __inout efx_filter_spec_t *spec,
- __in uint8_t proto,
- __in uint32_t host,
- __in uint16_t port);
-
-extern __checkReturn efx_rc_t
-efx_filter_spec_set_ipv4_full(
- __inout efx_filter_spec_t *spec,
- __in uint8_t proto,
- __in uint32_t lhost,
- __in uint16_t lport,
- __in uint32_t rhost,
- __in uint16_t rport);
-
LIBEFX_API
extern __checkReturn efx_rc_t
efx_filter_spec_set_eth_local(
@@ -3715,32 +3490,7 @@ efx_filter_spec_set_encap_type(
__in efx_tunnel_protocol_t encap_type,
__in efx_filter_inner_frame_match_t inner_frame_match);
-extern __checkReturn efx_rc_t
-efx_filter_spec_set_vxlan(
- __inout efx_filter_spec_t *spec,
- __in const uint8_t *vni,
- __in const uint8_t *inner_addr,
- __in const uint8_t *outer_addr);
-
-extern __checkReturn efx_rc_t
-efx_filter_spec_set_geneve(
- __inout efx_filter_spec_t *spec,
- __in const uint8_t *vni,
- __in const uint8_t *inner_addr,
- __in const uint8_t *outer_addr);
-
-extern __checkReturn efx_rc_t
-efx_filter_spec_set_nvgre(
- __inout efx_filter_spec_t *spec,
- __in const uint8_t *vsid,
- __in const uint8_t *inner_addr,
- __in const uint8_t *outer_addr);
-
#if EFSYS_OPT_RX_SCALE
-extern __checkReturn efx_rc_t
-efx_filter_spec_set_rss_context(
- __inout efx_filter_spec_t *spec,
- __in uint32_t rss_context);
#endif
#endif /* EFSYS_OPT_FILTER */
@@ -3752,12 +3502,6 @@ efx_hash_dwords(
__in size_t count,
__in uint32_t init);
-extern __checkReturn uint32_t
-efx_hash_bytes(
- __in_ecount(length) uint8_t const *input,
- __in size_t length,
- __in uint32_t init);
-
#if EFSYS_OPT_LICENSING
/* LICENSING */
@@ -4119,36 +3863,6 @@ efx_evb_vswitch_destroy(
__in efx_nic_t *enp,
__in efx_vswitch_t *evp);
-extern __checkReturn efx_rc_t
-efx_evb_vport_mac_set(
- __in efx_nic_t *enp,
- __in efx_vswitch_t *evp,
- __in efx_vport_id_t vport_id,
- __in_bcount(EFX_MAC_ADDR_LEN) uint8_t *addrp);
-
-extern __checkReturn efx_rc_t
-efx_evb_vport_vlan_set(
- __in efx_nic_t *enp,
- __in efx_vswitch_t *evp,
- __in efx_vport_id_t vport_id,
- __in uint16_t vid);
-
-extern __checkReturn efx_rc_t
-efx_evb_vport_reset(
- __in efx_nic_t *enp,
- __in efx_vswitch_t *evp,
- __in efx_vport_id_t vport_id,
- __in_bcount(EFX_MAC_ADDR_LEN) uint8_t *addrp,
- __in uint16_t vid,
- __out boolean_t *is_fn_resetp);
-
-extern __checkReturn efx_rc_t
-efx_evb_vport_stats(
- __in efx_nic_t *enp,
- __in efx_vswitch_t *evp,
- __in efx_vport_id_t vport_id,
- __out efsys_mem_t *stats_bufferp);
-
#endif /* EFSYS_OPT_EVB */
#if EFSYS_OPT_MCDI_PROXY_AUTH_SERVER
@@ -4872,10 +4586,6 @@ typedef struct efx_counter_s {
uint32_t id;
} efx_counter_t;
-extern __checkReturn unsigned int
-efx_mae_action_set_get_nb_count(
- __in const efx_mae_actions_t *spec);
-
/* See description before efx_mae_action_set_populate_count(). */
LIBEFX_API
extern __checkReturn efx_rc_t
@@ -4909,31 +4619,6 @@ efx_mae_action_set_alloc(
__in const efx_mae_actions_t *spec,
__out efx_mae_aset_id_t *aset_idp);
-/*
- * Allocates MAE counter(s) of type EFX_COUNTER_TYPE_ACTION.
- *
- * Generation count has two purposes:
- *
- * 1) Distinguish between counter packets that belong to freed counter
- * and the packets that belong to reallocated counter (with the same ID);
- * 2) Make sure that all packets are received for a counter that was freed;
- *
- * API users should provide generation count out parameter in allocation
- * function if counters can be reallocated and consistent counter values are
- * required.
- *
- * API users that need consistent final counter values after counter
- * deallocation or counter stream stop should provide the parameter in
- * functions that free the counters and stop the counter stream.
- */
-extern __checkReturn efx_rc_t
-efx_mae_counters_alloc(
- __in efx_nic_t *enp,
- __in uint32_t n_counters,
- __out uint32_t *n_allocatedp,
- __out_ecount(n_counters) efx_counter_t *countersp,
- __out_opt uint32_t *gen_countp);
-
/*
* Allocates MAE counter(s) of the specified type. Other
* than that, behaves like efx_mae_counters_alloc().
@@ -5197,12 +4882,6 @@ efx_virtio_get_features(
__in efx_virtio_device_type_t type,
__out uint64_t *featuresp);
-extern __checkReturn efx_rc_t
-efx_virtio_verify_features(
- __in efx_nic_t *enp,
- __in efx_virtio_device_type_t type,
- __in uint64_t features);
-
#endif /* EFSYS_OPT_VIRTIO */
LIBEFX_API
diff --git a/drivers/common/sfc_efx/base/efx_ev.c b/drivers/common/sfc_efx/base/efx_ev.c
index 13159a10f4..6c0126c43b 100644
--- a/drivers/common/sfc_efx/base/efx_ev.c
+++ b/drivers/common/sfc_efx/base/efx_ev.c
@@ -385,23 +385,6 @@ efx_ev_qcreate_irq(
return (rc);
}
- __checkReturn efx_rc_t
-efx_ev_qcreate(
- __in efx_nic_t *enp,
- __in unsigned int index,
- __in efsys_mem_t *esmp,
- __in size_t ndescs,
- __in uint32_t id,
- __in uint32_t us,
- __in uint32_t flags,
- __deref_out efx_evq_t **eepp)
-{
- uint32_t irq = index;
-
- return (efx_ev_qcreate_irq(enp, index, esmp, ndescs, id, us, flags,
- irq, eepp));
-}
-
void
efx_ev_qdestroy(
__in efx_evq_t *eep)
@@ -448,22 +431,6 @@ efx_ev_qprime(
return (rc);
}
- __checkReturn boolean_t
-efx_ev_qpending(
- __in efx_evq_t *eep,
- __in unsigned int count)
-{
- size_t offset;
- efx_qword_t qword;
-
- EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);
-
- offset = (count & eep->ee_mask) * sizeof (efx_qword_t);
- EFSYS_MEM_READQ(eep->ee_esmp, offset, &qword);
-
- return (EFX_EV_PRESENT(qword));
-}
-
#if EFSYS_OPT_EV_PREFETCH
void
@@ -529,22 +496,6 @@ efx_ev_qpoll(
eevop->eevo_qpoll(eep, countp, eecp, arg);
}
- void
-efx_ev_qpost(
- __in efx_evq_t *eep,
- __in uint16_t data)
-{
- efx_nic_t *enp = eep->ee_enp;
- const efx_ev_ops_t *eevop = enp->en_eevop;
-
- EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);
-
- EFSYS_ASSERT(eevop != NULL &&
- eevop->eevo_qpost != NULL);
-
- eevop->eevo_qpost(eep, data);
-}
-
__checkReturn efx_rc_t
efx_ev_usecs_to_ticks(
__in efx_nic_t *enp,
@@ -576,35 +527,6 @@ efx_ev_usecs_to_ticks(
return (rc);
}
- __checkReturn efx_rc_t
-efx_ev_qmoderate(
- __in efx_evq_t *eep,
- __in unsigned int us)
-{
- efx_nic_t *enp = eep->ee_enp;
- const efx_ev_ops_t *eevop = enp->en_eevop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(eep->ee_magic, ==, EFX_EVQ_MAGIC);
-
- if ((eep->ee_flags & EFX_EVQ_FLAGS_NOTIFY_MASK) ==
- EFX_EVQ_FLAGS_NOTIFY_DISABLED) {
- rc = EINVAL;
- goto fail1;
- }
-
- if ((rc = eevop->eevo_qmoderate(eep, us)) != 0)
- goto fail2;
-
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
#if EFSYS_OPT_QSTATS
void
efx_ev_qstats_update(
diff --git a/drivers/common/sfc_efx/base/efx_evb.c b/drivers/common/sfc_efx/base/efx_evb.c
index 79db77c635..b684926442 100644
--- a/drivers/common/sfc_efx/base/efx_evb.c
+++ b/drivers/common/sfc_efx/base/efx_evb.c
@@ -382,114 +382,6 @@ efx_evb_vswitch_create(
return (rc);
}
- __checkReturn efx_rc_t
-efx_evb_vport_mac_set(
- __in efx_nic_t *enp,
- __in efx_vswitch_t *evp,
- __in efx_vport_id_t vport_id,
- __in_bcount(EFX_MAC_ADDR_LEN) uint8_t *addrp)
-{
- const efx_evb_ops_t *eeop = enp->en_eeop;
- efx_rc_t rc;
-
- EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_EVB);
-
- if (eeop->eeo_vport_reconfigure == NULL) {
- rc = ENOTSUP;
- goto fail1;
- }
-
- if (addrp == NULL) {
- rc = EINVAL;
- goto fail2;
- }
-
- rc = eeop->eeo_vport_reconfigure(enp, evp->ev_vswitch_id, vport_id,
- NULL, addrp, NULL);
- if (rc != 0)
- goto fail3;
-
- return (0);
-
-fail3:
- EFSYS_PROBE(fail3);
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_evb_vport_vlan_set(
- __in efx_nic_t *enp,
- __in efx_vswitch_t *evp,
- __in efx_vport_id_t vport_id,
- __in uint16_t vid)
-{
- const efx_evb_ops_t *eeop = enp->en_eeop;
- efx_rc_t rc;
-
- EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_EVB);
-
- if (eeop->eeo_vport_reconfigure == NULL) {
- rc = ENOTSUP;
- goto fail1;
- }
-
- rc = eeop->eeo_vport_reconfigure(enp, evp->ev_vswitch_id, vport_id,
- &vid, NULL, NULL);
- if (rc != 0)
- goto fail2;
-
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_evb_vport_reset(
- __in efx_nic_t *enp,
- __in efx_vswitch_t *evp,
- __in efx_vport_id_t vport_id,
- __in_bcount(EFX_MAC_ADDR_LEN) uint8_t *addrp,
- __in uint16_t vid,
- __out boolean_t *is_fn_resetp)
-{
- const efx_evb_ops_t *eeop = enp->en_eeop;
- efx_rc_t rc;
-
- EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_EVB);
-
- if (eeop->eeo_vport_reconfigure == NULL) {
- rc = ENOTSUP;
- goto fail1;
- }
-
- if (is_fn_resetp == NULL) {
- rc = EINVAL;
- goto fail2;
- }
-
- rc = eeop->eeo_vport_reconfigure(enp, evp->ev_vswitch_id, vport_id,
- &vid, addrp, is_fn_resetp);
- if (rc != 0)
- goto fail3;
-
- return (0);
-
-fail3:
- EFSYS_PROBE(fail3);
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
__checkReturn efx_rc_t
efx_evb_vswitch_destroy(
__in efx_nic_t *enp,
@@ -533,42 +425,4 @@ efx_evb_vswitch_destroy(
return (rc);
}
- __checkReturn efx_rc_t
-efx_evb_vport_stats(
- __in efx_nic_t *enp,
- __in efx_vswitch_t *evp,
- __in efx_vport_id_t vport_id,
- __out efsys_mem_t *stats_bufferp)
-{
- efx_rc_t rc;
- const efx_evb_ops_t *eeop = enp->en_eeop;
-
- EFSYS_ASSERT(enp->en_mod_flags & EFX_MOD_EVB);
-
- if (eeop->eeo_vport_stats == NULL) {
- rc = ENOTSUP;
- goto fail1;
- }
-
- if (stats_bufferp == NULL) {
- rc = EINVAL;
- goto fail2;
- }
-
- rc = eeop->eeo_vport_stats(enp, evp->ev_vswitch_id,
- vport_id, stats_bufferp);
- if (rc != 0)
- goto fail3;
-
- return (0);
-
-fail3:
- EFSYS_PROBE(fail3);
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
#endif
diff --git a/drivers/common/sfc_efx/base/efx_filter.c b/drivers/common/sfc_efx/base/efx_filter.c
index 551db58fdd..8dc9db7ee8 100644
--- a/drivers/common/sfc_efx/base/efx_filter.c
+++ b/drivers/common/sfc_efx/base/efx_filter.c
@@ -140,25 +140,6 @@ efx_filter_remove(
return (efop->efo_delete(enp, spec));
}
- __checkReturn efx_rc_t
-efx_filter_restore(
- __in efx_nic_t *enp)
-{
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_FILTER);
-
- if ((rc = enp->en_efop->efo_restore(enp)) != 0)
- goto fail1;
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
__checkReturn efx_rc_t
efx_filter_init(
__in efx_nic_t *enp)
@@ -369,70 +350,13 @@ efx_filter_spec_init_rx(
spec->efs_dmaq_id = (uint16_t)erp->er_index;
}
- void
-efx_filter_spec_init_tx(
- __out efx_filter_spec_t *spec,
- __in efx_txq_t *etp)
-{
- EFSYS_ASSERT3P(spec, !=, NULL);
- EFSYS_ASSERT3P(etp, !=, NULL);
-
- memset(spec, 0, sizeof (*spec));
- spec->efs_priority = EFX_FILTER_PRI_MANUAL;
- spec->efs_flags = EFX_FILTER_FLAG_TX;
- spec->efs_dmaq_id = (uint16_t)etp->et_index;
-}
-
/*
* Specify IPv4 host, transport protocol and port in a filter specification
*/
-__checkReturn efx_rc_t
-efx_filter_spec_set_ipv4_local(
- __inout efx_filter_spec_t *spec,
- __in uint8_t proto,
- __in uint32_t host,
- __in uint16_t port)
-{
- EFSYS_ASSERT3P(spec, !=, NULL);
-
- spec->efs_match_flags |=
- EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO |
- EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT;
- spec->efs_ether_type = EFX_ETHER_TYPE_IPV4;
- spec->efs_ip_proto = proto;
- spec->efs_loc_host.eo_u32[0] = host;
- spec->efs_loc_port = port;
- return (0);
-}
-
/*
* Specify IPv4 hosts, transport protocol and ports in a filter specification
*/
-__checkReturn efx_rc_t
-efx_filter_spec_set_ipv4_full(
- __inout efx_filter_spec_t *spec,
- __in uint8_t proto,
- __in uint32_t lhost,
- __in uint16_t lport,
- __in uint32_t rhost,
- __in uint16_t rport)
-{
- EFSYS_ASSERT3P(spec, !=, NULL);
-
- spec->efs_match_flags |=
- EFX_FILTER_MATCH_ETHER_TYPE | EFX_FILTER_MATCH_IP_PROTO |
- EFX_FILTER_MATCH_LOC_HOST | EFX_FILTER_MATCH_LOC_PORT |
- EFX_FILTER_MATCH_REM_HOST | EFX_FILTER_MATCH_REM_PORT;
- spec->efs_ether_type = EFX_ETHER_TYPE_IPV4;
- spec->efs_ip_proto = proto;
- spec->efs_loc_host.eo_u32[0] = lhost;
- spec->efs_loc_port = lport;
- spec->efs_rem_host.eo_u32[0] = rhost;
- spec->efs_rem_port = rport;
- return (0);
-}
-
/*
* Specify local Ethernet address and/or VID in filter specification
*/
@@ -557,132 +481,19 @@ efx_filter_spec_set_encap_type(
* Specify inner and outer Ethernet address and VNI or VSID in tunnel filter
* specification.
*/
-static __checkReturn efx_rc_t
-efx_filter_spec_set_tunnel(
- __inout efx_filter_spec_t *spec,
- __in efx_tunnel_protocol_t encap_type,
- __in const uint8_t *vni_or_vsid,
- __in const uint8_t *inner_addr,
- __in const uint8_t *outer_addr)
-{
- efx_rc_t rc;
-
- EFSYS_ASSERT3P(spec, !=, NULL);
- EFSYS_ASSERT3P(vni_or_vsid, !=, NULL);
- EFSYS_ASSERT3P(inner_addr, !=, NULL);
- EFSYS_ASSERT3P(outer_addr, !=, NULL);
-
- switch (encap_type) {
- case EFX_TUNNEL_PROTOCOL_VXLAN:
- case EFX_TUNNEL_PROTOCOL_GENEVE:
- case EFX_TUNNEL_PROTOCOL_NVGRE:
- break;
- default:
- rc = EINVAL;
- goto fail1;
- }
-
- if ((inner_addr == NULL) && (outer_addr == NULL)) {
- rc = EINVAL;
- goto fail2;
- }
-
- if (vni_or_vsid != NULL) {
- spec->efs_match_flags |= EFX_FILTER_MATCH_VNI_OR_VSID;
- memcpy(spec->efs_vni_or_vsid, vni_or_vsid, EFX_VNI_OR_VSID_LEN);
- }
- if (outer_addr != NULL) {
- spec->efs_match_flags |= EFX_FILTER_MATCH_LOC_MAC;
- memcpy(spec->efs_loc_mac, outer_addr, EFX_MAC_ADDR_LEN);
- }
- if (inner_addr != NULL) {
- spec->efs_match_flags |= EFX_FILTER_MATCH_IFRM_LOC_MAC;
- memcpy(spec->efs_ifrm_loc_mac, inner_addr, EFX_MAC_ADDR_LEN);
- }
-
- spec->efs_match_flags |= EFX_FILTER_MATCH_ENCAP_TYPE;
- spec->efs_encap_type = encap_type;
-
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
/*
* Specify inner and outer Ethernet address and VNI in VXLAN filter
* specification.
*/
-__checkReturn efx_rc_t
-efx_filter_spec_set_vxlan(
- __inout efx_filter_spec_t *spec,
- __in const uint8_t *vni,
- __in const uint8_t *inner_addr,
- __in const uint8_t *outer_addr)
-{
- return efx_filter_spec_set_tunnel(spec, EFX_TUNNEL_PROTOCOL_VXLAN,
- vni, inner_addr, outer_addr);
-}
-
/*
* Specify inner and outer Ethernet address and VNI in Geneve filter
* specification.
*/
-__checkReturn efx_rc_t
-efx_filter_spec_set_geneve(
- __inout efx_filter_spec_t *spec,
- __in const uint8_t *vni,
- __in const uint8_t *inner_addr,
- __in const uint8_t *outer_addr)
-{
- return efx_filter_spec_set_tunnel(spec, EFX_TUNNEL_PROTOCOL_GENEVE,
- vni, inner_addr, outer_addr);
-}
-
/*
* Specify inner and outer Ethernet address and vsid in NVGRE filter
* specification.
*/
-__checkReturn efx_rc_t
-efx_filter_spec_set_nvgre(
- __inout efx_filter_spec_t *spec,
- __in const uint8_t *vsid,
- __in const uint8_t *inner_addr,
- __in const uint8_t *outer_addr)
-{
- return efx_filter_spec_set_tunnel(spec, EFX_TUNNEL_PROTOCOL_NVGRE,
- vsid, inner_addr, outer_addr);
-}
-
#if EFSYS_OPT_RX_SCALE
- __checkReturn efx_rc_t
-efx_filter_spec_set_rss_context(
- __inout efx_filter_spec_t *spec,
- __in uint32_t rss_context)
-{
- efx_rc_t rc;
-
- EFSYS_ASSERT3P(spec, !=, NULL);
-
- /* The filter must have been created with EFX_FILTER_FLAG_RX_RSS. */
- if ((spec->efs_flags & EFX_FILTER_FLAG_RX_RSS) == 0) {
- rc = EINVAL;
- goto fail1;
- }
-
- spec->efs_rss_context = rss_context;
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
#endif
#if EFSYS_OPT_SIENA
diff --git a/drivers/common/sfc_efx/base/efx_hash.c b/drivers/common/sfc_efx/base/efx_hash.c
index 25579687e3..f23bb987c4 100644
--- a/drivers/common/sfc_efx/base/efx_hash.c
+++ b/drivers/common/sfc_efx/base/efx_hash.c
@@ -134,169 +134,9 @@ efx_hash_dwords(
#if EFSYS_IS_BIG_ENDIAN
/* Produce a 32-bit hash from arbitrarily aligned input */
- __checkReturn uint32_t
-efx_hash_bytes(
- __in_ecount(length) uint8_t const *input,
- __in size_t length,
- __in uint32_t init)
-{
- uint32_t a;
- uint32_t b;
- uint32_t c;
-
- /* Set up the initial internal state */
- a = b = c = EFX_HASH_INITIAL_VALUE + (uint32_t)length + init;
-
- /* Handle all but the last twelve bytes of the input */
- while (length > 12) {
- a += ((uint32_t)input[0]) << 24;
- a += ((uint32_t)input[1]) << 16;
- a += ((uint32_t)input[2]) << 8;
- a += ((uint32_t)input[3]);
- b += ((uint32_t)input[4]) << 24;
- b += ((uint32_t)input[5]) << 16;
- b += ((uint32_t)input[6]) << 8;
- b += ((uint32_t)input[7]);
- c += ((uint32_t)input[8]) << 24;
- c += ((uint32_t)input[9]) << 16;
- c += ((uint32_t)input[10]) << 8;
- c += ((uint32_t)input[11]);
- EFX_HASH_MIX(a, b, c);
- length -= 12;
- input += 12;
- }
-
- /* Handle the left-overs */
- switch (length) {
- case 12:
- c += ((uint32_t)input[11]);
- /* Fall-through */
- case 11:
- c += ((uint32_t)input[10]) << 8;
- /* Fall-through */
- case 10:
- c += ((uint32_t)input[9]) << 16;
- /* Fall-through */
- case 9:
- c += ((uint32_t)input[8]) << 24;
- /* Fall-through */
- case 8:
- b += ((uint32_t)input[7]);
- /* Fall-through */
- case 7:
- b += ((uint32_t)input[6]) << 8;
- /* Fall-through */
- case 6:
- b += ((uint32_t)input[5]) << 16;
- /* Fall-through */
- case 5:
- b += ((uint32_t)input[4]) << 24;
- /* Fall-through */
- case 4:
- a += ((uint32_t)input[3]);
- /* Fall-through */
- case 3:
- a += ((uint32_t)input[2]) << 8;
- /* Fall-through */
- case 2:
- a += ((uint32_t)input[1]) << 16;
- /* Fall-through */
- case 1:
- a += ((uint32_t)input[0]) << 24;
- EFX_HASH_FINALISE(a, b, c);
- break;
-
- case 0:
- /* Should only get here if length parameter was zero */
- break;
- }
-
- return (c);
-}
-
#elif EFSYS_IS_LITTLE_ENDIAN
/* Produce a 32-bit hash from arbitrarily aligned input */
- __checkReturn uint32_t
-efx_hash_bytes(
- __in_ecount(length) uint8_t const *input,
- __in size_t length,
- __in uint32_t init)
-{
- uint32_t a;
- uint32_t b;
- uint32_t c;
-
- /* Set up the initial internal state */
- a = b = c = EFX_HASH_INITIAL_VALUE + (uint32_t)length + init;
-
- /* Handle all but the last twelve bytes of the input */
- while (length > 12) {
- a += ((uint32_t)input[0]);
- a += ((uint32_t)input[1]) << 8;
- a += ((uint32_t)input[2]) << 16;
- a += ((uint32_t)input[3]) << 24;
- b += ((uint32_t)input[4]);
- b += ((uint32_t)input[5]) << 8;
- b += ((uint32_t)input[6]) << 16;
- b += ((uint32_t)input[7]) << 24;
- c += ((uint32_t)input[8]);
- c += ((uint32_t)input[9]) << 8;
- c += ((uint32_t)input[10]) << 16;
- c += ((uint32_t)input[11]) << 24;
- EFX_HASH_MIX(a, b, c);
- length -= 12;
- input += 12;
- }
-
- /* Handle the left-overs */
- switch (length) {
- case 12:
- c += ((uint32_t)input[11]) << 24;
- /* Fall-through */
- case 11:
- c += ((uint32_t)input[10]) << 16;
- /* Fall-through */
- case 10:
- c += ((uint32_t)input[9]) << 8;
- /* Fall-through */
- case 9:
- c += ((uint32_t)input[8]);
- /* Fall-through */
- case 8:
- b += ((uint32_t)input[7]) << 24;
- /* Fall-through */
- case 7:
- b += ((uint32_t)input[6]) << 16;
- /* Fall-through */
- case 6:
- b += ((uint32_t)input[5]) << 8;
- /* Fall-through */
- case 5:
- b += ((uint32_t)input[4]);
- /* Fall-through */
- case 4:
- a += ((uint32_t)input[3]) << 24;
- /* Fall-through */
- case 3:
- a += ((uint32_t)input[2]) << 16;
- /* Fall-through */
- case 2:
- a += ((uint32_t)input[1]) << 8;
- /* Fall-through */
- case 1:
- a += ((uint32_t)input[0]);
- EFX_HASH_FINALISE(a, b, c);
- break;
-
- case 0:
- /* Should only get here if length parameter was zero */
- break;
- }
-
- return (c);
-}
-
#else
#error "Neither of EFSYS_IS_{BIG,LITTLE}_ENDIAN is set"
diff --git a/drivers/common/sfc_efx/base/efx_intr.c b/drivers/common/sfc_efx/base/efx_intr.c
index 8fdef839db..14e4b76fd6 100644
--- a/drivers/common/sfc_efx/base/efx_intr.c
+++ b/drivers/common/sfc_efx/base/efx_intr.c
@@ -229,33 +229,6 @@ efx_intr_disable(
eiop->eio_disable(enp);
}
- void
-efx_intr_disable_unlocked(
- __in efx_nic_t *enp)
-{
- efx_intr_t *eip = &(enp->en_intr);
- const efx_intr_ops_t *eiop = eip->ei_eiop;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
-
- eiop->eio_disable_unlocked(enp);
-}
-
-
- __checkReturn efx_rc_t
-efx_intr_trigger(
- __in efx_nic_t *enp,
- __in unsigned int level)
-{
- efx_intr_t *eip = &(enp->en_intr);
- const efx_intr_ops_t *eiop = eip->ei_eiop;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_INTR);
-
- return (eiop->eio_trigger(enp, level));
-}
void
efx_intr_status_line(
diff --git a/drivers/common/sfc_efx/base/efx_mac.c b/drivers/common/sfc_efx/base/efx_mac.c
index 9dc1eb23b9..4f9b12965f 100644
--- a/drivers/common/sfc_efx/base/efx_mac.c
+++ b/drivers/common/sfc_efx/base/efx_mac.c
@@ -170,26 +170,6 @@ efx_mac_pdu_set(
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_mac_pdu_get(
- __in efx_nic_t *enp,
- __out size_t *pdu)
-{
- efx_port_t *epp = &(enp->en_port);
- const efx_mac_ops_t *emop = epp->ep_emop;
- efx_rc_t rc;
-
- if ((rc = emop->emo_pdu_get(enp, pdu)) != 0)
- goto fail1;
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
return (rc);
}
@@ -326,29 +306,6 @@ efx_mac_drain(
return (0);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_mac_up(
- __in efx_nic_t *enp,
- __out boolean_t *mac_upp)
-{
- efx_port_t *epp = &(enp->en_port);
- const efx_mac_ops_t *emop = epp->ep_emop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
-
- if ((rc = emop->emo_up(enp, mac_upp)) != 0)
- goto fail1;
-
- return (0);
-
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
diff --git a/drivers/common/sfc_efx/base/efx_mae.c b/drivers/common/sfc_efx/base/efx_mae.c
index 4533e5cae6..a9a7c70dc2 100644
--- a/drivers/common/sfc_efx/base/efx_mae.c
+++ b/drivers/common/sfc_efx/base/efx_mae.c
@@ -3285,13 +3285,6 @@ efx_mae_action_set_alloc(
return (rc);
}
- __checkReturn unsigned int
-efx_mae_action_set_get_nb_count(
- __in const efx_mae_actions_t *spec)
-{
- return (spec->ema_n_count_actions);
-}
-
__checkReturn efx_rc_t
efx_mae_action_set_fill_in_counter_id(
__in efx_mae_actions_t *spec,
@@ -3452,29 +3445,6 @@ efx_mae_counters_alloc_type(
return (rc);
}
- __checkReturn efx_rc_t
-efx_mae_counters_alloc(
- __in efx_nic_t *enp,
- __in uint32_t n_counters,
- __out uint32_t *n_allocatedp,
- __out_ecount(n_counters) efx_counter_t *countersp,
- __out_opt uint32_t *gen_countp)
-{
- efx_rc_t rc;
-
- rc = efx_mae_counters_alloc_type(enp, EFX_COUNTER_TYPE_ACTION,
- n_counters, n_allocatedp,
- countersp, gen_countp);
- if (rc != 0)
- goto fail1;
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
__checkReturn efx_rc_t
efx_mae_counters_free_type(
__in efx_nic_t *enp,
diff --git a/drivers/common/sfc_efx/base/efx_mcdi.c b/drivers/common/sfc_efx/base/efx_mcdi.c
index 32eb228162..dd1ffa4eee 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.c
+++ b/drivers/common/sfc_efx/base/efx_mcdi.c
@@ -835,17 +835,6 @@ efx_mcdi_client_mac_addr_set(
return (rc);
}
- void
-efx_mcdi_get_timeout(
- __in efx_nic_t *enp,
- __in efx_mcdi_req_t *emrp,
- __out uint32_t *timeoutp)
-{
- const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
-
- emcop->emco_get_timeout(enp, emrp, timeoutp);
-}
-
__checkReturn efx_rc_t
efx_mcdi_request_errcode(
__in unsigned int err)
@@ -1482,13 +1471,6 @@ efx_mcdi_do_reboot(
return (rc);
}
- __checkReturn efx_rc_t
-efx_mcdi_reboot(
- __in efx_nic_t *enp)
-{
- return (efx_mcdi_do_reboot(enp, B_FALSE));
-}
-
__checkReturn efx_rc_t
efx_mcdi_exit_assertion_handler(
__in efx_nic_t *enp)
@@ -1902,56 +1884,6 @@ efx_mcdi_get_phy_cfg(
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_mcdi_firmware_update_supported(
- __in efx_nic_t *enp,
- __out boolean_t *supportedp)
-{
- const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
- efx_rc_t rc;
-
- if (emcop != NULL) {
- if ((rc = emcop->emco_feature_supported(enp,
- EFX_MCDI_FEATURE_FW_UPDATE, supportedp)) != 0)
- goto fail1;
- } else {
- /* Earlier devices always supported updates */
- *supportedp = B_TRUE;
- }
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_mcdi_macaddr_change_supported(
- __in efx_nic_t *enp,
- __out boolean_t *supportedp)
-{
- const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
- efx_rc_t rc;
-
- if (emcop != NULL) {
- if ((rc = emcop->emco_feature_supported(enp,
- EFX_MCDI_FEATURE_MACADDR_CHANGE, supportedp)) != 0)
- goto fail1;
- } else {
- /* Earlier devices always supported MAC changes */
- *supportedp = B_TRUE;
- }
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
return (rc);
}
@@ -1974,31 +1906,6 @@ efx_mcdi_link_control_supported(
return (0);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_mcdi_mac_spoofing_supported(
- __in efx_nic_t *enp,
- __out boolean_t *supportedp)
-{
- const efx_mcdi_ops_t *emcop = enp->en_mcdi.em_emcop;
- efx_rc_t rc;
-
- if (emcop != NULL) {
- if ((rc = emcop->emco_feature_supported(enp,
- EFX_MCDI_FEATURE_MAC_SPOOFING, supportedp)) != 0)
- goto fail1;
- } else {
- /* Earlier devices always supported MAC spoofing */
- *supportedp = B_TRUE;
- }
-
- return (0);
-
fail1:
EFSYS_PROBE1(fail1, efx_rc_t, rc);
@@ -2612,220 +2519,6 @@ efx_mcdi_get_workarounds(
#define EFX_SFF_TRANSCEIVER_ID_QSFP_PLUS 0x0d /* QSFP+ or later */
#define EFX_SFF_TRANSCEIVER_ID_QSFP28 0x11 /* QSFP28 or later */
-static __checkReturn efx_rc_t
-efx_mcdi_get_phy_media_info(
- __in efx_nic_t *enp,
- __in uint32_t mcdi_page,
- __in uint8_t offset,
- __in uint8_t len,
- __out_bcount(len) uint8_t *data)
-{
- efx_mcdi_req_t req;
- EFX_MCDI_DECLARE_BUF(payload, MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN,
- MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(
- EFX_PHY_MEDIA_INFO_PAGE_SIZE));
- efx_rc_t rc;
-
- EFSYS_ASSERT((uint32_t)offset + len <= EFX_PHY_MEDIA_INFO_PAGE_SIZE);
-
- req.emr_cmd = MC_CMD_GET_PHY_MEDIA_INFO;
- req.emr_in_buf = payload;
- req.emr_in_length = MC_CMD_GET_PHY_MEDIA_INFO_IN_LEN;
- req.emr_out_buf = payload;
- req.emr_out_length =
- MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(EFX_PHY_MEDIA_INFO_PAGE_SIZE);
-
- MCDI_IN_SET_DWORD(req, GET_PHY_MEDIA_INFO_IN_PAGE, mcdi_page);
-
- efx_mcdi_execute(enp, &req);
-
- if (req.emr_rc != 0) {
- rc = req.emr_rc;
- goto fail1;
- }
-
- if (req.emr_out_length_used !=
- MC_CMD_GET_PHY_MEDIA_INFO_OUT_LEN(EFX_PHY_MEDIA_INFO_PAGE_SIZE)) {
- rc = EMSGSIZE;
- goto fail2;
- }
-
- if (MCDI_OUT_DWORD(req, GET_PHY_MEDIA_INFO_OUT_DATALEN) !=
- EFX_PHY_MEDIA_INFO_PAGE_SIZE) {
- rc = EIO;
- goto fail3;
- }
-
- memcpy(data,
- MCDI_OUT2(req, uint8_t, GET_PHY_MEDIA_INFO_OUT_DATA) + offset,
- len);
-
- return (0);
-
-fail3:
- EFSYS_PROBE(fail3);
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_mcdi_phy_module_get_info(
- __in efx_nic_t *enp,
- __in uint8_t dev_addr,
- __in size_t offset,
- __in size_t len,
- __out_bcount(len) uint8_t *data)
-{
- efx_port_t *epp = &(enp->en_port);
- efx_rc_t rc;
- uint32_t mcdi_lower_page;
- uint32_t mcdi_upper_page;
- uint8_t id;
-
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
-
- /*
- * Map device address to MC_CMD_GET_PHY_MEDIA_INFO pages.
- * Offset plus length interface allows accessing page 0 only.
- * I.e. non-zero upper pages are not accessible.
- * See SFF-8472 section 4 Memory Organization and SFF-8436 section 7.6
- * QSFP+ Memory Map for details on how information is structured
- * and accessible.
- */
- switch (epp->ep_fixed_port_type) {
- case EFX_PHY_MEDIA_SFP_PLUS:
- case EFX_PHY_MEDIA_QSFP_PLUS:
- /* Port type supports modules */
- break;
- default:
- rc = ENOTSUP;
- goto fail1;
- }
-
- /*
- * For all supported port types, MCDI page 0 offset 0 holds the
- * transceiver identifier. Probe to determine the data layout.
- * Definitions from SFF-8024 Table 4-1.
- */
- rc = efx_mcdi_get_phy_media_info(enp,
- 0, 0, sizeof(id), &id);
- if (rc != 0)
- goto fail2;
-
- switch (id) {
- case EFX_SFF_TRANSCEIVER_ID_SFP:
- /*
- * In accordance with SFF-8472 Diagnostic Monitoring
- * Interface for Optical Transceivers section 4 Memory
- * Organization two 2-wire addresses are defined.
- */
- switch (dev_addr) {
- /* Base information */
- case EFX_PHY_MEDIA_INFO_DEV_ADDR_SFP_BASE:
- /*
- * MCDI page 0 should be used to access lower
- * page 0 (0x00 - 0x7f) at the device address 0xA0.
- */
- mcdi_lower_page = 0;
- /*
- * MCDI page 1 should be used to access upper
- * page 0 (0x80 - 0xff) at the device address 0xA0.
- */
- mcdi_upper_page = 1;
- break;
- /* Diagnostics */
- case EFX_PHY_MEDIA_INFO_DEV_ADDR_SFP_DDM:
- /*
- * MCDI page 2 should be used to access lower
- * page 0 (0x00 - 0x7f) at the device address 0xA2.
- */
- mcdi_lower_page = 2;
- /*
- * MCDI page 3 should be used to access upper
- * page 0 (0x80 - 0xff) at the device address 0xA2.
- */
- mcdi_upper_page = 3;
- break;
- default:
- rc = ENOTSUP;
- goto fail3;
- }
- break;
- case EFX_SFF_TRANSCEIVER_ID_QSFP:
- case EFX_SFF_TRANSCEIVER_ID_QSFP_PLUS:
- case EFX_SFF_TRANSCEIVER_ID_QSFP28:
- switch (dev_addr) {
- case EFX_PHY_MEDIA_INFO_DEV_ADDR_QSFP:
- /*
- * MCDI page -1 should be used to access lower page 0
- * (0x00 - 0x7f).
- */
- mcdi_lower_page = (uint32_t)-1;
- /*
- * MCDI page 0 should be used to access upper page 0
- * (0x80h - 0xff).
- */
- mcdi_upper_page = 0;
- break;
- default:
- rc = ENOTSUP;
- goto fail3;
- }
- break;
- default:
- rc = ENOTSUP;
- goto fail3;
- }
-
- EFX_STATIC_ASSERT(EFX_PHY_MEDIA_INFO_PAGE_SIZE <= 0xFF);
-
- if (offset < EFX_PHY_MEDIA_INFO_PAGE_SIZE) {
- size_t read_len =
- MIN(len, EFX_PHY_MEDIA_INFO_PAGE_SIZE - offset);
-
- rc = efx_mcdi_get_phy_media_info(enp,
- mcdi_lower_page, (uint8_t)offset, (uint8_t)read_len, data);
- if (rc != 0)
- goto fail4;
-
- data += read_len;
- len -= read_len;
-
- offset = 0;
- } else {
- offset -= EFX_PHY_MEDIA_INFO_PAGE_SIZE;
- }
-
- if (len > 0) {
- EFSYS_ASSERT3U(len, <=, EFX_PHY_MEDIA_INFO_PAGE_SIZE);
- EFSYS_ASSERT3U(offset, <, EFX_PHY_MEDIA_INFO_PAGE_SIZE);
-
- rc = efx_mcdi_get_phy_media_info(enp,
- mcdi_upper_page, (uint8_t)offset, (uint8_t)len, data);
- if (rc != 0)
- goto fail5;
- }
-
- return (0);
-
-fail5:
- EFSYS_PROBE(fail5);
-fail4:
- EFSYS_PROBE(fail4);
-fail3:
- EFSYS_PROBE(fail3);
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
#if EFSYS_OPT_RIVERHEAD || EFX_OPTS_EF10()
#define INIT_EVQ_MAXNBUFS MC_CMD_INIT_EVQ_V2_IN_DMA_ADDR_MAXNUM
diff --git a/drivers/common/sfc_efx/base/efx_mcdi.h b/drivers/common/sfc_efx/base/efx_mcdi.h
index 3d4638f0c6..79a2aece3b 100644
--- a/drivers/common/sfc_efx/base/efx_mcdi.h
+++ b/drivers/common/sfc_efx/base/efx_mcdi.h
@@ -200,30 +200,12 @@ extern __checkReturn efx_rc_t
efx_mcdi_get_phy_cfg(
__in efx_nic_t *enp);
-LIBEFX_INTERNAL
-extern __checkReturn efx_rc_t
-efx_mcdi_firmware_update_supported(
- __in efx_nic_t *enp,
- __out boolean_t *supportedp);
-
-LIBEFX_INTERNAL
-extern __checkReturn efx_rc_t
-efx_mcdi_macaddr_change_supported(
- __in efx_nic_t *enp,
- __out boolean_t *supportedp);
-
LIBEFX_INTERNAL
extern __checkReturn efx_rc_t
efx_mcdi_link_control_supported(
__in efx_nic_t *enp,
__out boolean_t *supportedp);
-LIBEFX_INTERNAL
-extern __checkReturn efx_rc_t
-efx_mcdi_mac_spoofing_supported(
- __in efx_nic_t *enp,
- __out boolean_t *supportedp);
-
#if EFSYS_OPT_BIST
#if EFX_OPTS_EF10()
@@ -279,15 +261,6 @@ efx_mcdi_get_loopback_modes(
__in efx_nic_t *enp);
#endif /* EFSYS_OPT_LOOPBACK */
-LIBEFX_INTERNAL
-extern __checkReturn efx_rc_t
-efx_mcdi_phy_module_get_info(
- __in efx_nic_t *enp,
- __in uint8_t dev_addr,
- __in size_t offset,
- __in size_t len,
- __out_bcount(len) uint8_t *data);
-
LIBEFX_INTERNAL
extern __checkReturn efx_rc_t
efx_mcdi_get_nic_addr_info(
diff --git a/drivers/common/sfc_efx/base/efx_mon.c b/drivers/common/sfc_efx/base/efx_mon.c
index ee449ef5eb..13052f41c4 100644
--- a/drivers/common/sfc_efx/base/efx_mon.c
+++ b/drivers/common/sfc_efx/base/efx_mon.c
@@ -20,19 +20,6 @@ static const char * const __efx_mon_name[] = {
"sfx92x0"
};
- const char *
-efx_mon_name(
- __in efx_nic_t *enp)
-{
- efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
-
- EFSYS_ASSERT(encp->enc_mon_type != EFX_MON_INVALID);
- EFSYS_ASSERT3U(encp->enc_mon_type, <, EFX_MON_NTYPES);
- return (__efx_mon_name[encp->enc_mon_type]);
-}
-
#endif /* EFSYS_OPT_NAMES */
#if EFSYS_OPT_MON_MCDI
@@ -45,57 +32,6 @@ static const efx_mon_ops_t __efx_mon_mcdi_ops = {
#endif
- __checkReturn efx_rc_t
-efx_mon_init(
- __in efx_nic_t *enp)
-{
- efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
- efx_mon_t *emp = &(enp->en_mon);
- const efx_mon_ops_t *emop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
-
- if (enp->en_mod_flags & EFX_MOD_MON) {
- rc = EINVAL;
- goto fail1;
- }
-
- enp->en_mod_flags |= EFX_MOD_MON;
-
- emp->em_type = encp->enc_mon_type;
-
- EFSYS_ASSERT(encp->enc_mon_type != EFX_MON_INVALID);
- switch (emp->em_type) {
-#if EFSYS_OPT_MON_MCDI
- case EFX_MON_SFC90X0:
- case EFX_MON_SFC91X0:
- case EFX_MON_SFC92X0:
- emop = &__efx_mon_mcdi_ops;
- break;
-#endif
- default:
- rc = ENOTSUP;
- goto fail2;
- }
-
- emp->em_emop = emop;
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-
- emp->em_type = EFX_MON_INVALID;
-
- enp->en_mod_flags &= ~EFX_MOD_MON;
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
#if EFSYS_OPT_MON_STATS
#if EFSYS_OPT_NAMES
@@ -831,20 +767,3 @@ efx_mon_limits_update(
}
#endif /* EFSYS_OPT_MON_STATS */
-
- void
-efx_mon_fini(
- __in efx_nic_t *enp)
-{
- efx_mon_t *emp = &(enp->en_mon);
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_MON);
-
- emp->em_emop = NULL;
-
- emp->em_type = EFX_MON_INVALID;
-
- enp->en_mod_flags &= ~EFX_MOD_MON;
-}
diff --git a/drivers/common/sfc_efx/base/efx_nic.c b/drivers/common/sfc_efx/base/efx_nic.c
index ab2bb1c160..f21c59fb00 100644
--- a/drivers/common/sfc_efx/base/efx_nic.c
+++ b/drivers/common/sfc_efx/base/efx_nic.c
@@ -541,74 +541,6 @@ efx_nic_set_drv_limits(
return (rc);
}
- __checkReturn efx_rc_t
-efx_nic_set_drv_version(
- __inout efx_nic_t *enp,
- __in_ecount(length) char const *verp,
- __in size_t length)
-{
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT(!(enp->en_mod_flags & EFX_MOD_PROBE));
-
- /*
- * length is the string content length in bytes.
- * Accept any content which fits into the version
- * buffer, excluding the last byte. This is reserved
- * for an appended NUL terminator.
- */
- if (length >= sizeof (enp->en_drv_version)) {
- rc = E2BIG;
- goto fail1;
- }
-
- (void) memset(enp->en_drv_version, 0,
- sizeof (enp->en_drv_version));
- memcpy(enp->en_drv_version, verp, length);
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
-
- __checkReturn efx_rc_t
-efx_nic_get_bar_region(
- __in efx_nic_t *enp,
- __in efx_nic_region_t region,
- __out uint32_t *offsetp,
- __out size_t *sizep)
-{
- const efx_nic_ops_t *enop = enp->en_enop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC);
-
- if (enop->eno_get_bar_region == NULL) {
- rc = ENOTSUP;
- goto fail1;
- }
- if ((rc = (enop->eno_get_bar_region)(enp,
- region, offsetp, sizep)) != 0) {
- goto fail2;
- }
-
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
__checkReturn efx_rc_t
@@ -927,18 +859,6 @@ efx_nic_hw_unavailable(
return (B_TRUE);
}
- void
-efx_nic_set_hw_unavailable(
- __in efx_nic_t *enp)
-{
- const efx_nic_ops_t *enop = enp->en_enop;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
-
- if (enop->eno_set_hw_unavailable != NULL)
- enop->eno_set_hw_unavailable(enp);
-}
-
#if EFSYS_OPT_DIAG
@@ -1311,56 +1231,6 @@ efx_nic_set_fw_subvariant(
#endif /* EFSYS_OPT_FW_SUBVARIANT_AWARE */
- __checkReturn efx_rc_t
-efx_nic_check_pcie_link_speed(
- __in efx_nic_t *enp,
- __in uint32_t pcie_link_width,
- __in uint32_t pcie_link_gen,
- __out efx_pcie_link_performance_t *resultp)
-{
- efx_nic_cfg_t *encp = &(enp->en_nic_cfg);
- uint32_t bandwidth;
- efx_pcie_link_performance_t result;
- efx_rc_t rc;
-
- if ((encp->enc_required_pcie_bandwidth_mbps == 0) ||
- (pcie_link_width == 0) || (pcie_link_width == 32) ||
- (pcie_link_gen == 0)) {
- /*
- * No usable info on what is required and/or in use. In virtual
- * machines, sometimes the PCIe link width is reported as 0 or
- * 32, or the speed as 0.
- */
- result = EFX_PCIE_LINK_PERFORMANCE_UNKNOWN_BANDWIDTH;
- goto out;
- }
-
- /* Calculate the available bandwidth in megabits per second */
- rc = efx_nic_calculate_pcie_link_bandwidth(pcie_link_width,
- pcie_link_gen, &bandwidth);
- if (rc != 0)
- goto fail1;
-
- if (bandwidth < encp->enc_required_pcie_bandwidth_mbps) {
- result = EFX_PCIE_LINK_PERFORMANCE_SUBOPTIMAL_BANDWIDTH;
- } else if (pcie_link_gen < encp->enc_max_pcie_link_gen) {
- /* The link provides enough bandwidth but not optimal latency */
- result = EFX_PCIE_LINK_PERFORMANCE_SUBOPTIMAL_LATENCY;
- } else {
- result = EFX_PCIE_LINK_PERFORMANCE_OPTIMAL;
- }
-
-out:
- *resultp = result;
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
/* Required en_eslp lock held */
static __checkReturn efx_rc_t
efx_nic_dma_config_regioned_find_region(
diff --git a/drivers/common/sfc_efx/base/efx_phy.c b/drivers/common/sfc_efx/base/efx_phy.c
index ff90291dd3..9abe5d65b3 100644
--- a/drivers/common/sfc_efx/base/efx_phy.c
+++ b/drivers/common/sfc_efx/base/efx_phy.c
@@ -161,19 +161,6 @@ efx_phy_probe(
return (rc);
}
- __checkReturn efx_rc_t
-efx_phy_verify(
- __in efx_nic_t *enp)
-{
- efx_port_t *epp = &(enp->en_port);
- const efx_phy_ops_t *epop = epp->ep_epop;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
-
- return (epop->epo_verify(enp));
-}
-
#if EFSYS_OPT_PHY_LED_CONTROL
__checkReturn efx_rc_t
@@ -309,19 +296,6 @@ efx_phy_adv_cap_set(
return (rc);
}
- void
-efx_phy_lp_cap_get(
- __in efx_nic_t *enp,
- __out uint32_t *maskp)
-{
- efx_port_t *epp = &(enp->en_port);
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
-
- *maskp = epp->ep_lp_cap_mask;
-}
-
__checkReturn efx_rc_t
efx_phy_lane_count_set(
__in efx_nic_t *enp,
@@ -369,69 +343,6 @@ efx_phy_lane_count_set(
return (rc);
}
- __checkReturn efx_rc_t
-efx_phy_oui_get(
- __in efx_nic_t *enp,
- __out uint32_t *ouip)
-{
- efx_port_t *epp = &(enp->en_port);
- const efx_phy_ops_t *epop = epp->ep_epop;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
-
- return (epop->epo_oui_get(enp, ouip));
-}
-
- void
-efx_phy_media_type_get(
- __in efx_nic_t *enp,
- __out efx_phy_media_type_t *typep)
-{
- efx_port_t *epp = &(enp->en_port);
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PORT);
-
- if (epp->ep_module_type != EFX_PHY_MEDIA_INVALID)
- *typep = epp->ep_module_type;
- else
- *typep = epp->ep_fixed_port_type;
-}
-
- __checkReturn efx_rc_t
-efx_phy_module_get_info(
- __in efx_nic_t *enp,
- __in uint8_t dev_addr,
- __in size_t offset,
- __in size_t len,
- __out_bcount(len) uint8_t *data)
-{
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT(data != NULL);
-
- if ((offset > EFX_PHY_MEDIA_INFO_MAX_OFFSET) ||
- ((offset + len) > EFX_PHY_MEDIA_INFO_MAX_OFFSET)) {
- rc = EINVAL;
- goto fail1;
- }
-
- if ((rc = efx_mcdi_phy_module_get_info(enp, dev_addr,
- offset, len, data)) != 0)
- goto fail2;
-
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
__checkReturn efx_rc_t
efx_phy_fec_type_get(
__in efx_nic_t *enp,
diff --git a/drivers/common/sfc_efx/base/efx_port.c b/drivers/common/sfc_efx/base/efx_port.c
index 5ae5e144bd..8061e8b71a 100644
--- a/drivers/common/sfc_efx/base/efx_port.c
+++ b/drivers/common/sfc_efx/base/efx_port.c
@@ -187,21 +187,6 @@ static const char * const __efx_loopback_type_name[] = {
"FORCE_EXT_LINK",
};
- __checkReturn const char *
-efx_loopback_type_name(
- __in efx_nic_t *enp,
- __in efx_loopback_type_t type)
-{
- EFX_STATIC_ASSERT(EFX_ARRAY_SIZE(__efx_loopback_type_name) ==
- EFX_LOOPBACK_NTYPES);
-
- _NOTE(ARGUNUSED(enp))
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(type, <, EFX_LOOPBACK_NTYPES);
-
- return (__efx_loopback_type_name[type]);
-}
-
#endif /* EFSYS_OPT_NAMES */
#endif /* EFSYS_OPT_LOOPBACK */
diff --git a/drivers/common/sfc_efx/base/efx_rx.c b/drivers/common/sfc_efx/base/efx_rx.c
index 86dfc89ba4..e52d0cc317 100644
--- a/drivers/common/sfc_efx/base/efx_rx.c
+++ b/drivers/common/sfc_efx/base/efx_rx.c
@@ -503,41 +503,6 @@ efx_rx_scale_default_support_get(
#endif /* EFSYS_OPT_RX_SCALE */
#if EFSYS_OPT_RX_SCALE
- __checkReturn efx_rc_t
-efx_rx_scale_context_alloc(
- __in efx_nic_t *enp,
- __in efx_rx_scale_context_type_t type,
- __in uint32_t num_queues,
- __out uint32_t *rss_contextp)
-{
- uint32_t table_nentries = EFX_RSS_TBL_SIZE;
- const efx_rx_ops_t *erxop = enp->en_erxop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_RX);
-
- if (erxop->erxo_scale_context_alloc == NULL) {
- rc = ENOTSUP;
- goto fail1;
- }
-
- if (type == EFX_RX_SCALE_EVEN_SPREAD)
- table_nentries = 0;
-
- if ((rc = erxop->erxo_scale_context_alloc(enp, type, num_queues,
- table_nentries, rss_contextp)) != 0) {
- goto fail2;
- }
-
- return (0);
-
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
#endif /* EFSYS_OPT_RX_SCALE */
#if EFSYS_OPT_RX_SCALE
diff --git a/drivers/common/sfc_efx/base/efx_sram.c b/drivers/common/sfc_efx/base/efx_sram.c
index f46df551d1..eb2fd21d7a 100644
--- a/drivers/common/sfc_efx/base/efx_sram.c
+++ b/drivers/common/sfc_efx/base/efx_sram.c
@@ -7,170 +7,6 @@
#include "efx.h"
#include "efx_impl.h"
- __checkReturn efx_rc_t
-efx_sram_buf_tbl_set(
- __in efx_nic_t *enp,
- __in uint32_t id,
- __in efsys_mem_t *esmp,
- __in size_t n)
-{
- efx_qword_t qword;
- uint32_t start = id;
- uint32_t stop = start + n;
- efsys_dma_addr_t addr;
- efx_oword_t oword;
- unsigned int count;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC);
-
-#if EFX_OPTS_EF10()
- if (EFX_FAMILY_IS_EF10(enp)) {
- /*
- * FIXME: the efx_sram_buf_tbl_*() functionality needs to be
- * pulled inside the Falcon/Siena queue create/destroy code,
- * and then the original functions can be removed (see bug30834
- * comment #1). But, for now, we just ensure that they are
- * no-ops for EF10, to allow bringing up existing drivers
- * without modification.
- */
-
- return (0);
- }
-#endif /* EFX_OPTS_EF10() */
-
- if (stop >= EFX_BUF_TBL_SIZE) {
- rc = EFBIG;
- goto fail1;
- }
-
- /* Add the entries into the buffer table */
- addr = EFSYS_MEM_ADDR(esmp);
- for (id = start; id != stop; id++) {
- EFX_POPULATE_QWORD_5(qword,
- FRF_AZ_IP_DAT_BUF_SIZE, 0, FRF_AZ_BUF_ADR_REGION, 0,
- FRF_AZ_BUF_ADR_FBUF_DW0,
- (uint32_t)((addr >> 12) & 0xffffffff),
- FRF_AZ_BUF_ADR_FBUF_DW1,
- (uint32_t)((addr >> 12) >> 32),
- FRF_AZ_BUF_OWNER_ID_FBUF, 0);
-
- EFX_BAR_TBL_WRITEQ(enp, FR_AZ_BUF_FULL_TBL,
- id, &qword);
-
- addr += EFX_BUF_SIZE;
- }
-
- EFSYS_PROBE2(buf, uint32_t, start, uint32_t, stop - 1);
-
- /* Flush the write buffer */
- EFX_POPULATE_OWORD_2(oword, FRF_AZ_BUF_UPD_CMD, 1,
- FRF_AZ_BUF_CLR_CMD, 0);
- EFX_BAR_WRITEO(enp, FR_AZ_BUF_TBL_UPD_REG, &oword);
-
- /* Poll for the last entry being written to the buffer table */
- EFSYS_ASSERT3U(id, ==, stop);
- addr -= EFX_BUF_SIZE;
-
- count = 0;
- do {
- EFSYS_PROBE1(wait, unsigned int, count);
-
- /* Spin for 1 ms */
- EFSYS_SPIN(1000);
-
- EFX_BAR_TBL_READQ(enp, FR_AZ_BUF_FULL_TBL,
- id - 1, &qword);
-
- if (EFX_QWORD_FIELD(qword, FRF_AZ_BUF_ADR_FBUF_DW0) ==
- (uint32_t)((addr >> 12) & 0xffffffff) &&
- EFX_QWORD_FIELD(qword, FRF_AZ_BUF_ADR_FBUF_DW1) ==
- (uint32_t)((addr >> 12) >> 32))
- goto verify;
-
- } while (++count < 100);
-
- rc = ETIMEDOUT;
- goto fail2;
-
-verify:
- /* Verify the rest of the entries in the buffer table */
- while (--id != start) {
- addr -= EFX_BUF_SIZE;
-
- /* Read the buffer table entry */
- EFX_BAR_TBL_READQ(enp, FR_AZ_BUF_FULL_TBL,
- id - 1, &qword);
-
- if (EFX_QWORD_FIELD(qword, FRF_AZ_BUF_ADR_FBUF_DW0) !=
- (uint32_t)((addr >> 12) & 0xffffffff) ||
- EFX_QWORD_FIELD(qword, FRF_AZ_BUF_ADR_FBUF_DW1) !=
- (uint32_t)((addr >> 12) >> 32)) {
- rc = EFAULT;
- goto fail3;
- }
- }
-
- return (0);
-
-fail3:
- EFSYS_PROBE(fail3);
-
- id = stop;
-
-fail2:
- EFSYS_PROBE(fail2);
-
- EFX_POPULATE_OWORD_4(oword, FRF_AZ_BUF_UPD_CMD, 0,
- FRF_AZ_BUF_CLR_CMD, 1, FRF_AZ_BUF_CLR_END_ID, id - 1,
- FRF_AZ_BUF_CLR_START_ID, start);
- EFX_BAR_WRITEO(enp, FR_AZ_BUF_TBL_UPD_REG, &oword);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
- void
-efx_sram_buf_tbl_clear(
- __in efx_nic_t *enp,
- __in uint32_t id,
- __in size_t n)
-{
- efx_oword_t oword;
- uint32_t start = id;
- uint32_t stop = start + n;
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NIC);
-
-#if EFX_OPTS_EF10()
- if (EFX_FAMILY_IS_EF10(enp)) {
- /*
- * FIXME: the efx_sram_buf_tbl_*() functionality needs to be
- * pulled inside the Falcon/Siena queue create/destroy code,
- * and then the original functions can be removed (see bug30834
- * comment #1). But, for now, we just ensure that they are
- * no-ops for EF10, to allow bringing up existing drivers
- * without modification.
- */
-
- return;
- }
-#endif /* EFX_OPTS_EF10() */
-
- EFSYS_ASSERT3U(stop, <, EFX_BUF_TBL_SIZE);
-
- EFSYS_PROBE2(buf, uint32_t, start, uint32_t, stop - 1);
-
- EFX_POPULATE_OWORD_4(oword, FRF_AZ_BUF_UPD_CMD, 0,
- FRF_AZ_BUF_CLR_CMD, 1, FRF_AZ_BUF_CLR_END_ID, stop - 1,
- FRF_AZ_BUF_CLR_START_ID, start);
- EFX_BAR_WRITEO(enp, FR_AZ_BUF_TBL_UPD_REG, &oword);
-}
-
#if EFSYS_OPT_DIAG
diff --git a/drivers/common/sfc_efx/base/efx_tx.c b/drivers/common/sfc_efx/base/efx_tx.c
index d1021dea82..59d359383f 100644
--- a/drivers/common/sfc_efx/base/efx_tx.c
+++ b/drivers/common/sfc_efx/base/efx_tx.c
@@ -469,30 +469,6 @@ efx_tx_qdestroy(
EFSYS_KMEM_FREE(enp->en_esip, sizeof (efx_txq_t), etp);
}
- __checkReturn efx_rc_t
-efx_tx_qpost(
- __in efx_txq_t *etp,
- __in_ecount(ndescs) efx_buffer_t *eb,
- __in unsigned int ndescs,
- __in unsigned int completed,
- __inout unsigned int *addedp)
-{
- efx_nic_t *enp = etp->et_enp;
- const efx_tx_ops_t *etxop = enp->en_etxop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
-
- if ((rc = etxop->etxo_qpost(etp, eb, ndescs, completed, addedp)) != 0)
- goto fail1;
-
- return (0);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
void
efx_tx_qpush(
__in efx_txq_t *etp,
@@ -560,105 +536,6 @@ efx_tx_qenable(
etxop->etxo_qenable(etp);
}
- __checkReturn efx_rc_t
-efx_tx_qpio_enable(
- __in efx_txq_t *etp)
-{
- efx_nic_t *enp = etp->et_enp;
- const efx_tx_ops_t *etxop = enp->en_etxop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
-
- if (~enp->en_features & EFX_FEATURE_PIO_BUFFERS) {
- rc = ENOTSUP;
- goto fail1;
- }
- if (etxop->etxo_qpio_enable == NULL) {
- rc = ENOTSUP;
- goto fail2;
- }
- if ((rc = etxop->etxo_qpio_enable(etp)) != 0)
- goto fail3;
-
- return (0);
-
-fail3:
- EFSYS_PROBE(fail3);
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
- void
-efx_tx_qpio_disable(
- __in efx_txq_t *etp)
-{
- efx_nic_t *enp = etp->et_enp;
- const efx_tx_ops_t *etxop = enp->en_etxop;
-
- EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
-
- if (etxop->etxo_qpio_disable != NULL)
- etxop->etxo_qpio_disable(etp);
-}
-
- __checkReturn efx_rc_t
-efx_tx_qpio_write(
- __in efx_txq_t *etp,
- __in_ecount(buf_length) uint8_t *buffer,
- __in size_t buf_length,
- __in size_t pio_buf_offset)
-{
- efx_nic_t *enp = etp->et_enp;
- const efx_tx_ops_t *etxop = enp->en_etxop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
-
- if (etxop->etxo_qpio_write != NULL) {
- if ((rc = etxop->etxo_qpio_write(etp, buffer, buf_length,
- pio_buf_offset)) != 0)
- goto fail1;
- return (0);
- }
-
- return (ENOTSUP);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
- __checkReturn efx_rc_t
-efx_tx_qpio_post(
- __in efx_txq_t *etp,
- __in size_t pkt_length,
- __in unsigned int completed,
- __inout unsigned int *addedp)
-{
- efx_nic_t *enp = etp->et_enp;
- const efx_tx_ops_t *etxop = enp->en_etxop;
- efx_rc_t rc;
-
- EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
-
- if (etxop->etxo_qpio_post != NULL) {
- if ((rc = etxop->etxo_qpio_post(etp, pkt_length, completed,
- addedp)) != 0)
- goto fail1;
- return (0);
- }
-
- return (ENOTSUP);
-
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
- return (rc);
-}
-
__checkReturn efx_rc_t
efx_tx_qdesc_post(
__in efx_txq_t *etp,
@@ -692,23 +569,6 @@ efx_tx_qdesc_dma_create(
etxop->etxo_qdesc_dma_create(etp, addr, size, eop, edp);
}
- void
-efx_tx_qdesc_tso_create(
- __in efx_txq_t *etp,
- __in uint16_t ipv4_id,
- __in uint32_t tcp_seq,
- __in uint8_t tcp_flags,
- __out efx_desc_t *edp)
-{
- efx_nic_t *enp = etp->et_enp;
- const efx_tx_ops_t *etxop = enp->en_etxop;
-
- EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
- EFSYS_ASSERT(etxop->etxo_qdesc_tso_create != NULL);
-
- etxop->etxo_qdesc_tso_create(etp, ipv4_id, tcp_seq, tcp_flags, edp);
-}
-
void
efx_tx_qdesc_tso2_create(
__in efx_txq_t *etp,
@@ -744,21 +604,6 @@ efx_tx_qdesc_vlantci_create(
etxop->etxo_qdesc_vlantci_create(etp, tci, edp);
}
- void
-efx_tx_qdesc_checksum_create(
- __in efx_txq_t *etp,
- __in uint16_t flags,
- __out efx_desc_t *edp)
-{
- efx_nic_t *enp = etp->et_enp;
- const efx_tx_ops_t *etxop = enp->en_etxop;
-
- EFSYS_ASSERT3U(etp->et_magic, ==, EFX_TXQ_MAGIC);
- EFSYS_ASSERT(etxop->etxo_qdesc_checksum_create != NULL);
-
- etxop->etxo_qdesc_checksum_create(etp, flags, edp);
-}
-
#if EFSYS_OPT_QSTATS
void
diff --git a/drivers/common/sfc_efx/base/efx_virtio.c b/drivers/common/sfc_efx/base/efx_virtio.c
index b9c351d732..a33286cec6 100644
--- a/drivers/common/sfc_efx/base/efx_virtio.c
+++ b/drivers/common/sfc_efx/base/efx_virtio.c
@@ -300,41 +300,4 @@ efx_virtio_get_features(
return (rc);
}
- __checkReturn efx_rc_t
-efx_virtio_verify_features(
- __in efx_nic_t *enp,
- __in efx_virtio_device_type_t type,
- __in uint64_t features)
-{
- const efx_virtio_ops_t *evop = enp->en_evop;
- efx_rc_t rc;
-
- if (type >= EFX_VIRTIO_DEVICE_NTYPES) {
- rc = EINVAL;
- goto fail1;
- }
-
- EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
- EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_VIRTIO);
-
- if (evop == NULL) {
- rc = ENOTSUP;
- goto fail2;
- }
-
- if ((rc = evop->evo_verify_features(enp, type, features)) != 0)
- goto fail3;
-
- return (0);
-
-fail3:
- EFSYS_PROBE(fail3);
-fail2:
- EFSYS_PROBE(fail2);
-fail1:
- EFSYS_PROBE1(fail1, efx_rc_t, rc);
-
- return (rc);
-}
-
#endif /* EFSYS_OPT_VIRTIO */
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 26/45] common/cnxk: remove unused roc functions
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (24 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 25/45] common/sfc_efx: remove unused libefx functions Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 27/45] common/mlx5: remove unused internal functions Stephen Hemminger
` (19 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Srikanth Yalavarthi
108 roc functions have no caller anywhere in the tree. The source
scan covers the per-offload template files under net, event and
crypto cnxk which a default config does not compile, so none of
these are reached from a template either.
Deleting them left several internal helpers unreachable, which the
compiler reported: the flow control config getters, the inline
timestamp pkind setter, the SQB aura resize helpers and the REE
error interrupt registration. Those are removed as well, along with
nix_lf_bpf_dump(), nix_rq_bulk_ena_dis_fill() and
nix_aq_enq_write_rq_ena(), which only clang reports because gcc
does not warn about an unused static inline in a .c file.
Among them are the debug dumpers roc_cpt_cq_dump(), roc_nix_bpf_dump()
and roc_npa_dump(), which are called from a debugger rather than from
the tree. Say so if they should stay.
roc_idev.h gains a forward declaration of struct roc_rvu_lf, which
until now came in as the return type of roc_idev_rvu_lf_get().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/cnxk/cnxk_security.c | 24 --
drivers/common/cnxk/cnxk_security.h | 4 -
drivers/common/cnxk/roc_cpt.c | 50 ----
drivers/common/cnxk/roc_cpt.h | 6 -
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_idev.c | 40 ---
drivers/common/cnxk/roc_idev.h | 4 +-
drivers/common/cnxk/roc_mcs.c | 253 -----------------
drivers/common/cnxk/roc_mcs.h | 34 ---
drivers/common/cnxk/roc_mcs_sec_cfg.c | 95 -------
drivers/common/cnxk/roc_ml.c | 97 -------
drivers/common/cnxk/roc_ml.h | 6 -
drivers/common/cnxk/roc_nix.c | 8 -
drivers/common/cnxk/roc_nix.h | 81 ------
drivers/common/cnxk/roc_nix_bpf.c | 270 ------------------
drivers/common/cnxk/roc_nix_fc.c | 222 ---------------
drivers/common/cnxk/roc_nix_inl.c | 159 -----------
drivers/common/cnxk/roc_nix_inl.h | 11 -
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 | 43 ---
drivers/common/cnxk/roc_nix_ptp.c | 9 -
drivers/common/cnxk/roc_nix_queue.c | 364 -------------------------
drivers/common/cnxk/roc_nix_stats.c | 6 -
drivers/common/cnxk/roc_nix_tm_ops.c | 257 -----------------
drivers/common/cnxk/roc_nix_tm_utils.c | 51 ----
drivers/common/cnxk/roc_nix_vlan.c | 243 -----------------
drivers/common/cnxk/roc_npa.c | 244 -----------------
drivers/common/cnxk/roc_npa.h | 6 -
drivers/common/cnxk/roc_npa_debug.c | 39 ---
drivers/common/cnxk/roc_npc.c | 117 --------
drivers/common/cnxk/roc_npc.h | 9 -
drivers/common/cnxk/roc_ree.c | 81 ------
drivers/common/cnxk/roc_ree.h | 3 -
drivers/common/cnxk/roc_sso.c | 64 -----
drivers/common/cnxk/roc_sso.h | 7 -
39 files changed, 1 insertion(+), 3304 deletions(-)
diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c
index f2e25264ec..4e160f2e74 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -596,30 +596,6 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
return 0;
}
-bool
-cnxk_ot_ipsec_inb_sa_valid(struct roc_ot_ipsec_inb_sa *sa)
-{
- return !!sa->w2.s.valid;
-}
-
-bool
-cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa)
-{
- return !!sa->w2.s.valid;
-}
-
-bool
-cnxk_ow_ipsec_inb_sa_valid(struct roc_ow_ipsec_inb_sa *sa)
-{
- return !!sa->w2.s.valid;
-}
-
-bool
-cnxk_ow_ipsec_outb_sa_valid(struct roc_ow_ipsec_outb_sa *sa)
-{
- return !!sa->w2.s.valid;
-}
-
uint8_t
cnxk_ipsec_ivlen_get(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_auth_algorithm a_algo,
diff --git a/drivers/common/cnxk/cnxk_security.h b/drivers/common/cnxk/cnxk_security.h
index 55992e375b..d44cd19e75 100644
--- a/drivers/common/cnxk/cnxk_security.h
+++ b/drivers/common/cnxk/cnxk_security.h
@@ -46,8 +46,6 @@ int __roc_api cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
struct rte_security_ipsec_xform *ipsec_xfrm,
struct rte_crypto_sym_xform *crypto_xfrm,
uint8_t ctx_ilen);
-bool cnxk_ot_ipsec_inb_sa_valid(struct roc_ot_ipsec_inb_sa *sa);
-bool cnxk_ot_ipsec_outb_sa_valid(struct roc_ot_ipsec_outb_sa *sa);
/* [CN9K] */
int __roc_api cnxk_on_ipsec_inb_sa_create(struct rte_security_ipsec_xform *ipsec,
@@ -65,8 +63,6 @@ int __roc_api cnxk_ow_ipsec_outb_sa_fill(struct roc_ow_ipsec_outb_sa *sa,
struct rte_security_ipsec_xform *ipsec_xfrm,
struct rte_crypto_sym_xform *crypto_xfrm,
uint8_t ctx_ilen);
-bool cnxk_ow_ipsec_inb_sa_valid(struct roc_ow_ipsec_inb_sa *sa);
-bool cnxk_ow_ipsec_outb_sa_valid(struct roc_ow_ipsec_outb_sa *sa);
static inline int
ipsec_xform_cipher_verify(struct rte_crypto_sym_xform *crypto_xform)
diff --git a/drivers/common/cnxk/roc_cpt.c b/drivers/common/cnxk/roc_cpt.c
index 645c205480..fd8d2de5d2 100644
--- a/drivers/common/cnxk/roc_cpt.c
+++ b/drivers/common/cnxk/roc_cpt.c
@@ -260,56 +260,6 @@ cpt_lf_outb_cfg(struct dev *dev, uint16_t sso_pf_func, uint16_t nix_pf_func,
return rc;
}
-int
-roc_cpt_inline_ipsec_cfg(struct dev *cpt_dev, uint8_t lf_id,
- struct roc_nix *roc_nix)
-{
- bool ena = roc_nix ? true : false;
- uint16_t nix_pf_func = 0;
- uint16_t sso_pf_func = 0;
-
- if (ena) {
- nix_pf_func = roc_nix_get_pf_func(roc_nix);
- sso_pf_func = idev_sso_pffunc_get();
- }
-
- return cpt_lf_outb_cfg(cpt_dev, sso_pf_func, nix_pf_func, lf_id, ena);
-}
-
-int
-roc_cpt_inline_ipsec_inb_cfg_read(struct roc_cpt *roc_cpt,
- struct roc_cpt_inline_ipsec_inb_cfg *cfg)
-{
- struct cpt *cpt = roc_cpt_to_cpt_priv(roc_cpt);
- struct nix_inline_ipsec_cfg *inb_cfg;
- struct dev *dev = &cpt->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct msg_req *req;
- int rc;
-
- req = mbox_alloc_msg_nix_read_inline_ipsec_cfg(mbox);
- if (req == NULL) {
- rc = -EIO;
- goto exit;
- }
-
- rc = mbox_process_msg(mbox, (void *)&inb_cfg);
- if (rc) {
- rc = -EIO;
- goto exit;
- }
- cfg->cpt_credit = inb_cfg->cpt_credit;
- cfg->egrp = inb_cfg->gen_cfg.egrp;
- cfg->opcode = inb_cfg->gen_cfg.opcode;
- cfg->param1 = inb_cfg->gen_cfg.param1;
- cfg->param2 = inb_cfg->gen_cfg.param2;
- cfg->bpid = inb_cfg->bpid;
- cfg->credit_th = inb_cfg->credit_th;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
roc_cpt_inline_ipsec_inb_cfg(struct roc_cpt *roc_cpt, struct roc_cpt_inline_ipsec_inb_cfg *cfg)
{
diff --git a/drivers/common/cnxk/roc_cpt.h b/drivers/common/cnxk/roc_cpt.h
index ed566c86b0..cabfff19a1 100644
--- a/drivers/common/cnxk/roc_cpt.h
+++ b/drivers/common/cnxk/roc_cpt.h
@@ -239,10 +239,6 @@ void __roc_api roc_cpt_lf_reset(struct roc_cpt_lf *lf);
int __roc_api roc_cpt_lf_ctx_flush(struct roc_cpt_lf *lf, void *cptr,
bool inval);
int __roc_api roc_cpt_lf_ctx_reload(struct roc_cpt_lf *lf, void *cptr);
-int roc_cpt_inline_ipsec_cfg(struct dev *dev, uint8_t slot,
- struct roc_nix *nix);
-int roc_cpt_inline_ipsec_inb_cfg_read(struct roc_cpt *roc_cpt,
- struct roc_cpt_inline_ipsec_inb_cfg *cfg);
int roc_cpt_inline_ipsec_inb_cfg(struct roc_cpt *roc_cpt,
struct roc_cpt_inline_ipsec_inb_cfg *cfg);
int __roc_api roc_cpt_afs_print(struct roc_cpt *roc_cpt);
@@ -263,6 +259,4 @@ int __roc_api roc_cpt_int_misc_cb_unregister(roc_cpt_int_misc_cb_t cb, void *arg
bool roc_cpt_has_ie_engines(void);
-void roc_cpt_cq_dump(FILE *file, const struct cpt_cq_s *cq);
-
#endif /* _ROC_CPT_H_ */
diff --git a/drivers/common/cnxk/roc_cpt_debug.c b/drivers/common/cnxk/roc_cpt_debug.c
index be7b68c940..8ad7d6bd98 100644
--- a/drivers/common/cnxk/roc_cpt_debug.c
+++ b/drivers/common/cnxk/roc_cpt_debug.c
@@ -191,28 +191,6 @@ roc_cpt_parse_hdr_dump(FILE *file, const union cpt_parse_hdr_u *cpth)
cpt_cnxk_parse_hdr_dump(file, &cpth->s);
}
-void
-roc_cpt_cq_dump(FILE *file, const struct cpt_cq_s *cq)
-{
- cpt_dump(file, "CPT_CQ \t%p:", cq);
-
- /* W0 */
- cpt_dump(file, "W0: compcode \t0x%x\t\tdoneint \t%u\t", cq->w0.s.compcode,
- cq->w0.s.doneint);
- cpt_dump(file, "W0: uc_compcode \t0x%x\t\tuc_info \t0%" PRIu64, cq->w0.s.uc_compcode,
- (uint64_t)cq->w0.s.uc_info);
-
- /* W1 */
- cpt_dump(file, "W1: esn \t%" PRIx64 "\t\n", cq->w1.esn);
-
- /* W2 */
- cpt_dump(file, "W2: fmt \t0x%x\t\tuc_info2 \t%" PRIu64, cq->w2.s.fmt,
- (uint64_t)cq->w2.s.uc_info2);
-
- /* W3 */
- cpt_dump(file, "W3: comp_ptr \t0x%" PRIx64 "\t\n", cq->w3.comp_ptr);
-}
-
static int
cpt_af_reg_read(struct roc_cpt *roc_cpt, uint64_t reg, uint64_t *val)
{
diff --git a/drivers/common/cnxk/roc_dpi.c b/drivers/common/cnxk/roc_dpi.c
index 7fd45f5918..7364d3a424 100644
--- a/drivers/common/cnxk/roc_dpi.c
+++ b/drivers/common/cnxk/roc_dpi.c
@@ -282,48 +282,6 @@ roc_dpi_disable(struct roc_dpi *roc_dpi)
return 0;
}
-int
-roc_dpi_configure(struct roc_dpi *roc_dpi, uint32_t chunk_sz, uint64_t aura, uint64_t chunk_base)
-{
- struct plt_pci_device *pci_dev;
- dpi_mbox_msg_t mbox_msg;
- int rc;
-
- if (!roc_dpi) {
- plt_err("roc_dpi is NULL");
- return -EINVAL;
- }
-
- pci_dev = roc_dpi->pci_dev;
-
- roc_dpi_disable(roc_dpi);
- rc = roc_dpi_wait_queue_idle(roc_dpi);
- if (rc)
- return rc;
-
- plt_write64(0x0, roc_dpi->rbase + DPI_VDMA_REQQ_CTL);
- plt_write64(chunk_base, roc_dpi->rbase + DPI_VDMA_SADDR);
- mbox_msg.u[0] = 0;
- mbox_msg.u[1] = 0;
- /* DPI PF driver expects vfid starts from index 0 */
- mbox_msg.s.vfid = roc_dpi->vfid;
- mbox_msg.s.pri = roc_dpi->priority;
- mbox_msg.s.cmd = DPI_QUEUE_OPEN;
- mbox_msg.s.csize = chunk_sz;
- mbox_msg.s.aura = aura;
- mbox_msg.s.sso_pf_func = idev_sso_pffunc_get();
- mbox_msg.s.npa_pf_func = idev_npa_pffunc_get();
- mbox_msg.s.wqecsoff = idev_dma_cs_offset_get();
- if (mbox_msg.s.wqecsoff)
- mbox_msg.s.wqecs = 1;
-
- rc = send_msg_to_pf(&pci_dev->addr, (const char *)&mbox_msg, sizeof(dpi_mbox_msg_t));
- if (rc < 0)
- plt_err("Failed to send mbox message %d to DPI PF, err %d", mbox_msg.s.cmd, rc);
-
- return rc;
-}
-
int
roc_dpi_configure_v2(struct roc_dpi *roc_dpi, uint32_t chunk_sz, uint64_t aura, uint64_t chunk_base)
{
@@ -487,30 +445,6 @@ roc_dpi_lf_chan_tbl_select(struct roc_dpi_lf *lf)
return rc;
}
-int
-roc_dpi_lf_chan_tbl_ena_dis(struct roc_dpi_lf *lf, bool ena)
-{
- struct mbox *mbox = mbox_get(lf->dev->mbox);
- struct dpi_lf_chan_tbl_ena_dis_req *req;
- int rc;
-
- req = mbox_alloc_msg_dpi_lf_chan_tbl_ena_dis(mbox);
- if (req == NULL) {
- rc = -ENOSPC;
- goto exit;
- }
-
- req->lf_slot = lf->slot;
- req->dpi_blkaddr = lf->blk_addr;
- req->ena_dis = ena;
-
- rc = mbox_process(mbox);
-
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
dpi_chan_tbl_update(struct dev *dev, uint8_t blk_addr, uint16_t chan_tbl, uint64_t *tbl,
uint16_t off, uint16_t nb_entries)
@@ -688,39 +622,6 @@ roc_dpi_lf_ring_init(struct roc_dpi_lf_que *que, struct roc_dpi_lf_ring_cfg *rcf
return rc;
}
-void
-roc_dpi_lf_ring_fini(struct roc_dpi_lf_que *que)
-{
- if (que->mz) {
- plt_memzone_free(que->mz);
- que->mz = NULL;
- }
-}
-
-int
-roc_dpi_lf_ring_chan_cfg(struct roc_dpi_lf_que *que, union roc_dpi_lf_ccfg *ccfg)
-{
- struct roc_dpi_lf *lf = que->lf;
- struct mbox *mbox = mbox_get(lf->dev->mbox);
- struct dpi_lf_chan_cfg_req *req;
- int rc = -ENOSPC;
-
- req = mbox_alloc_msg_dpi_lf_chan_cfg(mbox);
- if (req == NULL)
- goto fail;
-
- req->dpi_blkaddr = lf->blk_addr;
- req->def_config = ccfg->u;
- req->lf_slot = lf->slot;
- req->ring_idx = que == lf->queue ? 0 : 1;
-
- rc = mbox_process(mbox);
-
-fail:
- mbox_put(mbox);
- return rc;
-}
-
int
dpi_lf_init(struct roc_dpi_lf *lf, struct dev *dev, uint8_t slot)
{
diff --git a/drivers/common/cnxk/roc_dpi.h b/drivers/common/cnxk/roc_dpi.h
index 7d6281bb14..95335ef62a 100644
--- a/drivers/common/cnxk/roc_dpi.h
+++ b/drivers/common/cnxk/roc_dpi.h
@@ -79,8 +79,6 @@ int __roc_api roc_dpi_dev_fini(struct roc_dpi *roc_dpi);
int __roc_api roc_dpi_rsrc_init(struct roc_dpi *roc_dpi);
int __roc_api roc_dpi_rsrc_fini(struct roc_dpi *roc_dpi);
-int roc_dpi_configure(struct roc_dpi *dpi, uint32_t chunk_sz, uint64_t aura,
- uint64_t chunk_base);
int __roc_api roc_dpi_configure_v2(struct roc_dpi *roc_dpi, uint32_t chunk_sz, uint64_t aura,
uint64_t chunk_base);
int __roc_api roc_dpi_enable(struct roc_dpi *dpi);
@@ -89,13 +87,10 @@ int __roc_api roc_dpi_disable(struct roc_dpi *dpi);
int __roc_api roc_dpi_reset(struct roc_dpi *dpi);
int __roc_api roc_dpi_lf_ring_init(struct roc_dpi_lf_que *que, struct roc_dpi_lf_ring_cfg *rcfg);
-void roc_dpi_lf_ring_fini(struct roc_dpi_lf_que *que);
int __roc_api roc_dpi_lf_pffunc_cfg(struct roc_dpi_lf *lf);
-int roc_dpi_lf_ring_chan_cfg(struct roc_dpi_lf_que *que, union roc_dpi_lf_ccfg *cfg);
int __roc_api roc_dpi_lf_chan_tbl_alloc(struct roc_dpi_lf *lf, uint16_t tbl_sz);
int __roc_api roc_dpi_lf_chan_tbl_free(struct roc_dpi_lf *lf);
int __roc_api roc_dpi_lf_chan_tbl_select(struct roc_dpi_lf *lf);
-int roc_dpi_lf_chan_tbl_ena_dis(struct roc_dpi_lf *lf, bool ena);
int __roc_api roc_dpi_lf_chan_tbl_update(struct roc_dpi_lf *lf, uint64_t *config, uint16_t offset,
uint16_t entries);
int __roc_api roc_dpi_lf_dump(struct roc_dpi_lf *lf, FILE *file);
diff --git a/drivers/common/cnxk/roc_idev.c b/drivers/common/cnxk/roc_idev.c
index 17b99682fd..01510bf249 100644
--- a/drivers/common/cnxk/roc_idev.c
+++ b/drivers/common/cnxk/roc_idev.c
@@ -190,20 +190,6 @@ roc_idev_lmt_base_addr_get(void)
return lmt_base_addr;
}
-uint16_t
-roc_idev_num_lmtlines_get(void)
-{
- struct idev_cfg *idev;
- uint16_t num_lmtlines;
-
- idev = idev_get_cfg();
- num_lmtlines = 0;
- if (idev != NULL)
- num_lmtlines = idev->num_lmtlines;
-
- return num_lmtlines;
-}
-
struct roc_cpt *
roc_idev_cpt_get(void)
{
@@ -215,22 +201,6 @@ roc_idev_cpt_get(void)
return NULL;
}
-struct roc_rvu_lf *
-roc_idev_rvu_lf_get(uint8_t rvu_lf_idx)
-{
- struct idev_cfg *idev = idev_get_cfg();
- struct roc_rvu_lf *rvu_lf = NULL;
-
- if (idev != NULL) {
- TAILQ_FOREACH(rvu_lf, &idev->rvu_lf_list, next) {
- if (rvu_lf->idx == rvu_lf_idx)
- return rvu_lf;
- }
- }
-
- return NULL;
-}
-
void
roc_idev_rvu_lf_set(struct roc_rvu_lf *rvu)
{
@@ -393,16 +363,6 @@ idev_dma_cs_offset_get(void)
return 0;
}
-uint64_t
-roc_idev_nix_inl_meta_aura_get(void)
-{
- struct idev_cfg *idev = idev_get_cfg();
-
- if (idev != NULL)
- return idev->inl_cfg.meta_aura;
- return 0;
-}
-
uint8_t
roc_idev_nix_rx_inject_get(uint16_t port)
{
diff --git a/drivers/common/cnxk/roc_idev.h b/drivers/common/cnxk/roc_idev.h
index 3d272ec641..f3b00605d8 100644
--- a/drivers/common/cnxk/roc_idev.h
+++ b/drivers/common/cnxk/roc_idev.h
@@ -13,13 +13,11 @@ void __roc_api roc_idev_npa_halo_ena_set(int halo_ena);
/* LMT */
uint64_t __roc_api roc_idev_lmt_base_addr_get(void);
-uint16_t roc_idev_num_lmtlines_get(void);
struct roc_cpt *__roc_api roc_idev_cpt_get(void);
void roc_idev_cpt_set(struct roc_cpt *cpt);
struct roc_nix *__roc_api roc_idev_npa_nix_get(void);
-uint64_t roc_idev_nix_inl_meta_aura_get(void);
struct roc_nix_list *roc_idev_nix_list_get(void);
struct roc_mcs *roc_idev_mcs_get(uint8_t mcs_idx);
@@ -33,7 +31,7 @@ void roc_idev_nix_rx_chan_set(uint16_t port, uint16_t chan);
uint16_t __roc_api roc_idev_nix_inl_dev_pffunc_get(void);
-struct roc_rvu_lf *roc_idev_rvu_lf_get(uint8_t rvu_lf_idx);
+struct roc_rvu_lf;
void roc_idev_rvu_lf_set(struct roc_rvu_lf *rvu);
void roc_idev_rvu_lf_free(struct roc_rvu_lf *rvu);
#endif /* _ROC_IDEV_H_ */
diff --git a/drivers/common/cnxk/roc_mcs.c b/drivers/common/cnxk/roc_mcs.c
index 1b45f5dad9..5894750f7e 100644
--- a/drivers/common/cnxk/roc_mcs.c
+++ b/drivers/common/cnxk/roc_mcs.c
@@ -72,32 +72,6 @@ roc_mcs_hw_info_get(struct roc_mcs_hw_info *hw_info)
return rc;
}
-int
-roc_mcs_active_lmac_set(struct roc_mcs *mcs, struct roc_mcs_set_active_lmac *lmac)
-{
- struct mcs_set_active_lmac *req;
- struct msg_rsp *rsp;
-
- /* Only needed for 105N */
- if (!roc_model_is_cnf10kb())
- return 0;
-
- if (lmac == NULL)
- return -EINVAL;
-
- MCS_SUPPORT_CHECK;
-
- req = mbox_alloc_msg_mcs_set_active_lmac(mcs->mbox);
- if (req == NULL)
- return -ENOMEM;
-
- req->lmac_bmap = lmac->lmac_bmap;
- req->channel_base = lmac->channel_base;
- req->mcs_id = mcs->idx;
-
- return mbox_process_msg(mcs->mbox, (void *)&rsp);
-}
-
static int
mcs_port_reset_set(struct roc_mcs *mcs, struct roc_mcs_port_reset_req *port, uint8_t reset)
{
@@ -117,28 +91,6 @@ mcs_port_reset_set(struct roc_mcs *mcs, struct roc_mcs_port_reset_req *port, uin
return mbox_process_msg(mcs->mbox, (void *)&rsp);
}
-int
-roc_mcs_lmac_mode_set(struct roc_mcs *mcs, struct roc_mcs_set_lmac_mode *port)
-{
- struct mcs_set_lmac_mode *req;
- struct msg_rsp *rsp;
-
- if (port == NULL)
- return -EINVAL;
-
- MCS_SUPPORT_CHECK;
-
- req = mbox_alloc_msg_mcs_set_lmac_mode(mcs->mbox);
- if (req == NULL)
- return -ENOMEM;
-
- req->lmac_id = port->lmac_id;
- req->mcs_id = mcs->idx;
- req->mode = port->mode;
-
- return mbox_process_msg(mcs->mbox, (void *)&rsp);
-}
-
int
roc_mcs_pn_threshold_set(struct roc_mcs *mcs, struct roc_mcs_set_pn_threshold *pn)
{
@@ -162,181 +114,6 @@ roc_mcs_pn_threshold_set(struct roc_mcs *mcs, struct roc_mcs_set_pn_threshold *p
return mbox_process_msg(mcs->mbox, (void *)&rsp);
}
-int
-roc_mcs_ctrl_pkt_rule_alloc(struct roc_mcs *mcs, struct roc_mcs_alloc_ctrl_pkt_rule_req *req,
- struct roc_mcs_alloc_ctrl_pkt_rule_rsp *rsp)
-{
- struct mcs_alloc_ctrl_pkt_rule_req *rule_req;
- struct mcs_alloc_ctrl_pkt_rule_rsp *rule_rsp;
- int rc;
-
- MCS_SUPPORT_CHECK;
-
- if (req == NULL || rsp == NULL)
- return -EINVAL;
-
- rule_req = mbox_alloc_msg_mcs_alloc_ctrl_pkt_rule(mcs->mbox);
- if (rule_req == NULL)
- return -ENOMEM;
-
- rule_req->rule_type = req->rule_type;
- rule_req->mcs_id = mcs->idx;
- rule_req->dir = req->dir;
-
- rc = mbox_process_msg(mcs->mbox, (void *)&rule_rsp);
- if (rc)
- return rc;
-
- rsp->rule_type = rule_rsp->rule_type;
- rsp->rule_idx = rule_rsp->rule_idx;
- rsp->dir = rule_rsp->dir;
-
- return 0;
-}
-
-int
-roc_mcs_ctrl_pkt_rule_free(struct roc_mcs *mcs, struct roc_mcs_free_ctrl_pkt_rule_req *req)
-{
- struct mcs_free_ctrl_pkt_rule_req *rule_req;
- struct msg_rsp *rsp;
-
- MCS_SUPPORT_CHECK;
-
- if (req == NULL)
- return -EINVAL;
-
- rule_req = mbox_alloc_msg_mcs_free_ctrl_pkt_rule(mcs->mbox);
- if (rule_req == NULL)
- return -ENOMEM;
-
- rule_req->rule_type = req->rule_type;
- rule_req->rule_idx = req->rule_idx;
- rule_req->mcs_id = mcs->idx;
- rule_req->dir = req->dir;
- rule_req->all = req->all;
-
- return mbox_process_msg(mcs->mbox, (void *)&rsp);
-}
-
-int
-roc_mcs_ctrl_pkt_rule_write(struct roc_mcs *mcs, struct roc_mcs_ctrl_pkt_rule_write_req *req)
-{
- struct mcs_ctrl_pkt_rule_write_req *rule_req;
- struct msg_rsp *rsp;
-
- MCS_SUPPORT_CHECK;
-
- if (req == NULL)
- return -EINVAL;
-
- rule_req = mbox_alloc_msg_mcs_ctrl_pkt_rule_write(mcs->mbox);
- if (rule_req == NULL)
- return -ENOMEM;
-
- rule_req->rule_type = req->rule_type;
- rule_req->rule_idx = req->rule_idx;
- rule_req->mcs_id = mcs->idx;
- rule_req->dir = req->dir;
- rule_req->data0 = req->data0;
- rule_req->data1 = req->data1;
- rule_req->data2 = req->data2;
-
- return mbox_process_msg(mcs->mbox, (void *)&rsp);
-}
-
-int
-roc_mcs_port_cfg_set(struct roc_mcs *mcs, struct roc_mcs_port_cfg_set_req *req)
-{
- struct mcs_port_cfg_set_req *set_req;
- struct msg_rsp *rsp;
-
- MCS_SUPPORT_CHECK;
-
- if (req == NULL)
- return -EINVAL;
-
- set_req = mbox_alloc_msg_mcs_port_cfg_set(mcs->mbox);
- if (set_req == NULL)
- return -ENOMEM;
-
- set_req->cstm_tag_rel_mode_sel = req->cstm_tag_rel_mode_sel;
- set_req->custom_hdr_enb = req->custom_hdr_enb;
- set_req->fifo_skid = req->fifo_skid;
- set_req->lmac_mode = req->port_mode;
- set_req->lmac_id = req->port_id;
- set_req->mcs_id = mcs->idx;
-
- return mbox_process_msg(mcs->mbox, (void *)&rsp);
-}
-
-int
-roc_mcs_port_cfg_get(struct roc_mcs *mcs, struct roc_mcs_port_cfg_get_req *req,
- struct roc_mcs_port_cfg_get_rsp *rsp)
-{
- struct mcs_port_cfg_get_req *get_req;
- struct mcs_port_cfg_get_rsp *get_rsp;
- int rc;
-
- MCS_SUPPORT_CHECK;
-
- if (req == NULL)
- return -EINVAL;
-
- get_req = mbox_alloc_msg_mcs_port_cfg_get(mcs->mbox);
- if (get_req == NULL)
- return -ENOMEM;
-
- get_req->lmac_id = req->port_id;
- get_req->mcs_id = mcs->idx;
-
- rc = mbox_process_msg(mcs->mbox, (void *)&get_rsp);
- if (rc)
- return rc;
-
- rsp->cstm_tag_rel_mode_sel = get_rsp->cstm_tag_rel_mode_sel;
- rsp->custom_hdr_enb = get_rsp->custom_hdr_enb;
- rsp->fifo_skid = get_rsp->fifo_skid;
- rsp->port_mode = get_rsp->lmac_mode;
- rsp->port_id = get_rsp->lmac_id;
-
- return 0;
-}
-
-int
-roc_mcs_custom_tag_cfg_get(struct roc_mcs *mcs, struct roc_mcs_custom_tag_cfg_get_req *req,
- struct roc_mcs_custom_tag_cfg_get_rsp *rsp)
-{
- struct mcs_custom_tag_cfg_get_req *get_req;
- struct mcs_custom_tag_cfg_get_rsp *get_rsp;
- int i, rc;
-
- MCS_SUPPORT_CHECK;
-
- if (req == NULL)
- return -EINVAL;
-
- get_req = mbox_alloc_msg_mcs_custom_tag_cfg_get(mcs->mbox);
- if (get_req == NULL)
- return -ENOMEM;
-
- get_req->dir = req->dir;
- get_req->mcs_id = mcs->idx;
-
- rc = mbox_process_msg(mcs->mbox, (void *)&get_rsp);
- if (rc)
- return rc;
-
- for (i = 0; i < 8; i++) {
- rsp->cstm_etype[i] = get_rsp->cstm_etype[i];
- rsp->cstm_indx[i] = get_rsp->cstm_indx[i];
- }
-
- rsp->cstm_etype_en = get_rsp->cstm_etype_en;
- rsp->dir = get_rsp->dir;
-
- return 0;
-}
-
int
roc_mcs_intr_configure(struct roc_mcs *mcs, struct roc_mcs_intr_cfg *config)
{
@@ -605,36 +382,6 @@ roc_mcs_port_recovery(struct roc_mcs *mcs, union roc_mcs_event_data *mdata, uint
return rc;
}
-int
-roc_mcs_port_reset(struct roc_mcs *mcs, struct roc_mcs_port_reset_req *port)
-{
- struct roc_mcs_event_desc desc = {0};
- int rc;
-
- /* Initiate port reset and software recovery */
- rc = roc_mcs_port_recovery(mcs, &desc.metadata, port->port_id);
- if (rc)
- goto exit;
-
- desc.type = ROC_MCS_EVENT_PORT_RESET_RECOVERY;
- /* Notify the entity details to the application which are recovered */
- mcs_event_cb_process(mcs, &desc);
-
-exit:
- if (desc.metadata.num_tx_sa)
- plt_free(desc.metadata.tx_sa_array);
- if (desc.metadata.num_rx_sa)
- plt_free(desc.metadata.rx_sa_array);
- if (desc.metadata.num_tx_sc)
- plt_free(desc.metadata.tx_sc_array);
- if (desc.metadata.num_rx_sc) {
- plt_free(desc.metadata.rx_sc_array);
- plt_free(desc.metadata.sc_an_array);
- }
-
- return rc;
-}
-
int
roc_mcs_event_cb_register(struct roc_mcs *mcs, enum roc_mcs_event_type event,
roc_mcs_dev_cb_fn cb_fn, void *cb_arg, void *userdata)
diff --git a/drivers/common/cnxk/roc_mcs.h b/drivers/common/cnxk/roc_mcs.h
index eb50219561..bba7b855e6 100644
--- a/drivers/common/cnxk/roc_mcs.h
+++ b/drivers/common/cnxk/roc_mcs.h
@@ -508,22 +508,13 @@ __roc_api struct roc_mcs *roc_mcs_dev_get(uint8_t mcs_idx);
/* HW info get */
__roc_api int roc_mcs_hw_info_get(struct roc_mcs_hw_info *hw_info);
/* Active lmac bmap set */
-int roc_mcs_active_lmac_set(struct roc_mcs *mcs, struct roc_mcs_set_active_lmac *lmac);
/* Port bypass mode set */
-int roc_mcs_lmac_mode_set(struct roc_mcs *mcs, struct roc_mcs_set_lmac_mode *port);
/* (X)PN threshold set */
__roc_api int roc_mcs_pn_threshold_set(struct roc_mcs *mcs, struct roc_mcs_set_pn_threshold *pn);
/* Reset port */
-int roc_mcs_port_reset(struct roc_mcs *mcs, struct roc_mcs_port_reset_req *port);
/* Get port config */
-int roc_mcs_port_cfg_set(struct roc_mcs *mcs, struct roc_mcs_port_cfg_set_req *req);
/* Set port config */
-int roc_mcs_port_cfg_get(struct roc_mcs *mcs, struct roc_mcs_port_cfg_get_req *req,
- struct roc_mcs_port_cfg_get_rsp *rsp);
/* Get custom tag config */
-int roc_mcs_custom_tag_cfg_get(struct roc_mcs *mcs,
- struct roc_mcs_custom_tag_cfg_get_req *req,
- struct roc_mcs_custom_tag_cfg_get_rsp *rsp);
/* Resource allocation and free */
__roc_api int roc_mcs_rsrc_alloc(struct roc_mcs *mcs, struct roc_mcs_alloc_rsrc_req *req,
@@ -532,56 +523,31 @@ __roc_api int roc_mcs_rsrc_free(struct roc_mcs *mcs, struct roc_mcs_free_rsrc_re
/* SA policy read and write */
__roc_api int roc_mcs_sa_policy_write(struct roc_mcs *mcs,
struct roc_mcs_sa_plcy_write_req *sa_plcy);
-int roc_mcs_sa_policy_read(struct roc_mcs *mcs,
- struct roc_mcs_sa_plcy_write_req *sa_plcy);
/* PN Table read and write */
__roc_api int roc_mcs_pn_table_write(struct roc_mcs *mcs,
struct roc_mcs_pn_table_write_req *pn_table);
-int roc_mcs_pn_table_read(struct roc_mcs *mcs,
- struct roc_mcs_pn_table_write_req *pn_table);
/* RX SC read, write and enable */
__roc_api int roc_mcs_rx_sc_cam_write(struct roc_mcs *mcs,
struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam);
-int roc_mcs_rx_sc_cam_read(struct roc_mcs *mcs,
- struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam);
-int roc_mcs_rx_sc_cam_enable(struct roc_mcs *mcs,
- struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam);
/* SECY policy read and write */
__roc_api int roc_mcs_secy_policy_write(struct roc_mcs *mcs,
struct roc_mcs_secy_plcy_write_req *secy_plcy);
-int roc_mcs_secy_policy_read(struct roc_mcs *mcs,
- struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam);
/* RX SC-SA MAP read and write */
__roc_api int roc_mcs_rx_sc_sa_map_write(struct roc_mcs *mcs,
struct roc_mcs_rx_sc_sa_map *rx_sc_sa_map);
-int roc_mcs_rx_sc_sa_map_read(struct roc_mcs *mcs,
- struct roc_mcs_rx_sc_sa_map *rx_sc_sa_map);
/* TX SC-SA MAP read and write */
__roc_api int roc_mcs_tx_sc_sa_map_write(struct roc_mcs *mcs,
struct roc_mcs_tx_sc_sa_map *tx_sc_sa_map);
-int roc_mcs_tx_sc_sa_map_read(struct roc_mcs *mcs,
- struct roc_mcs_tx_sc_sa_map *tx_sc_sa_map);
/* SA to Port map update */
__roc_api void roc_mcs_sa_port_map_update(struct roc_mcs *mcs, int sa_id, uint8_t port_id);
/* Flow entry read, write and enable */
__roc_api int roc_mcs_flowid_entry_write(struct roc_mcs *mcs,
struct roc_mcs_flowid_entry_write_req *flowid_req);
-int roc_mcs_flowid_entry_read(struct roc_mcs *mcs,
- struct roc_mcs_flowid_entry_write_req *flowid_rsp);
-int roc_mcs_flowid_entry_enable(struct roc_mcs *mcs,
- struct roc_mcs_flowid_ena_dis_entry *entry);
/* Control packet rule alloc, free and write */
-int roc_mcs_ctrl_pkt_rule_alloc(struct roc_mcs *mcs,
- struct roc_mcs_alloc_ctrl_pkt_rule_req *req,
- struct roc_mcs_alloc_ctrl_pkt_rule_rsp *rsp);
-int roc_mcs_ctrl_pkt_rule_free(struct roc_mcs *mcs,
- struct roc_mcs_free_ctrl_pkt_rule_req *req);
-int roc_mcs_ctrl_pkt_rule_write(struct roc_mcs *mcs,
- struct roc_mcs_ctrl_pkt_rule_write_req *req);
/* Flow id stats get */
__roc_api int roc_mcs_flowid_stats_get(struct roc_mcs *mcs, struct roc_mcs_stats_req *mcs_req,
diff --git a/drivers/common/cnxk/roc_mcs_sec_cfg.c b/drivers/common/cnxk/roc_mcs_sec_cfg.c
index e2fd3e7b8c..5b8c3b27bd 100644
--- a/drivers/common/cnxk/roc_mcs_sec_cfg.c
+++ b/drivers/common/cnxk/roc_mcs_sec_cfg.c
@@ -201,15 +201,6 @@ roc_mcs_sa_policy_write(struct roc_mcs *mcs, struct roc_mcs_sa_plcy_write_req *s
return mbox_process_msg(mcs->mbox, (void *)&rsp);
}
-int
-roc_mcs_sa_policy_read(struct roc_mcs *mcs __plt_unused,
- struct roc_mcs_sa_plcy_write_req *sa __plt_unused)
-{
- MCS_SUPPORT_CHECK;
-
- return -ENOTSUP;
-}
-
int
roc_mcs_pn_table_write(struct roc_mcs *mcs, struct roc_mcs_pn_table_write_req *pn_table)
{
@@ -233,15 +224,6 @@ roc_mcs_pn_table_write(struct roc_mcs *mcs, struct roc_mcs_pn_table_write_req *p
return mbox_process_msg(mcs->mbox, (void *)&rsp);
}
-int
-roc_mcs_pn_table_read(struct roc_mcs *mcs __plt_unused,
- struct roc_mcs_pn_table_write_req *sa __plt_unused)
-{
- MCS_SUPPORT_CHECK;
-
- return -ENOTSUP;
-}
-
int
roc_mcs_rx_sc_cam_write(struct roc_mcs *mcs, struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam)
{
@@ -280,24 +262,6 @@ roc_mcs_rx_sc_cam_write(struct roc_mcs *mcs, struct roc_mcs_rx_sc_cam_write_req
return 0;
}
-int
-roc_mcs_rx_sc_cam_read(struct roc_mcs *mcs __plt_unused,
- struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam __plt_unused)
-{
- MCS_SUPPORT_CHECK;
-
- return -ENOTSUP;
-}
-
-int
-roc_mcs_rx_sc_cam_enable(struct roc_mcs *mcs __plt_unused,
- struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam __plt_unused)
-{
- MCS_SUPPORT_CHECK;
-
- return -ENOTSUP;
-}
-
int
roc_mcs_secy_policy_write(struct roc_mcs *mcs, struct roc_mcs_secy_plcy_write_req *secy_plcy)
{
@@ -321,15 +285,6 @@ roc_mcs_secy_policy_write(struct roc_mcs *mcs, struct roc_mcs_secy_plcy_write_re
return mbox_process_msg(mcs->mbox, (void *)&rsp);
}
-int
-roc_mcs_secy_policy_read(struct roc_mcs *mcs __plt_unused,
- struct roc_mcs_rx_sc_cam_write_req *rx_sc_cam __plt_unused)
-{
- MCS_SUPPORT_CHECK;
-
- return -ENOTSUP;
-}
-
int
roc_mcs_rx_sc_sa_map_write(struct roc_mcs *mcs, struct roc_mcs_rx_sc_sa_map *rx_sc_sa_map)
{
@@ -373,15 +328,6 @@ roc_mcs_rx_sc_sa_map_write(struct roc_mcs *mcs, struct roc_mcs_rx_sc_sa_map *rx_
return 0;
}
-int
-roc_mcs_rx_sc_sa_map_read(struct roc_mcs *mcs __plt_unused,
- struct roc_mcs_rx_sc_sa_map *rx_sc_sa_map __plt_unused)
-{
- MCS_SUPPORT_CHECK;
-
- return -ENOTSUP;
-}
-
int
roc_mcs_tx_sc_sa_map_write(struct roc_mcs *mcs, struct roc_mcs_tx_sc_sa_map *tx_sc_sa_map)
{
@@ -435,15 +381,6 @@ roc_mcs_tx_sc_sa_map_write(struct roc_mcs *mcs, struct roc_mcs_tx_sc_sa_map *tx_
return 0;
}
-int
-roc_mcs_tx_sc_sa_map_read(struct roc_mcs *mcs __plt_unused,
- struct roc_mcs_tx_sc_sa_map *tx_sc_sa_map __plt_unused)
-{
- MCS_SUPPORT_CHECK;
-
- return -ENOTSUP;
-}
-
int
roc_mcs_flowid_entry_write(struct roc_mcs *mcs, struct roc_mcs_flowid_entry_write_req *flowid_req)
{
@@ -495,38 +432,6 @@ roc_mcs_flowid_entry_write(struct roc_mcs *mcs, struct roc_mcs_flowid_entry_writ
return 0;
}
-int
-roc_mcs_flowid_entry_read(struct roc_mcs *mcs __plt_unused,
- struct roc_mcs_flowid_entry_write_req *flowid_rsp __plt_unused)
-{
- MCS_SUPPORT_CHECK;
-
- return -ENOTSUP;
-}
-
-int
-roc_mcs_flowid_entry_enable(struct roc_mcs *mcs, struct roc_mcs_flowid_ena_dis_entry *entry)
-{
- struct mcs_flowid_ena_dis_entry *flow_entry;
- struct msg_rsp *rsp;
-
- MCS_SUPPORT_CHECK;
-
- if (entry == NULL)
- return -EINVAL;
-
- flow_entry = mbox_alloc_msg_mcs_flowid_ena_entry(mcs->mbox);
- if (flow_entry == NULL)
- return -ENOMEM;
-
- flow_entry->flow_id = entry->flow_id;
- flow_entry->ena = entry->ena;
- flow_entry->mcs_id = mcs->idx;
- flow_entry->dir = entry->dir;
-
- return mbox_process_msg(mcs->mbox, (void *)&rsp);
-}
-
void
roc_mcs_sa_port_map_update(struct roc_mcs *mcs, int sa_id, uint8_t port_id)
{
diff --git a/drivers/common/cnxk/roc_ml.c b/drivers/common/cnxk/roc_ml.c
index e82bb58943..6f9869125a 100644
--- a/drivers/common/cnxk/roc_ml.c
+++ b/drivers/common/cnxk/roc_ml.c
@@ -94,44 +94,6 @@ roc_ml_addr_mlip2ap(struct roc_ml *roc_ml, void *addr)
return PLT_PTR_ADD(addr, ml_mlr_base - ML_AXI_START_ADDR);
}
-uint64_t
-roc_ml_addr_pa_to_offset(struct roc_ml *roc_ml, uint64_t phys_addr)
-{
- struct ml *ml = roc_ml_to_ml_priv(roc_ml);
-
- if (roc_model_is_cn10ka())
- return phys_addr - ml->pci_dev->mem_resource[0].phys_addr;
- else
- return phys_addr - ml->pci_dev->mem_resource[0].phys_addr - ML_MLAB_BLK_OFFSET;
-}
-
-uint64_t
-roc_ml_addr_offset_to_pa(struct roc_ml *roc_ml, uint64_t offset)
-{
- struct ml *ml = roc_ml_to_ml_priv(roc_ml);
-
- if (roc_model_is_cn10ka())
- return ml->pci_dev->mem_resource[0].phys_addr + offset;
- else
- return ml->pci_dev->mem_resource[0].phys_addr + ML_MLAB_BLK_OFFSET + offset;
-}
-
-void
-roc_ml_scratch_write_job(struct roc_ml *roc_ml, void *work_ptr)
-{
- union ml_scratch_work_ptr_s reg_work_ptr;
- union ml_scratch_fw_ctrl_s reg_fw_ctrl;
-
- reg_work_ptr.u64 = 0;
- reg_work_ptr.s.work_ptr = PLT_U64_CAST(roc_ml_addr_ap2mlip(roc_ml, work_ptr));
-
- reg_fw_ctrl.u64 = 0;
- reg_fw_ctrl.s.valid = 1;
-
- roc_ml_reg_write64(roc_ml, reg_work_ptr.u64, ML_SCRATCH_WORK_PTR);
- roc_ml_reg_write64(roc_ml, reg_fw_ctrl.u64, ML_SCRATCH_FW_CTRL);
-}
-
bool
roc_ml_scratch_is_valid_bit_set(struct roc_ml *roc_ml)
{
@@ -567,62 +529,3 @@ roc_ml_dev_fini(struct roc_ml *roc_ml)
return 0;
}
-
-int
-roc_ml_blk_init(struct roc_bphy *roc_bphy, struct roc_ml *roc_ml)
-{
- struct dev *dev;
- struct ml *ml;
-
- if ((roc_ml == NULL) || (roc_bphy == NULL))
- return -EINVAL;
-
- PLT_STATIC_ASSERT(sizeof(struct ml) <= ROC_ML_MEM_SZ);
-
- ml = roc_ml_to_ml_priv(roc_ml);
- memset(ml, 0, sizeof(*ml));
-
- dev = &ml->dev;
-
- ml->pci_dev = roc_bphy->pci_dev;
- dev->roc_ml = roc_ml;
-
- plt_ml_dbg(
- "MLAB: Physical Address : 0x%016lx",
- PLT_PTR_ADD_U64_CAST(
- (void *)(uintptr_t)(ml->pci_dev->mem_resource[0].phys_addr),
- ML_MLAB_BLK_OFFSET));
- plt_ml_dbg("MLAB: Virtual Address : 0x%016lx",
- PLT_PTR_ADD_U64_CAST(ml->pci_dev->mem_resource[0].addr, ML_MLAB_BLK_OFFSET));
-
- ml->ml_reg_addr = PLT_PTR_ADD(ml->pci_dev->mem_resource[0].addr, ML_MLAB_BLK_OFFSET);
- ml->ml_mlr_base = 0;
- ml->ml_mlr_base_saved = false;
-
- plt_spinlock_init(&roc_ml->sp_spinlock);
- plt_spinlock_init(&roc_ml->fp_spinlock);
-
- return 0;
-}
-
-int
-roc_ml_blk_fini(struct roc_bphy *roc_bphy, struct roc_ml *roc_ml)
-{
- struct ml *ml;
-
- if ((roc_ml == NULL) || (roc_bphy == NULL))
- return -EINVAL;
-
- ml = roc_ml_to_ml_priv(roc_ml);
-
- if (ml == NULL)
- return -EINVAL;
-
- return 0;
-}
-
-uint16_t
-roc_ml_sso_pf_func_get(void)
-{
- return idev_sso_pffunc_get();
-}
diff --git a/drivers/common/cnxk/roc_ml.h b/drivers/common/cnxk/roc_ml.h
index 8d4f5b5097..43cb7e9c3a 100644
--- a/drivers/common/cnxk/roc_ml.h
+++ b/drivers/common/cnxk/roc_ml.h
@@ -117,13 +117,10 @@ void __roc_api roc_ml_reg_write32(struct roc_ml *roc_ml, uint32_t val, uint64_t
void __roc_api roc_ml_reg_save(struct roc_ml *roc_ml, uint64_t offset);
/* Address translation functions */
-uint64_t roc_ml_addr_pa_to_offset(struct roc_ml *roc_ml, uint64_t phys_addr);
-uint64_t roc_ml_addr_offset_to_pa(struct roc_ml *roc_ml, uint64_t offset);
void *__roc_api roc_ml_addr_ap2mlip(struct roc_ml *roc_ml, void *addr);
void *__roc_api roc_ml_addr_mlip2ap(struct roc_ml *roc_ml, void *addr);
/* Scratch and JCMDQ functions */
-void roc_ml_scratch_write_job(struct roc_ml *roc_ml, void *jd);
bool roc_ml_scratch_is_valid_bit_set(struct roc_ml *roc_ml);
bool __roc_api roc_ml_scratch_is_done_bit_set(struct roc_ml *roc_ml);
bool __roc_api roc_ml_scratch_enqueue(struct roc_ml *roc_ml, void *work_ptr);
@@ -143,10 +140,7 @@ int __roc_api roc_ml_mlip_reset(struct roc_ml *roc_ml, bool force);
/* Device / block functions */
int __roc_api roc_ml_dev_init(struct roc_ml *roc_ml);
int __roc_api roc_ml_dev_fini(struct roc_ml *roc_ml);
-int roc_ml_blk_init(struct roc_bphy *roc_bphy, struct roc_ml *roc_ml);
-int roc_ml_blk_fini(struct roc_bphy *roc_bphy, struct roc_ml *roc_ml);
/* Utility functions */
-uint16_t roc_ml_sso_pf_func_get(void);
#endif /*_ROC_ML_H_*/
diff --git a/drivers/common/cnxk/roc_nix.c b/drivers/common/cnxk/roc_nix.c
index ae6a918682..ce957d061f 100644
--- a/drivers/common/cnxk/roc_nix.c
+++ b/drivers/common/cnxk/roc_nix.c
@@ -30,14 +30,6 @@ roc_nix_get_base_chan(struct roc_nix *roc_nix)
return nix->rx_chan_base;
}
-uint8_t
-roc_nix_get_rx_chan_cnt(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- return nix->rx_chan_cnt;
-}
-
uint16_t
roc_nix_get_vwqe_interval(struct roc_nix *roc_nix)
{
diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index 6afc4e4922..f3729f5e77 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -667,7 +667,6 @@ bool __roc_api roc_nix_is_sdp(struct roc_nix *roc_nix);
bool __roc_api roc_nix_is_pf(struct roc_nix *roc_nix);
bool __roc_api roc_nix_is_vf_or_sdp(struct roc_nix *roc_nix);
int __roc_api roc_nix_get_base_chan(struct roc_nix *roc_nix);
-uint8_t roc_nix_get_rx_chan_cnt(struct roc_nix *roc_nix);
int __roc_api roc_nix_get_pf(struct roc_nix *roc_nix);
int __roc_api roc_nix_get_vf(struct roc_nix *roc_nix);
uint16_t __roc_api roc_nix_get_pf_func(struct roc_nix *roc_nix);
@@ -812,7 +811,6 @@ int __roc_api roc_nix_tm_node_add(struct roc_nix *roc_nix,
struct roc_nix_tm_node *roc_node);
int __roc_api roc_nix_tm_node_delete(struct roc_nix *roc_nix, uint32_t node_id,
bool free);
-int roc_nix_tm_free_resources(struct roc_nix *roc_nix, bool hw_only);
int __roc_api roc_nix_tm_node_suspend_resume(struct roc_nix *roc_nix,
uint32_t node_id, bool suspend);
int __roc_api roc_nix_tm_node_parent_update(struct roc_nix *roc_nix,
@@ -823,27 +821,17 @@ int __roc_api roc_nix_tm_node_shaper_update(struct roc_nix *roc_nix,
uint32_t node_id,
uint32_t profile_id,
bool force_update);
-int roc_nix_tm_node_pkt_mode_update(struct roc_nix *roc_nix,
- uint32_t node_id, bool pkt_mode);
int __roc_api roc_nix_tm_shaper_profile_add(
struct roc_nix *roc_nix, struct roc_nix_tm_shaper_profile *profile);
-int roc_nix_tm_shaper_profile_update(
- struct roc_nix *roc_nix, struct roc_nix_tm_shaper_profile *profile);
int __roc_api roc_nix_tm_shaper_profile_delete(struct roc_nix *roc_nix,
uint32_t id);
-int roc_nix_tm_prealloc_res(struct roc_nix *roc_nix, uint8_t lvl,
- uint16_t discontig, uint16_t contig);
uint16_t __roc_api roc_nix_tm_leaf_cnt(struct roc_nix *roc_nix);
struct roc_nix_tm_node *__roc_api roc_nix_tm_node_get(struct roc_nix *roc_nix,
uint32_t node_id);
-struct roc_nix_tm_node *
-roc_nix_tm_node_next(struct roc_nix *roc_nix, struct roc_nix_tm_node *__prev);
struct roc_nix_tm_shaper_profile *__roc_api
roc_nix_tm_shaper_profile_get(struct roc_nix *roc_nix, uint32_t profile_id);
-struct roc_nix_tm_shaper_profile *roc_nix_tm_shaper_profile_next(
- struct roc_nix *roc_nix, struct roc_nix_tm_shaper_profile *__prev);
int __roc_api roc_nix_tm_node_stats_get(struct roc_nix *roc_nix,
uint32_t node_id, bool clear,
@@ -871,15 +859,8 @@ int roc_nix_tm_hierarchy_xmit_enable(struct roc_nix *roc_nix, enum roc_nix_tm_tr
/*
* TM utilities API.
*/
-int roc_nix_tm_node_lvl(struct roc_nix *roc_nix, uint32_t node_id);
-bool roc_nix_tm_root_has_sp(struct roc_nix *roc_nix);
-void roc_nix_tm_rsrc_max(bool pf, uint16_t schq[ROC_TM_LVL_MAX]);
int __roc_api roc_nix_tm_rsrc_count(struct roc_nix *roc_nix,
uint16_t schq[ROC_TM_LVL_MAX]);
-int roc_nix_tm_node_name_get(struct roc_nix *roc_nix,
- uint32_t node_id, char *buf,
- size_t buflen);
-int roc_nix_smq_flush(struct roc_nix *roc_nix);
int __roc_api roc_nix_tm_max_prio(struct roc_nix *roc_nix, int lvl);
int __roc_api roc_nix_tm_lvl_is_leaf(struct roc_nix *roc_nix, int lvl);
void __roc_api
@@ -916,8 +897,6 @@ int __roc_api roc_nix_bpf_free(struct roc_nix *roc_nix,
struct roc_nix_bpf_objs *profs,
uint8_t num_prof);
-int roc_nix_bpf_free_all(struct roc_nix *roc_nix);
-
int __roc_api roc_nix_bpf_config(struct roc_nix *roc_nix, uint16_t id,
enum roc_nix_bpf_level_flag lvl_flag,
struct roc_nix_bpf_cfg *cfg);
@@ -925,9 +904,6 @@ int __roc_api roc_nix_bpf_config(struct roc_nix *roc_nix, uint16_t id,
int __roc_api roc_nix_bpf_ena_dis(struct roc_nix *roc_nix, uint16_t id,
struct roc_nix_rq *rq, bool enable);
-int roc_nix_bpf_dump(struct roc_nix *roc_nix, uint16_t id,
- enum roc_nix_bpf_level_flag lvl_flag);
-
int __roc_api roc_nix_bpf_pre_color_tbl_setup(
struct roc_nix *roc_nix, uint16_t id,
enum roc_nix_bpf_level_flag lvl_flag, struct roc_nix_bpf_precolor *tbl);
@@ -946,20 +922,12 @@ int __roc_api roc_nix_bpf_stats_reset(struct roc_nix *roc_nix, uint16_t id,
uint64_t mask,
enum roc_nix_bpf_level_flag lvl_flag);
-int
-roc_nix_bpf_lf_stats_read(struct roc_nix *roc_nix, uint64_t mask,
- uint64_t stats[ROC_NIX_BPF_STATS_MAX] /* Out */);
-
-int roc_nix_bpf_lf_stats_reset(struct roc_nix *roc_nix,
- uint64_t mask);
-
uint8_t __roc_api
roc_nix_bpf_level_to_idx(enum roc_nix_bpf_level_flag lvl_flag);
uint8_t __roc_api roc_nix_bpf_stats_to_idx(enum roc_nix_bpf_stats lvl_flag);
/* MAC */
-int roc_nix_mac_rxtx_start_stop(struct roc_nix *roc_nix, bool start);
int __roc_api roc_nix_mac_link_event_start_stop(struct roc_nix *roc_nix,
bool start);
int __roc_api roc_nix_mac_loopback_enable(struct roc_nix *roc_nix, bool enable);
@@ -977,7 +945,6 @@ int __roc_api roc_nix_mac_link_info_get(struct roc_nix *roc_nix,
struct roc_nix_link_info *link_info);
int __roc_api roc_nix_mac_fec_set(struct roc_nix *roc_nix, int fec);
int __roc_api roc_nix_mac_fec_supported_get(struct roc_nix *roc_nix, uint64_t *supported_fec);
-int roc_nix_mac_mtu_set(struct roc_nix *roc_nix, uint16_t mtu);
int __roc_api roc_nix_mac_max_rx_len_set(struct roc_nix *roc_nix,
uint16_t maxlen);
int __roc_api roc_nix_mac_link_cb_register(struct roc_nix *roc_nix,
@@ -985,9 +952,7 @@ int __roc_api roc_nix_mac_link_cb_register(struct roc_nix *roc_nix,
void __roc_api roc_nix_mac_link_cb_unregister(struct roc_nix *roc_nix);
int __roc_api roc_nix_mac_link_info_get_cb_register(
struct roc_nix *roc_nix, link_info_get_t link_info_get);
-void roc_nix_mac_link_info_get_cb_unregister(struct roc_nix *roc_nix);
int __roc_api roc_nix_q_err_cb_register(struct roc_nix *roc_nix, q_err_get_t sq_err_handle);
-void roc_nix_q_err_cb_unregister(struct roc_nix *roc_nix);
int __roc_api roc_nix_mac_stats_reset(struct roc_nix *roc_nix);
int __roc_api roc_nix_mac_fwdata_get(struct roc_nix *roc_nix, struct roc_nix_mac_fwdata *fwdata);
@@ -998,9 +963,6 @@ int __roc_api roc_nix_switch_hdr_set(struct roc_nix *roc_nix, uint64_t switch_he
int __roc_api roc_nix_lso_fmt_setup(struct roc_nix *roc_nix);
int __roc_api roc_nix_lso_fmt_get(struct roc_nix *roc_nix, uint8_t udp_tun[ROC_NIX_LSO_TUN_MAX],
uint8_t tun[ROC_NIX_LSO_TUN_MAX]);
-int roc_nix_lso_fmt_ipv4_frag_get(struct roc_nix *roc_nix);
-int roc_nix_lso_custom_fmt_setup(struct roc_nix *roc_nix, struct nix_lso_format *fields,
- uint16_t nb_fields);
int roc_nix_lso_alt_flags_profile_setup(struct roc_nix *roc_nix,
nix_lso_alt_flg_format_t *fmt);
@@ -1011,18 +973,12 @@ int __roc_api roc_nix_eeprom_info_get(struct roc_nix *roc_nix,
int __roc_api roc_nix_fc_config_set(struct roc_nix *roc_nix,
struct roc_nix_fc_cfg *fc_cfg);
-int roc_nix_fc_config_get(struct roc_nix *roc_nix,
- struct roc_nix_fc_cfg *fc_cfg);
-
int __roc_api roc_nix_fc_mode_set(struct roc_nix *roc_nix,
enum roc_nix_fc_mode mode);
int __roc_api roc_nix_pfc_mode_set(struct roc_nix *roc_nix,
struct roc_nix_pfc_cfg *pfc_cfg);
-int roc_nix_pfc_mode_get(struct roc_nix *roc_nix,
- struct roc_nix_pfc_cfg *pfc_cfg);
-
uint16_t __roc_api roc_nix_chan_count_get(struct roc_nix *roc_nix);
enum roc_nix_fc_mode __roc_api roc_nix_fc_mode_get(struct roc_nix *roc_nix);
@@ -1031,8 +987,6 @@ void roc_nix_fc_npa_bp_cfg(struct roc_nix *roc_nix, uint64_t pool_id, uint8_t en
uint8_t force, uint8_t tc, uint64_t drop_percent);
int roc_nix_bpids_alloc(struct roc_nix *roc_nix, uint8_t type,
uint8_t bp_cnt, uint16_t *bpids);
-int roc_nix_bpids_free(struct roc_nix *roc_nix, uint8_t bp_cnt,
- uint16_t *bpids);
int roc_nix_rx_chan_cfg_get(struct roc_nix *roc_nix, uint16_t chan,
bool is_cpt, uint64_t *cfg);
int roc_nix_rx_chan_cfg_set(struct roc_nix *roc_nix, uint16_t chan,
@@ -1080,7 +1034,6 @@ int __roc_api roc_nix_stats_queue_get(struct roc_nix *roc_nix, uint16_t qid,
struct roc_nix_stats_queue *qstats);
int __roc_api roc_nix_stats_queue_reset(struct roc_nix *roc_nix, uint16_t qid,
bool is_rx);
-int roc_nix_num_xstats_get(struct roc_nix *roc_nix);
int __roc_api roc_nix_xstats_get(struct roc_nix *roc_nix,
struct roc_nix_xstat *xstats, unsigned int n);
int __roc_api roc_nix_xstats_names_get(struct roc_nix *roc_nix,
@@ -1094,9 +1047,6 @@ int __roc_api roc_nix_rq_modify(struct roc_nix *roc_nix, struct roc_nix_rq *rq,
bool ena);
int __roc_api roc_nix_rq_cman_config(struct roc_nix *roc_nix, struct roc_nix_rq *rq);
int __roc_api roc_nix_rq_ena_dis(struct roc_nix_rq *rq, bool enable);
-int roc_nix_rq_multi_ena_dis(struct roc_nix *roc_nix, struct roc_nix_rq *rqs,
- int nb_rx_queues, bool enable);
-int roc_nix_rq_is_sso_enable(struct roc_nix *roc_nix, uint32_t qid);
int __roc_api roc_nix_rq_fini(struct roc_nix_rq *rq);
int __roc_api roc_nix_cq_init(struct roc_nix *roc_nix, struct roc_nix_cq *cq);
int __roc_api roc_nix_cq_fini(struct roc_nix_cq *cq);
@@ -1108,7 +1058,6 @@ int __roc_api roc_nix_sq_ena_dis(struct roc_nix_sq *sq, bool enable);
void __roc_api roc_nix_sq_head_tail_get(struct roc_nix *roc_nix, uint16_t qid,
uint32_t *head, uint32_t *tail);
int roc_nix_sq_cnt_update(struct roc_nix_sq *sq, bool enable);
-int roc_nix_sq_resize(struct roc_nix_sq *sq, uint32_t nb_desc);
/* PTP */
int __roc_api roc_nix_ptp_rx_ena_dis(struct roc_nix *roc_nix, int enable);
@@ -1119,41 +1068,11 @@ int __roc_api roc_nix_ptp_sync_time_adjust(struct roc_nix *roc_nix,
int64_t delta);
int __roc_api roc_nix_ptp_info_cb_register(struct roc_nix *roc_nix,
ptp_info_update_t ptp_update);
-void roc_nix_ptp_info_cb_unregister(struct roc_nix *roc_nix);
bool __roc_api roc_nix_ptp_is_enable(struct roc_nix *roc_nix);
/* VLAN */
-int
-roc_nix_vlan_mcam_entry_read(struct roc_nix *roc_nix, uint32_t index,
- void **rsp);
-int roc_nix_vlan_mcam_entry_write(struct roc_nix *roc_nix, uint32_t index, void *entry,
- uint8_t intf, uint8_t enable);
-int roc_nix_vlan_mcam_entry_alloc_and_write(struct roc_nix *roc_nix, void *entry,
- uint8_t intf, uint8_t priority,
- uint8_t ref_entry);
-int roc_nix_vlan_mcam_entry_free(struct roc_nix *roc_nix,
- uint32_t index);
-int roc_nix_vlan_mcam_entry_ena_dis(struct roc_nix *roc_nix,
- uint32_t index, const int enable);
-int roc_nix_vlan_strip_vtag_ena_dis(struct roc_nix *roc_nix,
- bool enable);
-int roc_nix_vlan_insert_ena_dis(struct roc_nix *roc_nix,
- struct roc_nix_vlan_config *vlan_cfg,
- uint64_t *mcam_index, bool enable);
-int roc_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type,
- uint16_t tpid);
/* MCAST*/
-int roc_nix_mcast_mcam_entry_alloc(struct roc_nix *roc_nix,
- uint16_t nb_entries,
- uint8_t priority,
- uint16_t index[]);
-int roc_nix_mcast_mcam_entry_free(struct roc_nix *roc_nix,
- uint32_t index);
-int roc_nix_mcast_mcam_entry_write(struct roc_nix *roc_nix, void *entry, uint32_t index,
- uint8_t intf, uint64_t action);
-int roc_nix_mcast_mcam_entry_ena_dis(struct roc_nix *roc_nix, uint32_t index,
- bool enable);
int roc_nix_mcast_list_setup(struct mbox *mbox, uint8_t intf, int nb_entries,
uint16_t *pf_funcs, uint16_t *channels, uint32_t *rqs,
uint32_t *grp_index, uint32_t *start_index);
diff --git a/drivers/common/cnxk/roc_nix_bpf.c b/drivers/common/cnxk/roc_nix_bpf.c
index 5de4fc3efe..790c6c2ae2 100644
--- a/drivers/common/cnxk/roc_nix_bpf.c
+++ b/drivers/common/cnxk/roc_nix_bpf.c
@@ -99,60 +99,6 @@ meter_burst_to_nix(uint64_t value, uint64_t *exponent_p, uint64_t *mantissa_p)
return NIX_BPF_BURST(exponent, mantissa);
}
-static inline void
-nix_lf_bpf_dump(__io struct nix_band_prof_s *bpf)
-{
- plt_dump("W0: cir_mantissa \t\t\t%d\nW0: pebs_mantissa \t\t\t0x%03x",
- bpf->cir_mantissa, bpf->pebs_mantissa);
- plt_dump("W0: peir_mantissa \t\t\t\t%d\nW0: cbs_exponent \t\t\t%d",
- bpf->peir_mantissa, bpf->cbs_exponent);
- plt_dump("W0: cir_exponent \t\t\t%d\nW0: pebs_exponent \t\t\t%d",
- bpf->cir_exponent, bpf->pebs_exponent);
- plt_dump("W0: peir_exponent \t\t\t%d\n", bpf->peir_exponent);
- plt_dump("W0: tnl_ena \t\t\t%d\n", bpf->tnl_ena);
- plt_dump("W0: icolor \t\t\t%d\n", bpf->icolor);
- plt_dump("W0: pc_mode \t\t\t%d\n", bpf->pc_mode);
- plt_dump("W1: hl_en \t\t%d\nW1: band_prof_id \t\t%d", bpf->hl_en,
- bpf->band_prof_id);
- plt_dump("W1: meter_algo \t\t%d\nW1: rc_action \t\t%d", bpf->meter_algo,
- bpf->rc_action);
- plt_dump("W1: yc_action \t\t\t%d\nW1: gc_action \t\t\t%d",
- bpf->yc_action, bpf->gc_action);
- plt_dump("W1: adjust_mantissa\t\t\t%d\nW1: adjust_exponent \t\t\t%d",
- bpf->adjust_mantissa, bpf->adjust_exponent);
- plt_dump("W1: rdiv \t\t\t%d\n", bpf->rdiv);
- plt_dump("W1: l_select \t\t%d\nW2: lmode \t\t%d", bpf->l_sellect,
- bpf->lmode);
- plt_dump("W1: cbs_mantissa \t\t\t%d\n", bpf->cbs_mantissa);
- plt_dump("W2: tsa \t\t\t0x%" PRIx64 "\n", (uint64_t)bpf->ts);
- plt_dump("W3: c_accum \t\t%d\nW3: pe_accum \t\t%d", bpf->c_accum,
- bpf->pe_accum);
- plt_dump("W4: green_pkt_pass \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->green_pkt_pass);
- plt_dump("W5: yellow_pkt_pass \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->yellow_pkt_pass);
- plt_dump("W6: red_pkt_pass \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->red_pkt_pass);
- plt_dump("W7: green_octs_pass \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->green_octs_pass);
- plt_dump("W8: yellow_octs_pass \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->yellow_octs_pass);
- plt_dump("W9: red_octs_pass \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->red_octs_pass);
- plt_dump("W10: green_pkt_drop \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->green_pkt_drop);
- plt_dump("W11: yellow_pkt_drop \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->yellow_pkt_drop);
- plt_dump("W12: red_pkt_drop \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->red_pkt_drop);
- plt_dump("W13: green_octs_drop \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->green_octs_drop);
- plt_dump("W14: yellow_octs_drop \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->yellow_octs_drop);
- plt_dump("W15: red_octs_drop \t\t\t0x%" PRIx64 "",
- (uint64_t)bpf->red_octs_drop);
-}
-
static inline void
nix_precolor_conv_table_write(struct roc_nix *roc_nix, uint64_t val,
uint32_t off)
@@ -518,28 +464,6 @@ roc_nix_bpf_free(struct roc_nix *roc_nix, struct roc_nix_bpf_objs *profs,
return rc;
}
-int
-roc_nix_bpf_free_all(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct nix_bandprof_free_req *req;
- int rc;
-
- req = mbox_alloc_msg_nix_bandprof_free(mbox);
- if (req == NULL) {
- rc = -ENOSPC;
- goto exit;
- }
-
- req->free_all = true;
- rc = mbox_process(mbox);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
roc_nix_bpf_config(struct roc_nix *roc_nix, uint16_t id,
enum roc_nix_bpf_level_flag lvl_flag,
@@ -789,69 +713,6 @@ roc_nix_bpf_ena_dis(struct roc_nix *roc_nix, uint16_t id, struct roc_nix_rq *rq,
return rc;
}
-int
-roc_nix_bpf_dump(struct roc_nix *roc_nix, uint16_t id,
- enum roc_nix_bpf_level_flag lvl_flag)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- volatile struct nix_band_prof_s *prof;
- uint8_t level_idx;
- int rc;
-
- if (roc_model_is_cn9k()) {
- rc = NIX_ERR_HW_NOTSUP;
- goto exit;
- }
-
- level_idx = roc_nix_bpf_level_to_idx(lvl_flag);
- if (level_idx == ROC_NIX_BPF_LEVEL_IDX_INVALID) {
- rc = NIX_ERR_PARAM;
- goto exit;
- }
- if (roc_model_is_cn10k()) {
- struct nix_cn10k_aq_enq_rsp *rsp;
- struct nix_cn10k_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
- if (aq == NULL) {
- rc = -ENOSPC;
- goto exit;
- }
- aq->qidx = (sw_to_hw_lvl_map[level_idx] << 14 | id);
- aq->ctype = NIX_AQ_CTYPE_BAND_PROF;
- aq->op = NIX_AQ_INSTOP_READ;
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
- prof = &rsp->prof;
- } else {
- struct nix_cn20k_aq_enq_rsp *rsp;
- struct nix_cn20k_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_cn20k_aq_enq(mbox);
- if (aq == NULL) {
- rc = -ENOSPC;
- goto exit;
- }
- aq->qidx = (sw_to_hw_lvl_map[level_idx] << 14 | id);
- aq->ctype = NIX_AQ_CTYPE_BAND_PROF;
- aq->op = NIX_AQ_INSTOP_READ;
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
- prof = &rsp->prof;
- }
- if (!rc) {
- plt_dump("============= band prof id =%d ===============", id);
- nix_lf_bpf_dump(prof);
- }
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
roc_nix_bpf_pre_color_tbl_setup(struct roc_nix *roc_nix, uint16_t id,
enum roc_nix_bpf_level_flag lvl_flag,
@@ -1265,134 +1126,3 @@ roc_nix_bpf_stats_reset(struct roc_nix *roc_nix, uint16_t id, uint64_t mask,
mbox_put(mbox);
return rc;
}
-
-int
-roc_nix_bpf_lf_stats_read(struct roc_nix *roc_nix, uint64_t mask,
- uint64_t stats[ROC_NIX_BPF_STATS_MAX])
-{
- uint8_t yellow_pkt_pass, yellow_octs_pass, yellow_pkt_drop;
- uint8_t green_octs_drop, yellow_octs_drop, red_octs_drop;
- uint8_t green_pkt_pass, green_octs_pass, green_pkt_drop;
- uint8_t red_pkt_pass, red_octs_pass, red_pkt_drop;
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- green_pkt_pass =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_GREEN_PKT_F_PASS);
- green_octs_pass =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_GREEN_OCTS_F_PASS);
- green_pkt_drop =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_GREEN_PKT_F_DROP);
- green_octs_drop =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_GREEN_OCTS_F_DROP);
- yellow_pkt_pass =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_YELLOW_PKT_F_PASS);
- yellow_octs_pass =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_YELLOW_OCTS_F_PASS);
- yellow_pkt_drop =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_YELLOW_PKT_F_DROP);
- yellow_octs_drop =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_YELLOW_OCTS_F_DROP);
- red_pkt_pass =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_RED_PKT_F_PASS);
- red_octs_pass =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_RED_OCTS_F_PASS);
- red_pkt_drop =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_RED_PKT_F_DROP);
- red_octs_drop =
- roc_nix_bpf_stats_to_idx(mask & ROC_NIX_BPF_RED_OCTS_F_DROP);
-
- if (green_pkt_pass != ROC_NIX_BPF_STATS_MAX) {
- stats[green_pkt_pass] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_GC_OCTS_PASSED);
- }
-
- if (green_octs_pass != ROC_NIX_BPF_STATS_MAX) {
- stats[green_octs_pass] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_YC_PKTS_PASSED);
- }
-
- if (green_pkt_drop != ROC_NIX_BPF_STATS_MAX) {
- stats[green_pkt_drop] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_GC_OCTS_DROP);
- }
-
- if (green_octs_drop != ROC_NIX_BPF_STATS_MAX) {
- stats[green_octs_drop] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_YC_PKTS_DROP);
- }
-
- if (yellow_pkt_pass != ROC_NIX_BPF_STATS_MAX) {
- stats[yellow_pkt_pass] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_GC_PKTS_PASSED);
- }
-
- if (yellow_octs_pass != ROC_NIX_BPF_STATS_MAX) {
- stats[yellow_octs_pass] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_RC_OCTS_PASSED);
- }
-
- if (yellow_pkt_drop != ROC_NIX_BPF_STATS_MAX) {
- stats[yellow_pkt_drop] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_GC_PKTS_DROP);
- }
-
- if (yellow_octs_drop != ROC_NIX_BPF_STATS_MAX) {
- stats[yellow_octs_drop] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_RC_OCTS_DROP);
- }
-
- if (red_pkt_pass != ROC_NIX_BPF_STATS_MAX) {
- stats[red_pkt_pass] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_YC_OCTS_PASSED);
- }
-
- if (red_octs_pass != ROC_NIX_BPF_STATS_MAX) {
- stats[red_octs_pass] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_RC_PKTS_PASSED);
- }
-
- if (red_pkt_drop != ROC_NIX_BPF_STATS_MAX) {
- stats[red_pkt_drop] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_YC_OCTS_DROP);
- }
-
- if (red_octs_drop != ROC_NIX_BPF_STATS_MAX) {
- stats[red_octs_drop] =
- NIX_RD_STATS(NIX_STAT_LF_RX_RX_RC_PKTS_DROP);
- }
-
- return 0;
-}
-
-int
-roc_nix_bpf_lf_stats_reset(struct roc_nix *roc_nix, uint64_t mask)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- if (mask & ROC_NIX_BPF_GREEN_PKT_F_PASS)
- NIX_RST_STATS(ROC_NIX_BPF_GREEN_PKT_F_PASS);
- if (mask & ROC_NIX_BPF_GREEN_OCTS_F_PASS)
- NIX_RST_STATS(ROC_NIX_BPF_GREEN_OCTS_F_PASS);
- if (mask & ROC_NIX_BPF_GREEN_PKT_F_DROP)
- NIX_RST_STATS(ROC_NIX_BPF_GREEN_PKT_F_DROP);
- if (mask & ROC_NIX_BPF_GREEN_OCTS_F_DROP)
- NIX_RST_STATS(ROC_NIX_BPF_GREEN_OCTS_F_DROP);
- if (mask & ROC_NIX_BPF_YELLOW_PKT_F_PASS)
- NIX_RST_STATS(ROC_NIX_BPF_YELLOW_PKT_F_PASS);
- if (mask & ROC_NIX_BPF_YELLOW_OCTS_F_PASS)
- NIX_RST_STATS(ROC_NIX_BPF_YELLOW_OCTS_F_PASS);
- if (mask & ROC_NIX_BPF_YELLOW_PKT_F_DROP)
- NIX_RST_STATS(ROC_NIX_BPF_YELLOW_PKT_F_DROP);
- if (mask & ROC_NIX_BPF_YELLOW_OCTS_F_DROP)
- NIX_RST_STATS(ROC_NIX_BPF_YELLOW_OCTS_F_DROP);
- if (mask & ROC_NIX_BPF_RED_PKT_F_PASS)
- NIX_RST_STATS(ROC_NIX_BPF_RED_PKT_F_PASS);
- if (mask & ROC_NIX_BPF_RED_OCTS_F_PASS)
- NIX_RST_STATS(ROC_NIX_BPF_RED_OCTS_F_PASS);
- if (mask & ROC_NIX_BPF_RED_PKT_F_DROP)
- NIX_RST_STATS(ROC_NIX_BPF_RED_PKT_F_DROP);
- if (mask & ROC_NIX_BPF_RED_OCTS_F_DROP)
- NIX_RST_STATS(ROC_NIX_BPF_RED_OCTS_F_DROP);
-
- return 0;
-}
diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c
index 8164a2ba0e..8c78ff9733 100644
--- a/drivers/common/cnxk/roc_nix_fc.c
+++ b/drivers/common/cnxk/roc_nix_fc.c
@@ -5,21 +5,6 @@
#include "roc_api.h"
#include "roc_priv.h"
-static int
-nix_fc_rxchan_bpid_get(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- if (nix->chan_cnt != 0)
- fc_cfg->rxchan_cfg.enable = true;
- else
- fc_cfg->rxchan_cfg.enable = false;
-
- fc_cfg->type = ROC_NIX_FC_RXCHAN_CFG;
-
- return 0;
-}
-
static int
nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
{
@@ -106,165 +91,6 @@ nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
return rc;
}
-static int
-nix_fc_cq_config_get(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct nix_aq_enq_rsp *rsp;
- int rc;
-
- if (roc_model_is_cn9k()) {
- struct nix_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = fc_cfg->cq_cfg.rq;
- aq->ctype = NIX_AQ_CTYPE_CQ;
- aq->op = NIX_AQ_INSTOP_READ;
- } else if (roc_model_is_cn10k()) {
- struct nix_cn10k_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = fc_cfg->cq_cfg.rq;
- aq->ctype = NIX_AQ_CTYPE_CQ;
- aq->op = NIX_AQ_INSTOP_READ;
- } else {
- struct nix_cn20k_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_cn20k_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = fc_cfg->cq_cfg.rq;
- aq->ctype = NIX_AQ_CTYPE_CQ;
- aq->op = NIX_AQ_INSTOP_READ;
- }
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- fc_cfg->cq_cfg.cq_drop = rsp->cq.drop;
- fc_cfg->cq_cfg.cq_bp = rsp->cq.bp;
- fc_cfg->cq_cfg.enable = rsp->cq.bp_ena;
- fc_cfg->type = ROC_NIX_FC_CQ_CFG;
-
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-static int
-nix_fc_rq_config_get(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct npa_cn20k_aq_enq_req *npa_req_cn20k;
- struct npa_cn20k_aq_enq_rsp *npa_rsp_cn20k;
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct nix_aq_enq_rsp *rsp;
- struct npa_aq_enq_req *npa_req;
- struct npa_aq_enq_rsp *npa_rsp;
- int rc;
-
- if (roc_model_is_cn9k()) {
- struct nix_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = fc_cfg->rq_cfg.rq;
- aq->ctype = NIX_AQ_CTYPE_RQ;
- aq->op = NIX_AQ_INSTOP_READ;
- } else if (roc_model_is_cn10k()) {
- struct nix_cn10k_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = fc_cfg->rq_cfg.rq;
- aq->ctype = NIX_AQ_CTYPE_RQ;
- aq->op = NIX_AQ_INSTOP_READ;
- } else {
- struct nix_cn20k_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_cn20k_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = fc_cfg->rq_cfg.rq;
- aq->ctype = NIX_AQ_CTYPE_RQ;
- aq->op = NIX_AQ_INSTOP_READ;
- }
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- if (roc_model_is_cn20k()) {
- npa_req_cn20k = mbox_alloc_msg_npa_cn20k_aq_enq(mbox);
- if (!npa_req_cn20k) {
- rc = -ENOSPC;
- goto exit;
- }
-
- npa_req_cn20k->aura_id = rsp->rq.lpb_aura;
- npa_req_cn20k->ctype = NPA_AQ_CTYPE_AURA;
- npa_req_cn20k->op = NPA_AQ_INSTOP_READ;
-
- rc = mbox_process_msg(mbox, (void *)&npa_rsp_cn20k);
- if (rc)
- goto exit;
-
- fc_cfg->cq_cfg.cq_drop = npa_rsp_cn20k->aura.bp;
- fc_cfg->cq_cfg.enable = npa_rsp_cn20k->aura.bp_ena;
- fc_cfg->type = ROC_NIX_FC_RQ_CFG;
- } else {
- npa_req = mbox_alloc_msg_npa_aq_enq(mbox);
- if (!npa_req) {
- rc = -ENOSPC;
- goto exit;
- }
-
- npa_req->aura_id = rsp->rq.lpb_aura;
- npa_req->ctype = NPA_AQ_CTYPE_AURA;
- npa_req->op = NPA_AQ_INSTOP_READ;
-
- rc = mbox_process_msg(mbox, (void *)&npa_rsp);
- if (rc)
- goto exit;
-
- fc_cfg->cq_cfg.cq_drop = npa_rsp->aura.bp;
- fc_cfg->cq_cfg.enable = npa_rsp->aura.bp_ena;
- fc_cfg->type = ROC_NIX_FC_RQ_CFG;
- }
-
-exit:
- mbox_put(mbox);
- return rc;
-}
-
static int
nix_fc_cq_config_set(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
{
@@ -410,25 +236,6 @@ nix_fc_rq_config_set(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
return 0;
}
-int
-roc_nix_fc_config_get(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
-{
- if (!roc_nix_is_pf(roc_nix) && !roc_nix_is_lbk(roc_nix) &&
- !roc_nix_is_sdp(roc_nix))
- return 0;
-
- if (fc_cfg->type == ROC_NIX_FC_CQ_CFG)
- return nix_fc_cq_config_get(roc_nix, fc_cfg);
- else if (fc_cfg->type == ROC_NIX_FC_RQ_CFG)
- return nix_fc_rq_config_get(roc_nix, fc_cfg);
- else if (fc_cfg->type == ROC_NIX_FC_RXCHAN_CFG)
- return nix_fc_rxchan_bpid_get(roc_nix, fc_cfg);
- else if (fc_cfg->type == ROC_NIX_FC_TM_CFG)
- return nix_tm_bp_config_get(roc_nix, &fc_cfg->tm_cfg.enable);
-
- return -EINVAL;
-}
-
int
roc_nix_fc_config_set(struct roc_nix *roc_nix, struct roc_nix_fc_cfg *fc_cfg)
{
@@ -735,28 +542,6 @@ roc_nix_pfc_mode_set(struct roc_nix *roc_nix, struct roc_nix_pfc_cfg *pfc_cfg)
return rc;
}
-int
-roc_nix_pfc_mode_get(struct roc_nix *roc_nix, struct roc_nix_pfc_cfg *pfc_cfg)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- if (roc_nix_is_lbk(roc_nix))
- return NIX_ERR_OP_NOTSUP;
-
- pfc_cfg->tc = nix->cev;
-
- if (nix->pfc_rx_pause && nix->pfc_tx_pause)
- pfc_cfg->mode = ROC_NIX_FC_FULL;
- else if (nix->pfc_rx_pause)
- pfc_cfg->mode = ROC_NIX_FC_RX;
- else if (nix->pfc_tx_pause)
- pfc_cfg->mode = ROC_NIX_FC_TX;
- else
- pfc_cfg->mode = ROC_NIX_FC_NONE;
-
- return 0;
-}
-
uint16_t
roc_nix_chan_count_get(struct roc_nix *roc_nix)
{
@@ -832,13 +617,6 @@ roc_nix_bpids_alloc(struct roc_nix *roc_nix, uint8_t type, uint8_t bp_cnt, uint1
return nix_bpids_alloc(&nix->dev, type, bp_cnt, bpids);
}
-int
-roc_nix_bpids_free(struct roc_nix *roc_nix, uint8_t bp_cnt, uint16_t *bpids)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- return nix_bpids_free(&nix->dev, bp_cnt, bpids);
-}
-
int
roc_nix_rx_chan_cfg_get(struct roc_nix *roc_nix, uint16_t chan, bool is_cpt, uint64_t *cfg)
{
diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 0eea0536aa..53d749080c 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -2089,14 +2089,6 @@ roc_nix_inl_inb_is_enabled(struct roc_nix *roc_nix)
return nix->inl_inb_ena;
}
-bool
-roc_nix_inl_outb_is_enabled(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- return nix->inl_outb_ena;
-}
-
int
roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq, bool enable)
{
@@ -2341,39 +2333,6 @@ roc_nix_inb_mode_set(struct roc_nix *roc_nix, bool use_inl_dev)
nix->inb_inl_dev = use_inl_dev;
}
-void
-roc_nix_inl_inb_set(struct roc_nix *roc_nix, bool ena)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct idev_cfg *idev = idev_get_cfg();
-
- if (!idev)
- return;
- /* Need to set here for cases when inbound SA table is
- * managed outside RoC.
- */
- nix->inl_inb_ena = ena;
-
- if (roc_model_is_cn9k() || roc_errata_nix_no_meta_aura())
- return;
-
- if (ena) {
- nix->need_meta_aura = true;
- if (!roc_nix->local_meta_aura_ena || roc_nix->custom_meta_aura_ena)
- idev->inl_cfg.refs++;
- } else if (nix->need_meta_aura) {
- nix->need_meta_aura = false;
- if (!roc_nix->local_meta_aura_ena || roc_nix->custom_meta_aura_ena)
- idev->inl_cfg.refs--;
-
- if (roc_nix->custom_meta_aura_ena)
- nix_inl_custom_meta_aura_destroy(roc_nix);
-
- if (!idev->inl_cfg.refs)
- nix_inl_meta_aura_destroy(roc_nix);
- }
-}
-
int
roc_nix_inl_outb_soft_exp_poll_switch(struct roc_nix *roc_nix, bool poll)
{
@@ -2434,14 +2393,6 @@ roc_nix_inl_dev_rq(struct roc_nix *roc_nix)
return NULL;
}
-uint16_t
-roc_nix_inl_outb_sso_pffunc_get(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- return nix->outb_err_sso_pffunc;
-}
-
int
roc_nix_inl_cb_register(roc_nix_inl_sso_work_cb_t cb, void *args)
{
@@ -2468,27 +2419,6 @@ roc_nix_inl_cb_register(roc_nix_inl_sso_work_cb_t cb, void *args)
return 0;
}
-int
-roc_nix_inl_cb_unregister(roc_nix_inl_sso_work_cb_t cb, void *args)
-{
- struct idev_cfg *idev = idev_get_cfg();
- struct nix_inl_dev *inl_dev;
-
- if (idev == NULL)
- return -ENOENT;
-
- inl_dev = idev->nix_inl_dev;
- if (!inl_dev)
- return -ENOENT;
-
- if (inl_dev->work_cb != cb || inl_dev->cb_args != args)
- return -EINVAL;
-
- inl_dev->work_cb = NULL;
- inl_dev->cb_args = NULL;
- return 0;
-}
-
int
roc_nix_inl_inb_tag_update(struct roc_nix *roc_nix, uint32_t tag_const,
uint8_t tt)
@@ -2752,95 +2682,6 @@ roc_nix_inl_cpt_lf_stats_get(struct roc_nix *roc_nix, enum roc_nix_cpt_lf_stats_
}
}
-static int
-nix_inl_ts_pkind_set(struct roc_nix *roc_nix, bool ts_ena, bool inb_inl_dev, uint8_t profile_id)
-{
- struct idev_cfg *idev = idev_get_cfg();
- struct nix_inl_dev *inl_dev = NULL;
- void *sa, *sa_base = NULL;
- struct nix *nix = NULL;
- uint32_t rq_refs = 0;
- uint16_t max_sa = 0;
- uint8_t pkind = 0;
- size_t inb_sa_sz;
- int i;
-
- if (roc_model_is_cn9k())
- return 0;
-
- if (!inb_inl_dev && (roc_nix == NULL) && profile_id >= ROC_NIX_INL_PROFILE_CNT)
- return -EINVAL;
-
- if (inb_inl_dev) {
- if ((idev == NULL) || (idev->nix_inl_dev == NULL))
- return 0;
- inl_dev = idev->nix_inl_dev;
- } else {
- nix = roc_nix_to_nix_priv(roc_nix);
- if (!nix->inl_inb_ena)
- return 0;
-
- sa_base = nix->inb_sa_base[profile_id];
- if (sa_base == NULL)
- return 0;
- inb_sa_sz = nix->inb_sa_sz[profile_id];
- max_sa = nix->inb_sa_max[profile_id];
- }
-
- if (inl_dev) {
- for (i = 0; i < inl_dev->nb_rqs; i++)
- rq_refs += inl_dev->rqs[i].inl_dev_refs;
-
- if (rq_refs == 0) {
- sa_base = inl_dev->inb_sa_base[profile_id];
- if (sa_base == NULL)
- return 0;
- inl_dev->ts_ena = ts_ena;
- max_sa = inl_dev->inb_sa_max[profile_id];
- inb_sa_sz = inl_dev->inb_sa_sz[profile_id];
- } else if (inl_dev->ts_ena != ts_ena) {
- if (inl_dev->ts_ena)
- plt_err("Inline device is already configured with TS enable");
- else
- plt_err("Inline device is already configured with TS disable");
- return -ENOTSUP;
- } else {
- return 0;
- }
- }
-
- pkind = ts_ena ? ROC_IE_OT_CPT_TS_PKIND : ROC_IE_OT_CPT_PKIND;
-
- sa = (uint8_t *)sa_base;
- if (pkind == ((struct roc_ot_ipsec_inb_sa *)sa)->w0.s.pkind)
- return 0;
-
- for (i = 0; i < max_sa; i++) {
- sa = ((uint8_t *)sa_base) + (i * inb_sa_sz);
- ((struct roc_ot_ipsec_inb_sa *)sa)->w0.s.pkind = pkind;
- }
- return 0;
-}
-
-int
-roc_nix_inl_ts_pkind_set(struct roc_nix *roc_nix, bool ts_ena, bool inb_inl_dev, uint8_t profile_id)
-{
- int cnt = 0;
-
- if (profile_id < ROC_NIX_INL_PROFILE_CNT) {
- return nix_inl_ts_pkind_set(roc_nix, ts_ena, inb_inl_dev, profile_id);
- } else if (profile_id == 0xFF) {
- /* Configure for all valid profiles */
- for (cnt = 0; cnt < ROC_NIX_INL_PROFILE_CNT; cnt++)
- if (nix_inl_ts_pkind_set(roc_nix, ts_ena, inb_inl_dev, cnt))
- return -EINVAL;
- return 0;
- }
-
- plt_err("Invalid NIX inline profile_id: %u", profile_id);
- return -EINVAL;
-}
-
void
roc_nix_inl_dev_lock(void)
{
diff --git a/drivers/common/cnxk/roc_nix_inl.h b/drivers/common/cnxk/roc_nix_inl.h
index 30f4196581..b9aee487c9 100644
--- a/drivers/common/cnxk/roc_nix_inl.h
+++ b/drivers/common/cnxk/roc_nix_inl.h
@@ -150,10 +150,6 @@ bool roc_nix_inl_dev_is_probed(void);
void __roc_api roc_nix_inl_dev_lock(void);
void __roc_api roc_nix_inl_dev_unlock(void);
int __roc_api roc_nix_inl_dev_xaq_realloc(uint64_t aura_handle);
-int roc_nix_inl_dev_stats_get(struct roc_nix_stats *stats);
-int roc_nix_inl_dev_stats_reset(void);
-int roc_nix_inl_dev_cpt_setup(bool use_inl_dev_sso);
-int roc_nix_inl_dev_cpt_release(void);
bool __roc_api roc_nix_inl_dev_is_multi_channel(void);
/* NIX Inline Inbound API */
@@ -182,7 +178,6 @@ uint32_t roc_nix_inl_inb_sa_sz(struct roc_nix *roc_nix,
uintptr_t __roc_api roc_nix_inl_inb_sa_get(struct roc_nix *roc_nix,
bool inl_dev_sa, uint32_t spi);
void __roc_api roc_nix_inb_mode_set(struct roc_nix *roc_nix, bool use_inl_dev);
-void roc_nix_inl_inb_set(struct roc_nix *roc_nix, bool ena);
int __roc_api roc_nix_inl_dev_rq_get(struct roc_nix_rq *rq, bool ena);
int __roc_api roc_nix_inl_dev_rq_put(struct roc_nix_rq *rq);
bool __roc_api roc_nix_inb_is_with_inl_dev(struct roc_nix *roc_nix);
@@ -190,23 +185,17 @@ struct roc_nix_rq *__roc_api roc_nix_inl_dev_rq(struct roc_nix *roc_nix);
int __roc_api roc_nix_inl_inb_tag_update(struct roc_nix *roc_nix, uint32_t tag_const, uint8_t tt);
int __roc_api roc_nix_reassembly_configure(struct roc_cpt_rxc_time_cfg *req_cfg,
uint32_t max_wait_time);
-int roc_nix_inl_ts_pkind_set(struct roc_nix *roc_nix, bool ts_ena, bool inb_inl_dev,
- uint8_t profile_id);
int __roc_api roc_nix_inl_rq_ena_dis(struct roc_nix *roc_nix, bool ena);
int roc_nix_inl_meta_aura_check(struct roc_nix *roc_nix, struct roc_nix_rq *rq);
/* NIX Inline Outbound API */
int __roc_api roc_nix_inl_outb_init(struct roc_nix *roc_nix);
int __roc_api roc_nix_inl_outb_fini(struct roc_nix *roc_nix);
-bool roc_nix_inl_outb_is_enabled(struct roc_nix *roc_nix);
uintptr_t __roc_api roc_nix_inl_outb_sa_base_get(struct roc_nix *roc_nix);
struct roc_cpt_lf *__roc_api
roc_nix_inl_outb_lf_base_get(struct roc_nix *roc_nix);
struct roc_cpt_lf *__roc_api roc_nix_inl_inb_inj_lf_get(struct roc_nix *roc_nix);
-uint16_t roc_nix_inl_outb_sso_pffunc_get(struct roc_nix *roc_nix);
int __roc_api roc_nix_inl_cb_register(roc_nix_inl_sso_work_cb_t cb, void *args);
-int roc_nix_inl_cb_unregister(roc_nix_inl_sso_work_cb_t cb,
- void *args);
int __roc_api roc_nix_inl_outb_soft_exp_poll_switch(struct roc_nix *roc_nix,
bool poll);
uint64_t *__roc_api roc_nix_inl_outb_ring_base_get(struct roc_nix *roc_nix);
diff --git a/drivers/common/cnxk/roc_nix_inl_dev.c b/drivers/common/cnxk/roc_nix_inl_dev.c
index f0703f3154..9388f9d989 100644
--- a/drivers/common/cnxk/roc_nix_inl_dev.c
+++ b/drivers/common/cnxk/roc_nix_inl_dev.c
@@ -1362,64 +1362,6 @@ roc_nix_inl_dev_qptr_get(uint8_t qid)
return &inl_dev->q_info[qid];
}
-int
-roc_nix_inl_dev_stats_get(struct roc_nix_stats *stats)
-{
- struct idev_cfg *idev = idev_get_cfg();
- struct nix_inl_dev *inl_dev = NULL;
-
- if (stats == NULL)
- return NIX_ERR_PARAM;
-
- if (idev && idev->nix_inl_dev)
- inl_dev = idev->nix_inl_dev;
-
- if (!inl_dev)
- return -EINVAL;
-
- stats->rx_octs = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_OCTS);
- stats->rx_ucast = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_UCAST);
- stats->rx_bcast = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_BCAST);
- stats->rx_mcast = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_MCAST);
- stats->rx_drop = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_DROP);
- stats->rx_drop_octs = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_DROP_OCTS);
- stats->rx_fcs = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_FCS);
- stats->rx_err = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_ERR);
- stats->rx_drop_bcast = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_DRP_BCAST);
- stats->rx_drop_mcast = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_DRP_MCAST);
- stats->rx_drop_l3_bcast = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_DRP_L3BCAST);
- stats->rx_drop_l3_mcast = INL_NIX_RX_STATS(NIX_STAT_LF_RX_RX_DRP_L3MCAST);
-
- return 0;
-}
-
-int
-roc_nix_inl_dev_stats_reset(void)
-{
- struct idev_cfg *idev = idev_get_cfg();
- struct nix_inl_dev *inl_dev = NULL;
- struct mbox *mbox;
- int rc;
-
- if (idev && idev->nix_inl_dev)
- inl_dev = idev->nix_inl_dev;
-
- if (!inl_dev)
- return -EINVAL;
-
- mbox = mbox_get((&inl_dev->dev)->mbox);
-
- if (mbox_alloc_msg_nix_stats_rst(mbox) == NULL) {
- rc = -ENOMEM;
- goto exit;
- }
-
- rc = mbox_process(mbox);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
roc_nix_inl_dev_init(struct roc_nix_inl_dev *roc_inl_dev)
{
@@ -1667,35 +1609,3 @@ roc_nix_inl_dev_fini(struct roc_nix_inl_dev *roc_inl_dev)
idev->nix_inl_dev = NULL;
return 0;
}
-
-int
-roc_nix_inl_dev_cpt_setup(bool use_inl_dev_sso)
-{
- struct idev_cfg *idev = idev_get_cfg();
- struct nix_inl_dev *inl_dev = NULL;
-
- if (!idev || !idev->nix_inl_dev)
- return -ENOENT;
- inl_dev = idev->nix_inl_dev;
-
- if (inl_dev->cpt_lf[0].dev != NULL)
- return -EBUSY;
-
- return nix_inl_cpt_setup(inl_dev, use_inl_dev_sso);
-}
-
-int
-roc_nix_inl_dev_cpt_release(void)
-{
- struct idev_cfg *idev = idev_get_cfg();
- struct nix_inl_dev *inl_dev = NULL;
-
- if (!idev || !idev->nix_inl_dev)
- return -ENOENT;
- inl_dev = idev->nix_inl_dev;
-
- if (inl_dev->cpt_lf[0].dev == NULL)
- return 0;
-
- return nix_inl_cpt_release(inl_dev);
-}
diff --git a/drivers/common/cnxk/roc_nix_mac.c b/drivers/common/cnxk/roc_nix_mac.c
index 2c8c9a6443..f7d97393b1 100644
--- a/drivers/common/cnxk/roc_nix_mac.c
+++ b/drivers/common/cnxk/roc_nix_mac.c
@@ -5,30 +5,6 @@
#include "roc_api.h"
#include "roc_priv.h"
-int
-roc_nix_mac_rxtx_start_stop(struct roc_nix *roc_nix, bool start)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- int rc;
-
- if (roc_nix_is_vf_or_sdp(roc_nix)) {
- rc = NIX_ERR_OP_NOTSUP;
- goto exit;
- }
-
- if (start)
- mbox_alloc_msg_cgx_start_rxtx(mbox);
- else
- mbox_alloc_msg_cgx_stop_rxtx(mbox);
-
- rc = mbox_process(mbox);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
roc_nix_mac_link_event_start_stop(struct roc_nix *roc_nix, bool start)
{
@@ -344,38 +320,6 @@ roc_nix_mac_link_info_set(struct roc_nix *roc_nix,
}
-int
-roc_nix_mac_mtu_set(struct roc_nix *roc_nix, uint16_t mtu)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct nix_frs_cfg *req;
- bool sdp_link = false;
- int rc = -ENOSPC;
-
- if (roc_nix_is_sdp(roc_nix))
- sdp_link = true;
-
- req = mbox_alloc_msg_nix_set_hw_frs(mbox);
- if (req == NULL)
- goto exit;
- req->maxlen = mtu;
- req->update_smq = true;
- req->sdp_link = sdp_link;
-
- rc = mbox_process(mbox);
- if (rc)
- goto exit;
-
- /* Save MTU for later use */
- nix->mtu = mtu;
- rc = 0;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
roc_nix_mac_max_rx_len_set(struct roc_nix *roc_nix, uint16_t maxlen)
{
@@ -461,15 +405,6 @@ roc_nix_mac_link_info_get_cb_register(struct roc_nix *roc_nix,
return 0;
}
-void
-roc_nix_mac_link_info_get_cb_unregister(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
-
- dev->ops->link_status_get = NULL;
-}
-
int
roc_nix_mac_fwdata_get(struct roc_nix *roc_nix, struct roc_nix_mac_fwdata *data)
{
diff --git a/drivers/common/cnxk/roc_nix_mcast.c b/drivers/common/cnxk/roc_nix_mcast.c
index eab4bde743..2957d41951 100644
--- a/drivers/common/cnxk/roc_nix_mcast.c
+++ b/drivers/common/cnxk/roc_nix_mcast.c
@@ -5,123 +5,6 @@
#include "roc_api.h"
#include "roc_priv.h"
-int
-roc_nix_mcast_mcam_entry_alloc(struct roc_nix *roc_nix, uint16_t nb_entries,
- uint8_t priority, uint16_t index[])
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct npc_mcam_alloc_entry_req *req;
- struct npc_mcam_alloc_entry_rsp *rsp;
- int rc = -ENOSPC, i;
-
- req = mbox_alloc_msg_npc_mcam_alloc_entry(mbox);
- if (req == NULL)
- goto exit;
- req->ref_priority = priority;
- req->count = nb_entries;
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- for (i = 0; i < rsp->count; i++)
- index[i] = rsp->entry_list[i];
-
- rc = rsp->count;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_mcast_mcam_entry_free(struct roc_nix *roc_nix, uint32_t index)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct npc_mcam_free_entry_req *req;
- int rc = -ENOSPC;
-
- req = mbox_alloc_msg_npc_mcam_free_entry(mbox);
- if (req == NULL)
- goto exit;
- req->entry = index;
-
- rc = mbox_process_msg(mbox, NULL);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_mcast_mcam_entry_write(struct roc_nix *roc_nix, void *entry, uint32_t index, uint8_t intf,
- uint64_t action)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- int rc = -ENOSPC;
-
- if (roc_model_is_cn20k()) {
- struct npc_cn20k_mcam_write_entry_req *req;
-
- req = mbox_alloc_msg_npc_cn20k_mcam_write_entry(mbox);
- if (req == NULL)
- goto exit;
- req->entry = index;
- req->intf = intf;
- req->enable_entry = true;
- mbox_memcpy(&req->entry_data, entry, sizeof(struct cn20k_mcam_entry));
- req->entry_data.action = action;
-
- } else {
- struct npc_mcam_write_entry_req *req;
-
- req = mbox_alloc_msg_npc_mcam_write_entry(mbox);
- if (req == NULL)
- goto exit;
- req->entry = index;
- req->intf = intf;
- req->enable_entry = true;
- mbox_memcpy(&req->entry_data, entry, sizeof(struct mcam_entry));
- req->entry_data.action = action;
- }
-
- rc = mbox_process(mbox);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_mcast_mcam_entry_ena_dis(struct roc_nix *roc_nix, uint32_t index,
- bool enable)
-{
- struct npc_mcam_ena_dis_entry_req *req;
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- int rc = -ENOSPC;
-
- if (enable) {
- req = mbox_alloc_msg_npc_mcam_ena_entry(mbox);
- if (req == NULL)
- goto exit;
- } else {
- req = mbox_alloc_msg_npc_mcam_dis_entry(mbox);
- if (req == NULL)
- goto exit;
- }
-
- req->entry = index;
- rc = mbox_process(mbox);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
roc_nix_mcast_list_setup(struct mbox *mbox, uint8_t intf, int nb_entries, uint16_t *pf_funcs,
uint16_t *channels, uint32_t *rqs, uint32_t *grp_index,
diff --git a/drivers/common/cnxk/roc_nix_ops.c b/drivers/common/cnxk/roc_nix_ops.c
index 13a548216b..9ec7c09084 100644
--- a/drivers/common/cnxk/roc_nix_ops.c
+++ b/drivers/common/cnxk/roc_nix_ops.c
@@ -189,41 +189,6 @@ roc_nix_lso_alt_flags_profile_setup(struct roc_nix *roc_nix, nix_lso_alt_flg_for
return rc;
}
-int
-roc_nix_lso_custom_fmt_setup(struct roc_nix *roc_nix,
- struct nix_lso_format *fields, uint16_t nb_fields)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct nix_lso_format_cfg_rsp *rsp;
- struct nix_lso_format_cfg *req;
- int rc = -ENOSPC;
-
- if (nb_fields > NIX_LSO_FIELD_MAX) {
- rc = -EINVAL;
- goto exit;
- }
-
- req = mbox_alloc_msg_nix_lso_format_cfg(mbox);
- if (req == NULL)
- goto exit;
-
- req->field_mask = NIX_LSO_FIELD_MASK;
- mbox_memcpy(req->fields, fields,
- sizeof(struct nix_lso_format) * nb_fields);
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- plt_nix_dbg("Setup custom format %u", rsp->lso_format_idx);
- rc = rsp->lso_format_idx;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
static int
nix_lso_ipv4(struct roc_nix *roc_nix)
{
@@ -481,14 +446,6 @@ roc_nix_lso_fmt_setup(struct roc_nix *roc_nix)
return rc;
}
-int
-roc_nix_lso_fmt_ipv4_frag_get(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- return nix->lso_ipv4_idx;
-}
-
int
roc_nix_lso_fmt_get(struct roc_nix *roc_nix,
uint8_t udp_tun[ROC_NIX_LSO_TUN_MAX],
diff --git a/drivers/common/cnxk/roc_nix_ptp.c b/drivers/common/cnxk/roc_nix_ptp.c
index 187e6c8d4f..cc435a235d 100644
--- a/drivers/common/cnxk/roc_nix_ptp.c
+++ b/drivers/common/cnxk/roc_nix_ptp.c
@@ -133,15 +133,6 @@ roc_nix_ptp_info_cb_register(struct roc_nix *roc_nix,
return 0;
}
-void
-roc_nix_ptp_info_cb_unregister(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
-
- dev->ops->ptp_info_update = NULL;
-}
-
bool
roc_nix_ptp_is_enable(struct roc_nix *roc_nix)
{
diff --git a/drivers/common/cnxk/roc_nix_queue.c b/drivers/common/cnxk/roc_nix_queue.c
index 8e7e597be2..eebcd8e326 100644
--- a/drivers/common/cnxk/roc_nix_queue.c
+++ b/drivers/common/cnxk/roc_nix_queue.c
@@ -12,47 +12,6 @@
typedef void *(*nix_aq_enq_alloc_t)(struct mbox *mbox);
-static inline void
-nix_aq_enq_write_rq_ena(void *msg, uint16_t qid, bool enable)
-{
- struct nix_aq_enq_req *aq = msg;
-
- aq->qidx = qid;
- aq->ctype = NIX_AQ_CTYPE_RQ;
- aq->op = NIX_AQ_INSTOP_WRITE;
- aq->rq.ena = enable;
- aq->rq_mask.ena = ~(aq->rq_mask.ena);
-}
-
-static inline int
-nix_rq_bulk_ena_dis_fill(struct mbox *mbox, struct roc_nix_rq *rqs, int nb_rx_queues,
- bool enable, nix_aq_enq_alloc_t alloc)
-{
- int i;
-
- for (i = 0; i < nb_rx_queues; i++) {
- void *aq;
- int rc;
-
- if (rqs[i].qid == UINT16_MAX)
- continue;
-
- aq = alloc(mbox);
- if (!aq) {
- rc = mbox_process(mbox);
- if (rc)
- return rc;
- aq = alloc(mbox);
- if (!aq)
- return -ENOSPC;
- }
-
- nix_aq_enq_write_rq_ena(aq, rqs[i].qid, enable);
- }
-
- return 0;
-}
-
static inline uint32_t
nix_qsize_to_val(enum nix_q_size qsize)
{
@@ -90,28 +49,6 @@ nix_rq_vwqe_flush(struct roc_nix_rq *rq, uint16_t vwqe_interval)
}
}
-static int
-nix_rq_bulk_ena_dis(struct nix *nix, struct roc_nix_rq *rqs, int nb_rx_queues, bool enable)
-{
- struct mbox *mbox = mbox_get((&nix->dev)->mbox);
- nix_aq_enq_alloc_t alloc;
- int rc;
-
- if (roc_model_is_cn9k())
- alloc = (nix_aq_enq_alloc_t)mbox_alloc_msg_nix_aq_enq;
- else if (roc_model_is_cn10k())
- alloc = (nix_aq_enq_alloc_t)mbox_alloc_msg_nix_cn10k_aq_enq;
- else /* CN20K */
- alloc = (nix_aq_enq_alloc_t)mbox_alloc_msg_nix_cn20k_aq_enq;
-
- rc = nix_rq_bulk_ena_dis_fill(mbox, rqs, nb_rx_queues, enable, alloc);
- if (!rc && mbox_nonempty_nolock(mbox, 0))
- rc = mbox_process(mbox);
-
- mbox_put(mbox);
- return rc;
-}
-
int
nix_rq_ena_dis(struct dev *dev, struct roc_nix_rq *rq, bool enable)
{
@@ -191,43 +128,6 @@ roc_nix_sq_ena_dis(struct roc_nix_sq *sq, bool enable)
return rc;
}
-int
-roc_nix_rq_multi_ena_dis(struct roc_nix *roc_nix, struct roc_nix_rq *rqs, int nb_rx_queues,
- bool enable)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct roc_nix_rq *rq;
- int rc, i;
-
- rc = nix_rq_bulk_ena_dis(nix, rqs, nb_rx_queues, enable);
- if (rc) {
- plt_err("Failed to %s Rx queues rc=%d pf=%d vf=%d nb_rx_queues=%d",
- enable ? "enable" : "disable", rc, nix->dev.pf, nix->dev.vf,
- nb_rx_queues);
- return rc;
- }
-
- for (i = 0; i < nb_rx_queues; i++) {
- rq = &rqs[i];
-
- if (rq->qid == UINT16_MAX)
- continue;
-
- nix_rq_vwqe_flush(rq, nix->vwqe_interval);
-
- /* Check for meta aura if RQ is enabled */
- if (enable && nix->need_meta_aura) {
- rc = roc_nix_inl_meta_aura_check(rq->roc_nix, rq);
- if (rc) {
- plt_err("Failed meta aura check for rq=%u rc=%d pf=%d vf=%d",
- rq->qid, rc, nix->dev.pf, nix->dev.vf);
- return rc;
- }
- }
- }
- return 0;
-}
-
int
roc_nix_rq_ena_dis(struct roc_nix_rq *rq, bool enable)
{
@@ -245,79 +145,6 @@ roc_nix_rq_ena_dis(struct roc_nix_rq *rq, bool enable)
return rc;
}
-int
-roc_nix_rq_is_sso_enable(struct roc_nix *roc_nix, uint32_t qid)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- bool sso_enable;
- int rc;
-
- if (roc_model_is_cn9k()) {
- struct nix_aq_enq_rsp *rsp;
- struct nix_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = qid;
- aq->ctype = NIX_AQ_CTYPE_RQ;
- aq->op = NIX_AQ_INSTOP_READ;
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- sso_enable = rsp->rq.sso_ena;
- } else if (roc_model_is_cn10k()) {
- struct nix_cn10k_aq_enq_rsp *rsp;
- struct nix_cn10k_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_cn10k_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = qid;
- aq->ctype = NIX_AQ_CTYPE_RQ;
- aq->op = NIX_AQ_INSTOP_READ;
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- sso_enable = rsp->rq.sso_ena;
- } else {
- struct nix_cn20k_aq_enq_rsp *rsp;
- struct nix_cn20k_aq_enq_req *aq;
-
- aq = mbox_alloc_msg_nix_cn20k_aq_enq(mbox);
- if (!aq) {
- rc = -ENOSPC;
- goto exit;
- }
-
- aq->qidx = qid;
- aq->ctype = NIX_AQ_CTYPE_RQ;
- aq->op = NIX_AQ_INSTOP_READ;
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- sso_enable = rsp->rq.sso_ena;
- }
-
- rc = sso_enable ? true : false;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
static int
nix_rq_aura_buf_type_update(struct roc_nix_rq *rq, bool set)
{
@@ -2346,188 +2173,6 @@ roc_nix_sq_fini(struct roc_nix_sq *sq)
return rc;
}
-static int
-sqb_aura_dyn_expand(struct roc_nix_sq *sq, uint16_t count)
-{
- struct nix *nix = roc_nix_to_nix_priv(sq->roc_nix);
- uint64_t *sqbs = NULL;
- uint16_t blk_sz;
- int i;
-
- blk_sz = nix->sqb_size;
- sqbs = calloc(1, count * sizeof(uint64_t));
- if (!sqbs)
- return -ENOMEM;
-
- for (i = 0; i < count; i++) {
- sqbs[i] = (uint64_t)plt_zmalloc(blk_sz, ROC_ALIGN);
- if (!sqbs[i])
- break;
- }
-
- if (i != count) {
- i = i - 1;
- for (; i >= 0; i--)
- plt_free((void *)sqbs[i]);
- free(sqbs);
- return -ENOMEM;
- }
-
- plt_io_wmb();
-
- /* Add new buffers to sqb aura */
- for (i = 0; i < count; i++)
- roc_npa_aura_op_free(sq->aura_handle, 0, sqbs[i]);
- free(sqbs);
-
- /* Adjust SQ info */
- sq->nb_sqb_bufs += count;
- sq->nb_sqb_bufs_adj += count;
- sq->aura_sqb_bufs += count;
- return 0;
-}
-
-static int
-sqb_aura_dyn_contract(struct roc_nix_sq *sq, uint16_t count)
-{
- struct nix *nix = roc_nix_to_nix_priv(sq->roc_nix);
- struct dev *dev = &nix->dev;
- struct ndc_sync_op *ndc_req;
- uint64_t *sqbs = NULL;
- struct mbox *mbox;
- uint64_t timeout; /* 10's of usec */
- uint64_t cycles;
- int i, rc;
-
- mbox = dev->mbox;
- /* Sync NDC-NIX-TX for LF */
- ndc_req = mbox_alloc_msg_ndc_sync_op(mbox_get(mbox));
- if (ndc_req == NULL) {
- mbox_put(mbox);
- return -EFAULT;
- }
-
- ndc_req->nix_lf_tx_sync = 1;
- rc = mbox_process(mbox);
- if (rc) {
- mbox_put(mbox);
- return rc;
- }
- mbox_put(mbox);
-
- /* Wait for enough time based on shaper min rate */
- timeout = (sq->nb_desc * roc_nix_max_pkt_len(sq->roc_nix) * 8 * 1E5);
- /* Wait for worst case scenario of this SQ being last priority
- * and so have to wait for all other SQ's drain out by their own.
- */
- timeout = timeout * nix->nb_tx_queues;
- timeout = timeout / nix->tm_rate_min;
- if (!timeout)
- timeout = 10000;
- cycles = (timeout * 10 * plt_tsc_hz()) / (uint64_t)1E6;
- cycles += plt_tsc_cycles();
-
- sqbs = calloc(1, count * sizeof(uint64_t));
- if (!sqbs)
- return -ENOMEM;
-
- i = 0;
- while (i < count && plt_tsc_cycles() < cycles) {
- sqbs[i] = roc_npa_aura_op_alloc(sq->aura_handle, 0);
- if (sqbs[i])
- i++;
- else
- plt_delay_us(1);
- }
-
- if (i != count) {
- plt_warn("SQ %u busy, unable to recover %u SQB's(%u desc)", sq->qid, count,
- count * sq->sqes_per_sqb);
-
- /* Restore the SQB aura state and return */
- i--;
- for (; i >= 0; i--)
- roc_npa_aura_op_free(sq->aura_handle, 0, sqbs[i]);
- free(sqbs);
- return -EAGAIN;
- }
-
- /* Extracted necessary SQB's, on free them */
- for (i = 0; i < count; i++)
- plt_free((void *)sqbs[i]);
- free(sqbs);
-
- /* Adjust SQ info */
- sq->nb_sqb_bufs -= count;
- sq->nb_sqb_bufs_adj -= count;
- sq->aura_sqb_bufs -= count;
- return 0;
-}
-
-int
-roc_nix_sq_resize(struct roc_nix_sq *sq, uint32_t nb_desc)
-{
- struct roc_nix *roc_nix = sq->roc_nix;
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- uint16_t aura_sqb_bufs, nb_sqb_bufs, sqes_per_sqb;
- int64_t *regaddr;
- uint64_t wdata;
- uint16_t diff;
- int rc;
-
- if (!roc_nix->sq_resize_ena)
- return -ENOTSUP;
-
- sqes_per_sqb = sq->sqes_per_sqb;
-
- /* Calculate new nb_sqb_bufs */
- nb_sqb_bufs = sq_desc_to_sqb(nix, sqes_per_sqb, nb_desc);
- aura_sqb_bufs = sqb_slack_adjust(nix, nb_sqb_bufs, !!sq->sq_cnt_ptr);
-
- if (aura_sqb_bufs == sq->aura_sqb_bufs)
- return 0;
-
- /* Issue atomic op to make sure all inflight LMTST's are complete
- * assuming no new submissions will take place.
- */
- wdata = ((uint64_t)sq->qid) << 32;
- regaddr = (int64_t *)(nix->base + NIX_LF_SQ_OP_STATUS);
- roc_atomic64_add_nosync(wdata, regaddr);
-
- /* Expand or Contract SQB aura */
- if (aura_sqb_bufs > sq->aura_sqb_bufs) {
- /* Increase the limit */
- roc_npa_aura_limit_modify(sq->aura_handle, aura_sqb_bufs);
- diff = aura_sqb_bufs - sq->aura_sqb_bufs;
- roc_npa_aura_op_cnt_set(sq->aura_handle, 1, diff);
-
- rc = sqb_aura_dyn_expand(sq, diff);
- } else {
- diff = sq->aura_sqb_bufs - aura_sqb_bufs;
- rc = sqb_aura_dyn_contract(sq, diff);
-
- /* Decrease the limit */
- if (!rc) {
- roc_npa_aura_limit_modify(sq->aura_handle, aura_sqb_bufs);
- roc_npa_aura_op_cnt_set(sq->aura_handle, 1, -(int64_t)diff);
- }
- }
-
- plt_io_wmb();
- if (!rc) {
- sq->nb_desc = nb_desc;
- if (sq->sq_cnt_ptr)
- plt_atomic_store_explicit((uint64_t __plt_atomic *)sq->sq_cnt_ptr, nb_desc,
- plt_memory_order_release);
- *(uint64_t *)sq->fc = roc_npa_aura_op_cnt_get(sq->aura_handle);
- } else {
- roc_npa_aura_limit_modify(sq->aura_handle, sq->aura_sqb_bufs);
- }
-
- plt_io_wmb();
- return rc;
-}
-
void
roc_nix_cq_head_tail_get(struct roc_nix *roc_nix, uint16_t qid, uint32_t *head,
uint32_t *tail)
@@ -2594,15 +2239,6 @@ roc_nix_q_err_cb_register(struct roc_nix *roc_nix, q_err_get_t sq_err_handle)
return 0;
}
-void
-roc_nix_q_err_cb_unregister(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
-
- dev->ops->q_err_cb = NULL;
-}
-
int
roc_nix_sq_cnt_update(struct roc_nix_sq *sq, bool enable)
{
diff --git a/drivers/common/cnxk/roc_nix_stats.c b/drivers/common/cnxk/roc_nix_stats.c
index ec2aca8164..b173be5e53 100644
--- a/drivers/common/cnxk/roc_nix_stats.c
+++ b/drivers/common/cnxk/roc_nix_stats.c
@@ -21,12 +21,6 @@
xstats[index].name); \
} while (0)
-int
-roc_nix_num_xstats_get(struct roc_nix *roc_nix)
-{
- return roc_nix_xstats_names_get(roc_nix, NULL, 0);
-}
-
int
roc_nix_stats_get(struct roc_nix *roc_nix, struct roc_nix_stats *stats)
{
diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index 1086f471e6..406234b5c7 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -96,17 +96,6 @@ roc_nix_tm_sq_aura_fc(struct roc_nix_sq *sq, bool enable)
return rc;
}
-int
-roc_nix_tm_free_resources(struct roc_nix *roc_nix, bool hw_only)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- if (nix->tm_flags & NIX_TM_HIERARCHY_ENA)
- return -EBUSY;
-
- return nix_tm_free_resources(roc_nix, BIT(ROC_NIX_TM_USER), hw_only);
-}
-
static int
nix_tm_adjust_shaper_pps_rate(struct nix_tm_shaper_profile *profile)
{
@@ -259,24 +248,6 @@ roc_nix_tm_shaper_profile_add(struct roc_nix *roc_nix,
return nix_tm_shaper_profile_add(roc_nix, profile, 0);
}
-int
-roc_nix_tm_shaper_profile_update(struct roc_nix *roc_nix,
- struct roc_nix_tm_shaper_profile *roc_profile)
-{
- struct nix_tm_shaper_profile *profile;
-
- profile = (struct nix_tm_shaper_profile *)roc_profile->reserved;
-
- profile->commit.rate = roc_profile->commit_rate;
- profile->peak.rate = roc_profile->peak_rate;
- profile->commit.size = roc_profile->commit_sz;
- profile->peak.size = roc_profile->peak_sz;
- profile->pkt_len_adj = roc_profile->pkt_len_adj;
- profile->accuracy = roc_profile->accuracy;
-
- return nix_tm_shaper_profile_add(roc_nix, profile, 1);
-}
-
int
roc_nix_tm_shaper_profile_delete(struct roc_nix *roc_nix, uint32_t id)
{
@@ -320,124 +291,12 @@ roc_nix_tm_node_add(struct roc_nix *roc_nix, struct roc_nix_tm_node *roc_node)
return nix_tm_node_add(roc_nix, node);
}
-int
-roc_nix_tm_node_pkt_mode_update(struct roc_nix *roc_nix, uint32_t node_id,
- bool pkt_mode)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct nix_tm_node *node, *child;
- struct nix_tm_node_list *list;
- int num_children = 0;
-
- node = nix_tm_node_search(nix, node_id, ROC_NIX_TM_USER);
- if (!node)
- return NIX_ERR_TM_INVALID_NODE;
-
- if (node->pkt_mode == pkt_mode) {
- node->pkt_mode_set = true;
- return 0;
- }
-
- /* Check for any existing children, if there are any,
- * then we cannot update the pkt mode as children's quantum
- * are already taken in.
- */
- list = nix_tm_node_list(nix, ROC_NIX_TM_USER);
- TAILQ_FOREACH(child, list, node) {
- if (child->parent == node)
- num_children++;
- }
-
- /* Cannot update mode if it has children or tree is enabled */
- if ((nix->tm_flags & NIX_TM_HIERARCHY_ENA) && num_children)
- return -EBUSY;
-
- if (node->pkt_mode_set && num_children)
- return NIX_ERR_TM_PKT_MODE_MISMATCH;
-
- node->pkt_mode = pkt_mode;
- node->pkt_mode_set = true;
-
- return 0;
-}
-
-int
-roc_nix_tm_node_name_get(struct roc_nix *roc_nix, uint32_t node_id, char *buf,
- size_t buflen)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct nix_tm_node *node;
-
- node = nix_tm_node_search(nix, node_id, ROC_NIX_TM_USER);
- if (!node) {
- plt_strlcpy(buf, "???", buflen);
- return NIX_ERR_TM_INVALID_NODE;
- }
-
- if (node->hw_lvl == NIX_TXSCH_LVL_CNT)
- snprintf(buf, buflen, "SQ_%d", node->id);
- else
- snprintf(buf, buflen, "%s_%d", nix_tm_hwlvl2str(node->hw_lvl),
- node->hw_id);
- return 0;
-}
-
int
roc_nix_tm_node_delete(struct roc_nix *roc_nix, uint32_t node_id, bool free)
{
return nix_tm_node_delete(roc_nix, node_id, ROC_NIX_TM_USER, free);
}
-int
-roc_nix_smq_flush(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct nix_tm_node_list *list;
- enum roc_nix_tm_tree tree;
- struct nix_tm_node *node;
- int rc = 0;
-
- if (!(nix->tm_flags & NIX_TM_HIERARCHY_ENA))
- return 0;
-
- tree = nix->tm_tree;
- list = nix_tm_node_list(nix, tree);
-
- /* XOFF & Flush all SMQ's. HRM mandates
- * all SQ's empty before SMQ flush is issued.
- */
- TAILQ_FOREACH(node, list, node) {
- if (node->hw_lvl != NIX_TXSCH_LVL_SMQ)
- continue;
- if (!(node->flags & NIX_TM_NODE_HWRES))
- continue;
-
- rc = nix_tm_smq_xoff(nix, node, true);
- if (rc) {
- plt_err("Failed to enable smq %u, rc=%d", node->hw_id,
- rc);
- goto exit;
- }
- }
-
- /* XON all SMQ's */
- TAILQ_FOREACH(node, list, node) {
- if (node->hw_lvl != NIX_TXSCH_LVL_SMQ)
- continue;
- if (!(node->flags & NIX_TM_NODE_HWRES))
- continue;
-
- rc = nix_tm_smq_xoff(nix, node, false);
- if (rc) {
- plt_err("Failed to enable smq %u, rc=%d", node->hw_id,
- rc);
- goto exit;
- }
- }
-exit:
- return rc;
-}
-
int
roc_nix_tm_hierarchy_disable(struct roc_nix *roc_nix)
{
@@ -748,72 +607,6 @@ roc_nix_tm_node_suspend_resume(struct roc_nix *roc_nix, uint32_t node_id,
return rc;
}
-int
-roc_nix_tm_prealloc_res(struct roc_nix *roc_nix, uint8_t lvl,
- uint16_t discontig, uint16_t contig)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct mbox *mbox = (&nix->dev)->mbox;
- struct nix_txsch_alloc_req *req;
- struct nix_txsch_alloc_rsp *rsp;
- uint8_t hw_lvl;
- int rc = -ENOSPC;
-
- hw_lvl = nix_tm_lvl2nix(nix, lvl);
- if (hw_lvl == NIX_TXSCH_LVL_CNT)
- return -EINVAL;
-
- /* Preallocate contiguous */
- if (nix->contig_rsvd[hw_lvl] < contig) {
- req = mbox_alloc_msg_nix_txsch_alloc(mbox_get(mbox));
- if (req == NULL) {
- mbox_put(mbox);
- return rc;
- }
- req->schq_contig[hw_lvl] = contig - nix->contig_rsvd[hw_lvl];
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc) {
- mbox_put(mbox);
- return rc;
- }
-
- rc = nix_tm_copy_rsp_to_nix(nix, rsp);
- mbox_put(mbox);
- if (rc)
- return rc;
- }
-
- /* Preallocate contiguous */
- if (nix->discontig_rsvd[hw_lvl] < discontig) {
- req = mbox_alloc_msg_nix_txsch_alloc(mbox_get(mbox));
- if (req == NULL) {
- mbox_put(mbox);
- return -ENOSPC;
- }
- req->schq[hw_lvl] = discontig - nix->discontig_rsvd[hw_lvl];
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc) {
- mbox_put(mbox);
- return rc;
- }
-
- rc = nix_tm_copy_rsp_to_nix(nix, rsp);
- mbox_put(mbox);
- if (rc)
- return rc;
- }
-
- /* Save thresholds */
- nix->contig_rsvd[hw_lvl] = contig;
- nix->discontig_rsvd[hw_lvl] = discontig;
- /* Release anything present above thresholds */
- nix_tm_release_resources(nix, hw_lvl, true, true);
- nix_tm_release_resources(nix, hw_lvl, false, true);
- return 0;
-}
-
int
roc_nix_tm_node_shaper_update(struct roc_nix *roc_nix, uint32_t node_id,
uint32_t profile_id, bool force_update)
@@ -1302,56 +1095,6 @@ roc_nix_tm_rsrc_count(struct roc_nix *roc_nix, uint16_t schq[ROC_TM_LVL_MAX])
return rc;
}
-void
-roc_nix_tm_rsrc_max(bool pf, uint16_t schq[ROC_TM_LVL_MAX])
-{
- uint8_t hw_lvl, i;
- uint16_t max;
-
- for (i = 0; i < ROC_TM_LVL_MAX; i++) {
- hw_lvl = pf ? nix_tm_lvl2nix_tl1_root(i) :
- nix_tm_lvl2nix_tl2_root(i);
-
- switch (hw_lvl) {
- case NIX_TXSCH_LVL_SMQ:
- max = (roc_model_is_cn9k() ? NIX_CN9K_TXSCH_LVL_SMQ_MAX :
- (roc_model_is_cn10k() ? NIX_CN10K_TXSCH_LVL_SMQ_MAX :
- NIX_TXSCH_LVL_SMQ_MAX));
- break;
- case NIX_TXSCH_LVL_TL4:
- max = (roc_model_is_cn9k() ? NIX_CN9K_TXSCH_LVL_TL4_MAX :
- (roc_model_is_cn10k() ? NIX_CN10K_TXSCH_LVL_TL4_MAX :
- NIX_TXSCH_LVL_TL4_MAX));
- break;
- case NIX_TXSCH_LVL_TL3:
- max = (roc_model_is_cn9k() ? NIX_CN9K_TXSCH_LVL_TL3_MAX :
- (roc_model_is_cn10k() ? NIX_CN10K_TXSCH_LVL_TL3_MAX :
- NIX_TXSCH_LVL_TL3_MAX));
- break;
- case NIX_TXSCH_LVL_TL2:
- max = pf ? NIX_TXSCH_LVL_TL2_MAX : 1;
- break;
- case NIX_TXSCH_LVL_TL1:
- max = pf ? 1 : 0;
- break;
- default:
- max = 0;
- break;
- }
- schq[i] = max;
- }
-}
-
-bool
-roc_nix_tm_root_has_sp(struct roc_nix *roc_nix)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
-
- if (nix->tm_flags & NIX_TM_TL1_NO_SP)
- return false;
- return true;
-}
-
static inline struct nix *
pf_func_to_nix_get(uint16_t pf_func)
{
diff --git a/drivers/common/cnxk/roc_nix_tm_utils.c b/drivers/common/cnxk/roc_nix_tm_utils.c
index eaf6f9e4c7..158a37ff11 100644
--- a/drivers/common/cnxk/roc_nix_tm_utils.c
+++ b/drivers/common/cnxk/roc_nix_tm_utils.c
@@ -1019,19 +1019,6 @@ roc_nix_tm_leaf_cnt(struct roc_nix *roc_nix)
return leaf_cnt;
}
-int
-roc_nix_tm_node_lvl(struct roc_nix *roc_nix, uint32_t node_id)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct nix_tm_node *node;
-
- node = nix_tm_node_search(nix, node_id, ROC_NIX_TM_USER);
- if (!node)
- return NIX_ERR_TM_INVALID_NODE;
-
- return node->lvl;
-}
-
struct roc_nix_tm_node *
roc_nix_tm_node_get(struct roc_nix *roc_nix, uint32_t node_id)
{
@@ -1042,26 +1029,6 @@ roc_nix_tm_node_get(struct roc_nix *roc_nix, uint32_t node_id)
return (struct roc_nix_tm_node *)node;
}
-struct roc_nix_tm_node *
-roc_nix_tm_node_next(struct roc_nix *roc_nix, struct roc_nix_tm_node *__prev)
-{
- struct nix_tm_node *prev = (struct nix_tm_node *)__prev;
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct nix_tm_node_list *list;
-
- list = nix_tm_node_list(nix, ROC_NIX_TM_USER);
-
- /* HEAD of the list */
- if (!prev)
- return (struct roc_nix_tm_node *)TAILQ_FIRST(list);
-
- /* Next entry */
- if (prev->tree != ROC_NIX_TM_USER)
- return NULL;
-
- return (struct roc_nix_tm_node *)TAILQ_NEXT(prev, node);
-}
-
struct roc_nix_tm_shaper_profile *
roc_nix_tm_shaper_profile_get(struct roc_nix *roc_nix, uint32_t profile_id)
{
@@ -1072,24 +1039,6 @@ roc_nix_tm_shaper_profile_get(struct roc_nix *roc_nix, uint32_t profile_id)
return (struct roc_nix_tm_shaper_profile *)profile;
}
-struct roc_nix_tm_shaper_profile *
-roc_nix_tm_shaper_profile_next(struct roc_nix *roc_nix,
- struct roc_nix_tm_shaper_profile *__prev)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct nix_tm_shaper_profile_list *list;
- struct nix_tm_shaper_profile *prev;
-
- prev = (struct nix_tm_shaper_profile *)__prev;
- list = &nix->shaper_profile_list;
-
- /* HEAD of the list */
- if (!prev)
- return (struct roc_nix_tm_shaper_profile *)TAILQ_FIRST(list);
-
- return (struct roc_nix_tm_shaper_profile *)TAILQ_NEXT(prev, shaper);
-}
-
struct nix_tm_node *
nix_tm_node_alloc(void)
{
diff --git a/drivers/common/cnxk/roc_nix_vlan.c b/drivers/common/cnxk/roc_nix_vlan.c
index 16100eb5d6..5240a95b08 100644
--- a/drivers/common/cnxk/roc_nix_vlan.c
+++ b/drivers/common/cnxk/roc_nix_vlan.c
@@ -5,235 +5,6 @@
#include "roc_api.h"
#include "roc_priv.h"
-int
-roc_nix_vlan_mcam_entry_read(struct roc_nix *roc_nix, uint32_t index,
- void **rsp)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct npc_mcam_read_entry_req *req;
- int rc = -ENOSPC;
-
- req = mbox_alloc_msg_npc_mcam_read_entry(mbox);
- if (req == NULL)
- goto exit;
- req->entry = index;
-
- rc = mbox_process_msg(mbox, (void **)rsp);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_vlan_mcam_entry_write(struct roc_nix *roc_nix, uint32_t index, void *entry, uint8_t intf,
- uint8_t enable)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct npc_mcam_write_entry_req *req;
- struct npc_cn20k_mcam_write_entry_req *cn20k_req;
- struct msghdr *rsp;
- int rc = -ENOSPC;
-
- if (roc_model_is_cn20k()) {
- cn20k_req = mbox_alloc_msg_npc_cn20k_mcam_write_entry(mbox);
- if (cn20k_req == NULL)
- goto exit;
- cn20k_req->entry = index;
- cn20k_req->intf = intf;
- cn20k_req->enable_entry = enable;
- mbox_memcpy(&cn20k_req->entry_data, entry, sizeof(struct cn20k_mcam_entry));
- } else {
- req = mbox_alloc_msg_npc_mcam_write_entry(mbox);
- if (req == NULL)
- goto exit;
- req->entry = index;
- req->intf = intf;
- req->enable_entry = enable;
- mbox_memcpy(&req->entry_data, entry, sizeof(struct mcam_entry));
- }
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_vlan_mcam_entry_alloc_and_write(struct roc_nix *roc_nix, void *entry, uint8_t intf,
- uint8_t priority, uint8_t ref_entry)
-{
- struct npc_mcam_alloc_and_write_entry_rsp *rsp;
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- int rc = -ENOSPC;
-
- if (roc_model_is_cn20k()) {
- struct npc_cn20k_mcam_alloc_and_write_entry_req *req;
-
- req = mbox_alloc_msg_npc_cn20k_mcam_alloc_and_write_entry(mbox);
- if (req == NULL)
- goto exit;
- req->ref_prio = priority;
- req->ref_entry = ref_entry;
- req->intf = intf;
- req->enable_entry = true;
- mbox_memcpy(&req->entry_data, entry, sizeof(struct cn20k_mcam_entry));
-
- } else {
- struct npc_mcam_alloc_and_write_entry_req *req;
-
- req = mbox_alloc_msg_npc_mcam_alloc_and_write_entry(mbox);
- if (req == NULL)
- goto exit;
- req->ref_priority = priority;
- req->ref_entry = ref_entry;
- req->intf = intf;
- req->enable_entry = true;
- mbox_memcpy(&req->entry_data, entry, sizeof(struct mcam_entry));
- }
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- rc = rsp->entry;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_vlan_mcam_entry_free(struct roc_nix *roc_nix, uint32_t index)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct npc_mcam_free_entry_req *req;
- int rc = -ENOSPC;
-
- req = mbox_alloc_msg_npc_mcam_free_entry(mbox);
- if (req == NULL)
- goto exit;
- req->entry = index;
-
- rc = mbox_process_msg(mbox, NULL);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_vlan_mcam_entry_ena_dis(struct roc_nix *roc_nix, uint32_t index,
- const int enable)
-{
- struct npc_mcam_ena_dis_entry_req *req;
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- int rc = -ENOSPC;
-
- if (enable) {
- req = mbox_alloc_msg_npc_mcam_ena_entry(mbox);
- if (req == NULL)
- goto exit;
- } else {
- req = mbox_alloc_msg_npc_mcam_dis_entry(mbox);
- if (req == NULL)
- goto exit;
- }
-
- req->entry = index;
- rc = mbox_process_msg(mbox, NULL);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_vlan_strip_vtag_ena_dis(struct roc_nix *roc_nix, bool enable)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct nix_vtag_config *vtag_cfg;
- int rc = -ENOSPC;
-
- vtag_cfg = mbox_alloc_msg_nix_vtag_cfg(mbox);
- if (vtag_cfg == NULL)
- goto exit;
- vtag_cfg->vtag_size = NIX_VTAGSIZE_T4;
- vtag_cfg->cfg_type = 1; /* Rx VLAN configuration */
- vtag_cfg->rx.capture_vtag = 1; /* Always capture */
- vtag_cfg->rx.vtag_type = 0; /* Use index 0 */
-
- if (enable)
- vtag_cfg->rx.strip_vtag = 1;
- else
- vtag_cfg->rx.strip_vtag = 0;
-
- rc = mbox_process(mbox);
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_nix_vlan_insert_ena_dis(struct roc_nix *roc_nix,
- struct roc_nix_vlan_config *vlan_cfg,
- uint64_t *mcam_index, bool enable)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- struct mbox *mbox = mbox_get(dev->mbox);
- struct nix_vtag_config *vtag_cfg;
- struct nix_vtag_config_rsp *rsp;
- int rc = -ENOSPC;
-
- vtag_cfg = mbox_alloc_msg_nix_vtag_cfg(mbox);
- if (vtag_cfg == NULL)
- goto exit;
- vtag_cfg->cfg_type = 0; /* Tx VLAN configuration */
- vtag_cfg->vtag_size = NIX_VTAGSIZE_T4;
-
- if (enable) {
- if (vlan_cfg->type & ROC_NIX_VLAN_TYPE_INNER) {
- vtag_cfg->tx.vtag0 = vlan_cfg->vlan.vtag_inner;
- vtag_cfg->tx.cfg_vtag0 = true;
- }
- if (vlan_cfg->type & ROC_NIX_VLAN_TYPE_OUTER) {
- vtag_cfg->tx.vtag1 = vlan_cfg->vlan.vtag_outer;
- vtag_cfg->tx.cfg_vtag1 = true;
- }
- } else {
- if (vlan_cfg->type & ROC_NIX_VLAN_TYPE_INNER) {
- vtag_cfg->tx.vtag0_idx = vlan_cfg->mcam.idx_inner;
- vtag_cfg->tx.free_vtag0 = true;
- }
- if (vlan_cfg->type & ROC_NIX_VLAN_TYPE_OUTER) {
- vtag_cfg->tx.vtag1_idx = vlan_cfg->mcam.idx_outer;
- vtag_cfg->tx.free_vtag1 = true;
- }
- }
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- goto exit;
-
- if (enable)
- *mcam_index =
- (((uint64_t)rsp->vtag1_idx << 32) | rsp->vtag0_idx);
-
- rc = 0;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
nix_vlan_tpid_set(struct mbox *mbox, uint16_t pcifunc, uint32_t type, uint16_t tpid)
{
@@ -257,17 +28,3 @@ nix_vlan_tpid_set(struct mbox *mbox, uint16_t pcifunc, uint32_t type, uint16_t t
mbox_put(mbox);
return rc;
}
-
-int
-roc_nix_vlan_tpid_set(struct roc_nix *roc_nix, uint32_t type, uint16_t tpid)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct dev *dev = &nix->dev;
- int rc;
-
- rc = nix_vlan_tpid_set(dev->mbox, dev->pf_func, type, tpid);
- if (rc)
- plt_err("Failed to set tpid for PF, rc %d", rc);
-
- return rc;
-}
diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index 176a26dc6a..107fce8b61 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -464,65 +464,6 @@ npa_aura_fini(struct mbox *m_box, uint32_t aura_id)
return rc;
}
-int
-roc_npa_pool_op_pc_reset(uint64_t aura_handle)
-{
- struct npa_lf *lf = idev_npa_obj_get();
- struct npa_aq_enq_req *pool_req;
- struct npa_aq_enq_rsp *pool_rsp;
- struct ndc_sync_op *ndc_req;
- struct mbox_dev *mdev;
- int rc = -ENOSPC, off;
- struct mbox *mbox;
-
- if (lf == NULL)
- return NPA_ERR_PARAM;
-
- mbox = mbox_get(lf->mbox);
- mdev = &mbox->dev[0];
- plt_npa_dbg("lf=%p aura_handle=0x%" PRIx64, lf, aura_handle);
-
- pool_req = mbox_alloc_msg_npa_aq_enq(mbox);
- if (pool_req == NULL)
- goto exit;
- pool_req->aura_id = roc_npa_aura_handle_to_aura(aura_handle);
- pool_req->ctype = NPA_AQ_CTYPE_POOL;
- pool_req->op = NPA_AQ_INSTOP_WRITE;
- pool_req->pool.op_pc = 0;
- pool_req->pool_mask.op_pc = ~pool_req->pool_mask.op_pc;
-
- rc = mbox_process(mbox);
- if (rc < 0)
- goto exit;
-
- off = mbox->rx_start +
- PLT_ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
- pool_rsp = (struct npa_aq_enq_rsp *)((uintptr_t)mdev->mbase + off);
-
- if (pool_rsp->hdr.rc != 0) {
- rc = NPA_ERR_AURA_POOL_FINI;
- goto exit;
- }
-
- /* Sync NDC-NPA for LF */
- ndc_req = mbox_alloc_msg_ndc_sync_op(mbox);
- if (ndc_req == NULL) {
- rc = -ENOSPC;
- goto exit;
- }
- ndc_req->npa_lf_sync = 1;
- rc = mbox_process(mbox);
- if (rc) {
- plt_err("Error on NDC-NPA LF sync, rc %d", rc);
- rc = NPA_ERR_AURA_POOL_FINI;
- goto exit;
- }
- rc = 0;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
int
roc_npa_aura_drop_set(uint64_t aura_handle, uint64_t limit, bool ena)
{
@@ -1809,188 +1750,3 @@ roc_npa_dev_unlock(void)
if (idev != NULL)
plt_spinlock_unlock(&idev->npa_dev_lock);
}
-
-int
-roc_npa_dpc_alloc(uint8_t *counter_id, uint64_t conf)
-{
- struct npa_cn20k_dpc_alloc_req *req;
- struct npa_cn20k_dpc_alloc_rsp *rsp;
- int rc = NPA_ERR_DPC_ALLOC, off;
- struct mbox_dev *mdev;
- struct mbox *mbox;
- struct npa_lf *lf;
-
- lf = idev_npa_obj_get();
- if (lf == NULL) {
- rc = NPA_ERR_DEVICE_NOT_BOUNDED;
- return rc;
- }
- mdev = &lf->mbox->dev[0];
-
- mbox = mbox_get(lf->mbox);
- req = mbox_alloc_msg_npa_cn20k_dpc_alloc(mbox);
- if (req == NULL)
- goto exit;
-
- req->dpc_conf = conf;
- rc = mbox_process(mbox);
- if (rc < 0)
- goto exit;
-
- off = mbox->rx_start +
- PLT_ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
- rsp = (struct npa_cn20k_dpc_alloc_rsp *)((uintptr_t)mdev->mbase + off);
-
- if (rsp->hdr.rc != 0)
- goto exit;
-
- *counter_id = rsp->cntr_id;
- rc = 0;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_npa_dpc_free(uint8_t counter_id)
-{
- struct npa_cn20k_dpc_free_req *free_req;
- int rc = NPA_ERR_DPC_FREE, off;
- struct mbox_dev *mdev;
- struct msg_rsp *rsp;
- struct mbox *mbox;
- struct npa_lf *lf;
-
- lf = idev_npa_obj_get();
- if (lf == NULL) {
- rc = NPA_ERR_DEVICE_NOT_BOUNDED;
- return rc;
- }
- mdev = &lf->mbox->dev[0];
- mbox = mbox_get(lf->mbox);
- free_req = mbox_alloc_msg_npa_cn20k_dpc_free(mbox);
- if (free_req == NULL)
- goto exit;
-
- free_req->cntr_id = counter_id;
- rc = mbox_process(mbox);
- if (rc < 0)
- goto exit;
-
- off = mbox->rx_start +
- PLT_ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
- rsp = (struct msg_rsp *)((uintptr_t)mdev->mbase + off);
- if (rsp->hdr.rc != 0)
- goto exit;
-
- rc = 0;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_npa_pool_dpc_enable(uint64_t aura_handle, uint8_t counter_id, uint32_t flags)
-{
- struct npa_cn20k_aq_enq_req *req;
- struct npa_cn20k_aq_enq_rsp *rsp;
- int rc = -ENOSPC, off;
- struct mbox_dev *mdev;
- struct mbox *mbox;
- struct npa_lf *lf;
-
- lf = idev_npa_obj_get();
- if (lf == NULL) {
- rc = NPA_ERR_DEVICE_NOT_BOUNDED;
- return rc;
- }
- mdev = &lf->mbox->dev[0];
- mbox = mbox_get(lf->mbox);
- req = mbox_alloc_msg_npa_cn20k_aq_enq(mbox);
- if (req == NULL)
- goto exit;
-
- req->aura_id = roc_npa_aura_handle_to_aura(aura_handle);
- req->op = NPA_AQ_INSTOP_WRITE;
- if (!(flags & ROC_NPA_HALO_F)) {
- /* Enable DPC in Aura */
- req->ctype = NPA_AQ_CTYPE_AURA;
- req->aura.op_dpc_ena = 1;
- req->aura.op_dpc_set = counter_id;
- req->aura_mask.op_dpc_ena = 1;
- req->aura_mask.op_dpc_set = 0;
- req->aura_mask.op_dpc_set = ~req->aura_mask.op_dpc_set;
- } else {
- /* Enable DPC in Halo */
- req->ctype = NPA_AQ_CTYPE_HALO;
- req->halo.op_dpc_ena = 1;
- req->halo.op_dpc_set = counter_id;
- req->halo_mask.op_dpc_ena = 1;
- req->halo_mask.op_dpc_set = 0;
- req->halo_mask.op_dpc_set = ~req->halo_mask.op_dpc_set;
- }
-
- rc = mbox_process(mbox);
- if (rc < 0)
- goto exit;
-
- off = mbox->rx_start +
- PLT_ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
- rsp = (struct npa_cn20k_aq_enq_rsp *)((uintptr_t)mdev->mbase + off);
- if (rsp->hdr.rc != 0)
- goto exit;
-
- rc = 0;
-exit:
- mbox_put(mbox);
- return rc;
-}
-
-int
-roc_npa_pool_dpc_disable(uint64_t aura_handle, uint32_t flags)
-{
- struct npa_cn20k_aq_enq_req *req;
- struct npa_cn20k_aq_enq_rsp *rsp;
- int rc = -ENOSPC, off;
- struct mbox_dev *mdev;
- struct mbox *mbox;
- struct npa_lf *lf;
-
- lf = idev_npa_obj_get();
- if (lf == NULL) {
- rc = NPA_ERR_DEVICE_NOT_BOUNDED;
- return rc;
- }
- mdev = &lf->mbox->dev[0];
- mbox = mbox_get(lf->mbox);
- req = mbox_alloc_msg_npa_cn20k_aq_enq(mbox);
- if (req == NULL)
- goto exit;
-
- req->aura_id = roc_npa_aura_handle_to_aura(aura_handle);
- req->op = NPA_AQ_INSTOP_WRITE;
- if (!(flags & ROC_NPA_HALO_F)) {
- req->ctype = NPA_AQ_CTYPE_AURA;
- req->aura.op_dpc_ena = 0;
- req->aura_mask.op_dpc_ena = 1;
- } else {
- req->ctype = NPA_AQ_CTYPE_HALO;
- req->halo.op_dpc_ena = 0;
- req->halo_mask.op_dpc_ena = 1;
- }
-
- rc = mbox_process(mbox);
- if (rc < 0)
- goto exit;
-
- off = mbox->rx_start +
- PLT_ALIGN(sizeof(struct mbox_hdr), MBOX_MSG_ALIGN);
- rsp = (struct npa_cn20k_aq_enq_rsp *)((uintptr_t)mdev->mbase + off);
- if (rsp->hdr.rc != 0)
- goto exit;
-
- rc = 0;
-exit:
- mbox_put(mbox);
- return rc;
-}
diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h
index 576460f1d7..c715348e65 100644
--- a/drivers/common/cnxk/roc_npa.h
+++ b/drivers/common/cnxk/roc_npa.h
@@ -894,19 +894,13 @@ uint16_t __roc_api roc_npa_pf_func_get(void);
/* Debug */
int roc_npa_ctx_dump(void);
-int roc_npa_dump(void);
/* Reset operation performance counter. */
-int roc_npa_pool_op_pc_reset(uint64_t aura_handle);
int roc_npa_aura_drop_set(uint64_t aura_handle, uint64_t limit,
bool ena);
void roc_npa_dev_lock(void);
void roc_npa_dev_unlock(void);
-int roc_npa_dpc_alloc(uint8_t *counter_id, uint64_t conf);
-int roc_npa_dpc_free(uint8_t counter_id);
-int roc_npa_pool_dpc_enable(uint64_t aura_handle, uint8_t counter_id, uint32_t flags);
-int roc_npa_pool_dpc_disable(uint64_t aura_handle, uint32_t flags);
#endif /* _ROC_NPA_H_ */
diff --git a/drivers/common/cnxk/roc_npa_debug.c b/drivers/common/cnxk/roc_npa_debug.c
index e2b50ae1c3..86f7603501 100644
--- a/drivers/common/cnxk/roc_npa_debug.c
+++ b/drivers/common/cnxk/roc_npa_debug.c
@@ -345,42 +345,3 @@ roc_npa_ctx_dump(void)
mbox_put(mbox);
return rc;
}
-
-int
-roc_npa_dump(void)
-{
- struct npa_lf *lf;
- int aura_cnt = 0;
- uint32_t i;
-
- lf = idev_npa_obj_get();
- if (lf == NULL)
- return NPA_ERR_DEVICE_NOT_BOUNDED;
-
- for (i = 0; i < lf->nr_pools; i++) {
- if (plt_bitmap_get(lf->npa_bmp, i))
- continue;
- aura_cnt++;
- }
-
- npa_dump("npa@%p", lf);
- npa_dump(" pf = %d", dev_get_pf(lf->pf_func));
- npa_dump(" vf = %d", dev_get_vf(lf->pf_func));
- npa_dump(" aura_cnt = %d", aura_cnt);
- npa_dump(" \tpci_dev = %p", lf->pci_dev);
- npa_dump(" \tnpa_bmp = %p", lf->npa_bmp);
- npa_dump(" \tnpa_bmp_mem = %p", lf->npa_bmp_mem);
- npa_dump(" \tnpa_qint_mem = %p", lf->npa_qint_mem);
- npa_dump(" \tintr_handle = %p", lf->intr_handle);
- npa_dump(" \tmbox = %p", lf->mbox);
- npa_dump(" \tbase = 0x%" PRIx64 "", lf->base);
- npa_dump(" \tstack_pg_ptrs = %d", lf->stack_pg_ptrs);
- npa_dump(" \tstack_pg_bytes = %d", lf->stack_pg_bytes);
- npa_dump(" \tnpa_msixoff = 0x%x", lf->npa_msixoff);
- npa_dump(" \tnr_pools = %d", lf->nr_pools);
- npa_dump(" \tpf_func = 0x%x", lf->pf_func);
- npa_dump(" \taura_sz = %d", lf->aura_sz);
- npa_dump(" \tqints = %d", lf->qints);
-
- return 0;
-}
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index f709c71e36..aecea84ee1 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -13,14 +13,6 @@ roc_npc_get_key_type(struct roc_npc *roc_npc, struct roc_npc_flow *flow)
return npc_get_key_type(npc, flow);
}
-uint8_t
-roc_npc_kex_key_type_config_get(struct roc_npc *roc_npc)
-{
- struct npc *npc = roc_npc_to_npc_priv(roc_npc);
-
- return npc_kex_key_type_config_get(npc);
-}
-
int
roc_npc_mark_actions_get(struct roc_npc *roc_npc)
{
@@ -158,21 +150,6 @@ roc_npc_mcam_free(struct roc_npc *roc_npc, struct roc_npc_flow *mcam)
return roc_npc_mcam_free_entry(roc_npc, mcam->mcam_id);
}
-int
-roc_npc_mcam_init(struct roc_npc *roc_npc, struct roc_npc_flow *flow,
- int mcam_id)
-{
- struct npc *npc = roc_npc_to_npc_priv(roc_npc);
- int rc;
-
- rc = npc_mcam_init(npc, flow, mcam_id);
- if (rc != 0) {
- plt_err("npc: mcam initialisation write failed");
- return rc;
- }
- return 0;
-}
-
int
roc_npc_mcam_move(struct roc_npc *roc_npc, uint16_t old_ent, uint16_t new_ent)
{
@@ -213,27 +190,6 @@ roc_npc_mcam_enable_all_entries(struct roc_npc *roc_npc, bool enable)
return npc_flow_enable_all_entries(npc, enable);
}
-void
-roc_npc_defrag_mcam_banks(struct roc_npc *roc_npc)
-{
- struct npc *npc = roc_npc_to_npc_priv(roc_npc);
- struct mbox *mbox = mbox_get(npc->mbox);
- struct npc_mcam_defrag_req *req;
- struct npc_mcam_defrag_rsp *rsp;
- int rc = 0;
-
- req = (struct npc_mcam_defrag_req *)mbox_alloc_msg_npc_defrag(mbox);
- if (req == NULL)
- goto exit;
-
- rc = mbox_process_msg(mbox, (void *)&rsp);
- if (rc)
- plt_err("Error when defragmenting MCAM banks.");
-
-exit:
- mbox_put(mbox);
-}
-
int
roc_npc_mcam_alloc_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam,
struct roc_npc_flow *ref_mcam, int prio, int *resp_count)
@@ -243,15 +199,6 @@ roc_npc_mcam_alloc_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam,
return npc_mcam_alloc_entry(npc, mcam, ref_mcam, prio, resp_count);
}
-int
-roc_npc_mcam_ena_dis_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam,
- bool enable)
-{
- struct npc *npc = roc_npc_to_npc_priv(roc_npc);
-
- return npc_mcam_ena_dis_entry(npc, mcam, enable);
-}
-
int
roc_npc_mcam_write_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam)
{
@@ -260,21 +207,6 @@ roc_npc_mcam_write_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam)
return npc_mcam_write_entry(npc->mbox, mcam);
}
-int
-roc_npc_get_low_priority_mcam(struct roc_npc *roc_npc)
-{
- struct npc *npc = roc_npc_to_npc_priv(roc_npc);
-
- if (roc_model_is_cn20k())
- return (npc->mcam_entries - NPC_MCAME_RESVD_10XX - 1);
- else if (roc_model_is_cn10k())
- return (npc->mcam_entries - NPC_MCAME_RESVD_10XX - 1);
- else if (roc_model_is_cn98xx())
- return (npc->mcam_entries - NPC_MCAME_RESVD_98XX - 1);
- else
- return (npc->mcam_entries - NPC_MCAME_RESVD_9XXX - 1);
-}
-
static int
npc_mcam_tot_entries(void)
{
@@ -297,30 +229,6 @@ roc_npc_profile_name_get(struct roc_npc *roc_npc)
return (char *)npc->profile_name;
}
-int
-roc_npc_kex_capa_get(struct roc_nix *roc_nix, uint64_t *kex_capability)
-{
- struct nix *nix = roc_nix_to_nix_priv(roc_nix);
- struct npc npc;
- int rc = 0;
-
- memset(&npc, 0, sizeof(npc));
-
- npc.mbox = (&nix->dev)->mbox;
-
- rc = npc_mcam_fetch_kex_cfg(&npc);
- if (rc)
- return rc;
-
- rc = npc_mcam_fetch_hw_cap(&npc, &npc.hash_extract_cap);
- if (rc)
- return rc;
-
- *kex_capability = npc_get_kex_capability(&npc);
-
- return 0;
-}
-
int
roc_npc_init(struct roc_npc *roc_npc)
{
@@ -509,31 +417,6 @@ roc_npc_skip_size_pkind_get(struct roc_npc *roc_npc)
return -1;
}
-int
-roc_npc_validate_portid_action(struct roc_npc *roc_npc_src, struct roc_npc *roc_npc_dst)
-{
- struct roc_nix *roc_nix_src = roc_npc_src->roc_nix;
- struct nix *nix_src = roc_nix_to_nix_priv(roc_nix_src);
- struct roc_nix *roc_nix_dst = roc_npc_dst->roc_nix;
- struct nix *nix_dst = roc_nix_to_nix_priv(roc_nix_dst);
-
- if (roc_nix_is_pf(roc_npc_dst->roc_nix)) {
- plt_err("Output port should be VF");
- return -EINVAL;
- }
-
- if (nix_dst->dev.vf >= nix_src->dev.maxvf) {
- plt_err("Invalid VF for output port");
- return -EINVAL;
- }
-
- if (nix_src->dev.pf != nix_dst->dev.pf) {
- plt_err("Output port should be VF of ingress PF");
- return -EINVAL;
- }
- return 0;
-}
-
static int
npc_parse_spi_to_sa_action(struct roc_npc *roc_npc, const struct roc_npc_action *act,
struct roc_npc_flow *flow, uint8_t *has_spi_to_sa_action)
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 60aa9cdbed..8481cca824 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -453,7 +453,6 @@ struct roc_npc {
int __roc_api roc_npc_init(struct roc_npc *roc_npc);
int __roc_api roc_npc_fini(struct roc_npc *roc_npc);
const char *__roc_api roc_npc_profile_name_get(struct roc_npc *roc_npc);
-int roc_npc_kex_capa_get(struct roc_nix *roc_nix, uint64_t *kex_capability);
struct roc_npc_flow *__roc_api roc_npc_flow_create(struct roc_npc *roc_npc,
const struct roc_npc_attr *attr,
@@ -470,19 +469,14 @@ int __roc_api roc_npc_mcam_alloc_entry(struct roc_npc *roc_npc, struct roc_npc_f
int roc_npc_mcam_alloc_entries(struct roc_npc *roc_npc, int ref_entry, int *alloc_entry,
int req_count, int priority, int *resp_count,
bool is_conti);
-int roc_npc_mcam_ena_dis_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam,
- bool enable);
int __roc_api roc_npc_mcam_write_entry(struct roc_npc *roc_npc, struct roc_npc_flow *mcam);
void roc_npc_mcam_write_rx_finalize(struct roc_npc *roc_npc, struct roc_npc_flow *flow);
-void roc_npc_defrag_mcam_banks(struct roc_npc *roc_npc);
uint8_t __roc_api roc_npc_get_key_type(struct roc_npc *roc_npc, struct roc_npc_flow *flow);
-uint8_t roc_npc_kex_key_type_config_get(struct roc_npc *roc_npc);
int __roc_api roc_npc_flow_parse(struct roc_npc *roc_npc, const struct roc_npc_attr *attr,
const struct roc_npc_item_info pattern[],
const struct roc_npc_action actions[], struct roc_npc_flow *flow);
-int roc_npc_get_low_priority_mcam(struct roc_npc *roc_npc);
int __roc_api roc_npc_mcam_free_counter(struct roc_npc *roc_npc, uint16_t ctr_id);
int __roc_api roc_npc_mcam_read_counter(struct roc_npc *roc_npc, uint32_t ctr_id, uint64_t *count);
int __roc_api roc_npc_mcam_clear_counter(struct roc_npc *roc_npc, uint32_t ctr_id);
@@ -501,9 +495,6 @@ int __roc_api roc_npc_vtag_actions_sub_return(struct roc_npc *roc_npc, uint32_t
int __roc_api roc_npc_mcam_merge_base_steering_rule(struct roc_npc *roc_npc,
struct roc_npc_flow *flow);
int __roc_api roc_npc_mcam_default_rule_action_get(struct roc_npc *roc_npc, uint64_t *action);
-int roc_npc_validate_portid_action(struct roc_npc *roc_npc_src,
- struct roc_npc *roc_npc_dst);
-int roc_npc_mcam_init(struct roc_npc *roc_npc, struct roc_npc_flow *flow, int mcam_id);
int __roc_api roc_npc_mcam_move(struct roc_npc *roc_npc, uint16_t old_ent, uint16_t new_ent);
void *__roc_api roc_npc_aged_flow_ctx_get(struct roc_npc *roc_npc, uint32_t mcam_id);
void roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base,
diff --git a/drivers/common/cnxk/roc_ree.c b/drivers/common/cnxk/roc_ree.c
index 923d9251ad..447b52d0fa 100644
--- a/drivers/common/cnxk/roc_ree.c
+++ b/drivers/common/cnxk/roc_ree.c
@@ -200,31 +200,6 @@ roc_ree_af_reg_read(struct roc_ree_vf *vf, uint64_t reg, uint64_t *val)
return 0;
}
-int
-roc_ree_af_reg_write(struct roc_ree_vf *vf, uint64_t reg, uint64_t val)
-{
- struct ree_rd_wr_reg_msg *msg;
- struct mbox *mbox;
-
- mbox = vf->dev->mbox;
- msg = (struct ree_rd_wr_reg_msg *)mbox_alloc_msg_rsp(
- mbox, 0, sizeof(*msg), sizeof(*msg));
- if (msg == NULL) {
- plt_err("Could not allocate mailbox message");
- return -EFAULT;
- }
-
- msg->hdr.id = MBOX_MSG_REE_RD_WR_REGISTER;
- msg->hdr.sig = MBOX_REQ_SIG;
- msg->hdr.pcifunc = vf->dev->pf_func;
- msg->is_write = 1;
- msg->reg_offset = reg;
- msg->val = val;
- msg->blkaddr = vf->block_address;
-
- return ree_send_mbox_msg(vf);
-}
-
int
roc_ree_rule_db_get(struct roc_ree_vf *vf, char *rule_db, uint32_t rule_db_len,
char *rule_dbi, uint32_t rule_dbi_len)
@@ -464,62 +439,6 @@ roc_ree_err_intr_unregister(struct roc_ree_vf *vf)
vf->err_intr_registered = 0;
}
-static int
-roc_ree_lf_err_intr_register(struct roc_ree_vf *vf, uint16_t msix_off,
- uintptr_t base)
-{
- struct plt_pci_device *pci_dev = vf->pci_dev;
- int ret;
-
- /* Disable error interrupts */
- plt_write64(~0ull, base + REE_LF_MISC_INT_ENA_W1C);
-
- /* Register error interrupt handler */
- ret = dev_irq_register(pci_dev->intr_handle,
- roc_ree_lf_err_intr_handler, (void *)base,
- msix_off);
- if (ret)
- return ret;
-
- /* Enable error interrupts */
- plt_write64(~0ull, base + REE_LF_MISC_INT_ENA_W1S);
-
- return 0;
-}
-
-int
-roc_ree_err_intr_register(struct roc_ree_vf *vf)
-{
- uint32_t i, j, ret;
- uintptr_t base;
-
- for (i = 0; i < vf->nb_queues; i++) {
- if (vf->lf_msixoff[i] == MSIX_VECTOR_INVALID) {
- plt_err("Invalid REE LF MSI-X offset: 0x%x",
- vf->lf_msixoff[i]);
- return -EINVAL;
- }
- }
-
- for (i = 0; i < vf->nb_queues; i++) {
- base = REE_LF_BAR2(vf, i);
- ret = roc_ree_lf_err_intr_register(vf, vf->lf_msixoff[i], base);
- if (ret)
- goto intr_unregister;
- }
-
- vf->err_intr_registered = 1;
- return 0;
-
-intr_unregister:
- /* Unregister the ones already registered */
- for (j = 0; j < i; j++) {
- base = REE_LF_BAR2(vf, j);
- roc_ree_lf_err_intr_unregister(vf, vf->lf_msixoff[j], base);
- }
- return ret;
-}
-
int
roc_ree_iq_enable(struct roc_ree_vf *vf, const struct roc_ree_qp *qp,
uint8_t pri, uint32_t size_div2)
diff --git a/drivers/common/cnxk/roc_ree.h b/drivers/common/cnxk/roc_ree.h
index 9e9bd983aa..5afe7da8b4 100644
--- a/drivers/common/cnxk/roc_ree.h
+++ b/drivers/common/cnxk/roc_ree.h
@@ -115,8 +115,6 @@ int roc_ree_config_lf(struct roc_ree_vf *vf, uint8_t lf, uint8_t pri,
uint32_t size);
int roc_ree_af_reg_read(struct roc_ree_vf *vf, uint64_t reg,
uint64_t *val);
-int roc_ree_af_reg_write(struct roc_ree_vf *vf, uint64_t reg,
- uint64_t val);
int __roc_api roc_ree_rule_db_get(struct roc_ree_vf *vf, char *rule_db,
uint32_t rule_db_len, char *rule_dbi,
uint32_t rule_dbi_len);
@@ -128,7 +126,6 @@ int __roc_api roc_ree_rule_db_prog(struct roc_ree_vf *vf, const char *rule_db,
uint32_t rule_dbi_len);
uintptr_t __roc_api roc_ree_qp_get_base(struct roc_ree_vf *vf, uint16_t qp_id);
void __roc_api roc_ree_err_intr_unregister(struct roc_ree_vf *vf);
-int roc_ree_err_intr_register(struct roc_ree_vf *vf);
int __roc_api roc_ree_iq_enable(struct roc_ree_vf *vf,
const struct roc_ree_qp *qp, uint8_t pri,
uint32_t size_div128);
diff --git a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c
index b674dcf70c..98accfc399 100644
--- a/drivers/common/cnxk/roc_sso.c
+++ b/drivers/common/cnxk/roc_sso.c
@@ -356,26 +356,6 @@ roc_sso_pf_func_get(void)
return idev_sso_pffunc_get();
}
-uint64_t
-roc_sso_ns_to_gw(uint64_t base, uint64_t ns)
-{
- uint64_t current_us;
-
- current_us = plt_read64(base + SSOW_LF_GWS_NW_TIM);
- /* From HRM, table 14-19:
- * The SSOW_LF_GWS_NW_TIM[NW_TIM] period is specified in n-1 notation.
- */
- current_us += 1;
-
- /* From HRM, table 14-1:
- * SSOW_LF_GWS_NW_TIM[NW_TIM] specifies the minimum timeout. The SSO
- * hardware times out a GET_WORK request within 1 usec of the minimum
- * timeout specified by SSOW_LF_GWS_NW_TIM[NW_TIM].
- */
- current_us += 1;
- return PLT_MAX(1UL, (uint64_t)PLT_DIV_CEIL(ns, (current_us * 1E3)));
-}
-
int
roc_sso_hws_link(struct roc_sso *roc_sso, uint8_t hws, uint16_t hwgrp[], uint16_t nb_hwgrp,
uint8_t set, bool use_mbox)
@@ -705,26 +685,6 @@ roc_sso_hwgrp_agq_release(struct roc_sso *roc_sso, uint16_t hwgrp)
mbox_put(mbox);
}
-uint32_t
-roc_sso_hwgrp_agq_from_tag(struct roc_sso *roc_sso, uint16_t hwgrp, uint32_t tag_mask,
- uint8_t xqe_type)
-{
- struct sso *sso = roc_sso_to_sso_priv(roc_sso);
- struct sso_agq_ctx *ctx;
- uint32_t i;
-
- plt_rmb();
- ctx = (struct sso_agq_ctx *)sso->agg_mem[hwgrp];
- for (i = 0; i < sso->agg_used[hwgrp]; i++) {
- if (!ctx[i].ena)
- continue;
- if (ctx[i].tag == tag_mask && ctx[i].xqe_type == xqe_type)
- return i;
- }
-
- return UINT32_MAX;
-}
-
int
roc_sso_hwgrp_stats_get(struct roc_sso *roc_sso, uint16_t hwgrp, struct roc_sso_hwgrp_stats *stats)
{
@@ -771,16 +731,6 @@ roc_sso_hwgrp_stats_get(struct roc_sso *roc_sso, uint16_t hwgrp, struct roc_sso_
return rc;
}
-int
-roc_sso_hwgrp_hws_link_status(struct roc_sso *roc_sso, uint8_t hws,
- uint16_t hwgrp)
-{
- struct sso *sso;
-
- sso = roc_sso_to_sso_priv(roc_sso);
- return plt_bitmap_get(sso->link_map[hws], hwgrp);
-}
-
int
roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso, struct roc_sso_hwgrp_qos *qos, uint16_t nb_qos)
{
@@ -1047,20 +997,6 @@ sso_hwgrp_release_xaq(struct dev *dev, uint16_t hwgrps)
return rc;
}
-int
-roc_sso_hwgrp_release_xaq(struct roc_sso *roc_sso, uint16_t hwgrps)
-{
- struct sso *sso = roc_sso_to_sso_priv(roc_sso);
- struct dev *dev = &sso->dev;
- int rc;
-
- if (!hwgrps)
- return 0;
-
- rc = sso_hwgrp_release_xaq(dev, hwgrps);
- return rc;
-}
-
int
roc_sso_hwgrp_set_priority(struct roc_sso *roc_sso, uint16_t hwgrp,
uint8_t weight, uint8_t affinity, uint8_t priority)
diff --git a/drivers/common/cnxk/roc_sso.h b/drivers/common/cnxk/roc_sso.h
index 43af938a8e..da16cc1efb 100644
--- a/drivers/common/cnxk/roc_sso.h
+++ b/drivers/common/cnxk/roc_sso.h
@@ -88,18 +88,13 @@ int __roc_api roc_sso_hwgrp_qos_config(struct roc_sso *roc_sso,
uint16_t nb_qos);
int __roc_api roc_sso_hwgrp_alloc_xaq(struct roc_sso *roc_sso,
uint32_t npa_aura_id, uint16_t hwgrps);
-int roc_sso_hwgrp_release_xaq(struct roc_sso *roc_sso,
- uint16_t hwgrps);
int __roc_api roc_sso_hwgrp_set_priority(struct roc_sso *roc_sso,
uint16_t hwgrp, uint8_t weight,
uint8_t affinity, uint8_t priority);
-uint64_t roc_sso_ns_to_gw(uint64_t base, uint64_t ns);
int __roc_api roc_sso_hws_link(struct roc_sso *roc_sso, uint8_t hws, uint16_t hwgrp[],
uint16_t nb_hwgrp, uint8_t set, bool use_mbox);
int __roc_api roc_sso_hws_unlink(struct roc_sso *roc_sso, uint8_t hws, uint16_t hwgrp[],
uint16_t nb_hwgrp, uint8_t set, bool use_mbox);
-int roc_sso_hwgrp_hws_link_status(struct roc_sso *roc_sso,
- uint8_t hws, uint16_t hwgrp);
uintptr_t __roc_api roc_sso_hws_base_get(struct roc_sso *roc_sso, uint8_t hws);
uintptr_t __roc_api roc_sso_hwgrp_base_get(struct roc_sso *roc_sso,
uint16_t hwgrp);
@@ -116,8 +111,6 @@ int __roc_api roc_sso_hwgrp_agq_alloc(struct roc_sso *roc_sso, uint16_t hwgrp,
struct roc_sso_agq_data *data, uint32_t *agq_id);
void __roc_api roc_sso_hwgrp_agq_free(struct roc_sso *roc_sso, uint16_t hwgrp, uint32_t agq_id);
void roc_sso_hwgrp_agq_release(struct roc_sso *roc_sso, uint16_t hwgrp);
-uint32_t roc_sso_hwgrp_agq_from_tag(struct roc_sso *roc_sso, uint16_t hwgrp, uint32_t tag,
- uint8_t xqe_type);
/* Utility function */
uint16_t __roc_api roc_sso_pf_func_get(void);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 27/45] common/mlx5: remove unused internal functions
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (25 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 26/45] common/cnxk: remove unused roc functions Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-30 10:51 ` Dariusz Sosnowski
2026-11-29 20:49 ` [PATCH 28/45] bus/fslmc: remove unused VFIO helpers Stephen Hemminger
` (18 subsequent siblings)
45 siblings, 1 reply; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Dariusz Sosnowski, Viacheslav Ovsiienko,
Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad, Anatoly Burakov
The IMPORT_KEK and CREDENTIAL object creation commands, the NIC
register write command, the list lookup helper and the multi-process
un-init functions have no caller. Remove them along with their
declarations.
mlx5_memory_stat_dump() is left alone; it is a debug helper meant to
be called from a debugger.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/mlx5/mlx5_common_mp.c | 20 ----
drivers/common/mlx5/mlx5_common_mp.h | 2 -
drivers/common/mlx5/mlx5_common_utils.c | 6 --
drivers/common/mlx5/mlx5_common_utils.h | 2 -
drivers/common/mlx5/mlx5_devx_cmds.c | 135 ------------------------
drivers/common/mlx5/mlx5_devx_cmds.h | 11 --
6 files changed, 176 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common_mp.c b/drivers/common/mlx5/mlx5_common_mp.c
index dd05c17a6e..e01010fa7b 100644
--- a/drivers/common/mlx5/mlx5_common_mp.c
+++ b/drivers/common/mlx5/mlx5_common_mp.c
@@ -210,16 +210,6 @@ mlx5_mp_init_primary(const char *name, const rte_mp_t primary_action)
return 0;
}
-/**
- * Un-initialize by primary process.
- */
-void
-mlx5_mp_uninit_primary(const char *name)
-{
- MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_PRIMARY);
- rte_mp_action_unregister(name);
-}
-
/**
* Initialize by secondary process.
*/
@@ -230,13 +220,3 @@ mlx5_mp_init_secondary(const char *name, const rte_mp_t secondary_action)
MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
return rte_mp_action_register(name, secondary_action);
}
-
-/**
- * Un-initialize by secondary process.
- */
-void
-mlx5_mp_uninit_secondary(const char *name)
-{
- MLX5_ASSERT(rte_eal_process_type() == RTE_PROC_SECONDARY);
- rte_mp_action_unregister(name);
-}
diff --git a/drivers/common/mlx5/mlx5_common_mp.h b/drivers/common/mlx5/mlx5_common_mp.h
index eb1d9521a0..5b3af37e0c 100644
--- a/drivers/common/mlx5/mlx5_common_mp.h
+++ b/drivers/common/mlx5/mlx5_common_mp.h
@@ -126,10 +126,8 @@ mp_init_port_agnostic_msg(struct rte_mp_msg *msg, enum mlx5_mp_req_type type)
__rte_internal
int mlx5_mp_init_primary(const char *name, const rte_mp_t primary_action);
-void mlx5_mp_uninit_primary(const char *name);
__rte_internal
int mlx5_mp_init_secondary(const char *name, const rte_mp_t secondary_action);
-void mlx5_mp_uninit_secondary(const char *name);
int mlx5_mp_req_mr_create(struct mlx5_common_device *cdev, uintptr_t addr);
int mlx5_mp_req_mempool_reg(struct mlx5_common_device *cdev,
struct rte_mempool *mempool, bool reg,
diff --git a/drivers/common/mlx5/mlx5_common_utils.c b/drivers/common/mlx5/mlx5_common_utils.c
index f6f7c27f76..bb084aeb80 100644
--- a/drivers/common/mlx5/mlx5_common_utils.c
+++ b/drivers/common/mlx5/mlx5_common_utils.c
@@ -122,12 +122,6 @@ _mlx5_list_lookup(struct mlx5_list_inconst *l_inconst,
return entry;
}
-struct mlx5_list_entry *
-mlx5_list_lookup(struct mlx5_list *list, void *ctx)
-{
- return _mlx5_list_lookup(&list->l_inconst, &list->l_const, ctx);
-}
-
static struct mlx5_list_entry *
mlx5_list_cache_insert(struct mlx5_list_inconst *l_inconst,
diff --git a/drivers/common/mlx5/mlx5_common_utils.h b/drivers/common/mlx5/mlx5_common_utils.h
index 4f20058245..7dd966ff72 100644
--- a/drivers/common/mlx5/mlx5_common_utils.h
+++ b/drivers/common/mlx5/mlx5_common_utils.h
@@ -184,8 +184,6 @@ struct mlx5_list *mlx5_list_create(const char *name, void *ctx,
* @return
* Pointer of the list entry if found, NULL otherwise.
*/
-struct mlx5_list_entry *mlx5_list_lookup(struct mlx5_list *list,
- void *ctx);
/**
* Reuse or create an entry to the mlx5 list.
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index 93c0d8d329..ad61765070 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -138,46 +138,6 @@ mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id, uint32_t arg,
* @return
* 0 on success, a negative value otherwise.
*/
-int
-mlx5_devx_cmd_register_write(void *ctx, uint16_t reg_id, uint32_t arg,
- uint32_t *data, uint32_t dw_cnt)
-{
- uint32_t in[MLX5_ST_SZ_DW(access_register_in) +
- MLX5_ACCESS_REGISTER_DATA_DWORD_MAX] = {0};
- uint32_t out[MLX5_ST_SZ_DW(access_register_out)] = {0};
- int rc;
- void *ptr;
-
- MLX5_ASSERT(data && dw_cnt);
- MLX5_ASSERT(dw_cnt <= MLX5_ACCESS_REGISTER_DATA_DWORD_MAX);
- if (dw_cnt > MLX5_ACCESS_REGISTER_DATA_DWORD_MAX) {
- DRV_LOG(ERR, "Data to write exceeds max size");
- return -1;
- }
- MLX5_SET(access_register_in, in, opcode,
- MLX5_CMD_OP_ACCESS_REGISTER_USER);
- MLX5_SET(access_register_in, in, op_mod,
- MLX5_ACCESS_REGISTER_IN_OP_MOD_WRITE);
- MLX5_SET(access_register_in, in, register_id, reg_id);
- MLX5_SET(access_register_in, in, argument, arg);
- ptr = MLX5_ADDR_OF(access_register_in, in, register_data);
- memcpy(ptr, data, dw_cnt * sizeof(uint32_t));
- rc = mlx5_glue->devx_general_cmd(ctx, in, sizeof(in), out, sizeof(out));
- if (rc || MLX5_FW_STATUS(out)) {
- DEVX_DRV_LOG(ERR, out, "write access", "NIC register", reg_id);
- return MLX5_DEVX_ERR_RC(rc);
- }
- rc = mlx5_glue->devx_general_cmd(ctx, in,
- MLX5_ST_SZ_BYTES(access_register_in) +
- dw_cnt * sizeof(uint32_t),
- out, sizeof(out));
- if (rc || MLX5_FW_STATUS(out)) {
- DEVX_DRV_LOG(ERR, out, "write access", "NIC register", reg_id);
- return MLX5_DEVX_ERR_RC(rc);
- }
- return 0;
-}
-
RTE_EXPORT_INTERNAL_SYMBOL(mlx5_devx_cmd_flow_counter_alloc_general)
struct mlx5_devx_obj *
mlx5_devx_cmd_flow_counter_alloc_general(void *ctx,
@@ -3378,101 +3338,6 @@ mlx5_devx_cmd_create_dek_obj(void *ctx, struct mlx5_devx_dek_attr *attr)
return dek_obj;
}
-/**
- * Create general object of type IMPORT_KEK using DevX API.
- *
- * @param[in] ctx
- * Context returned from mlx5 open_device() glue function.
- * @param [in] attr
- * Pointer to IMPORT_KEK attributes structure.
- *
- * @return
- * The DevX object created, NULL otherwise and rte_errno is set.
- */
-struct mlx5_devx_obj *
-mlx5_devx_cmd_create_import_kek_obj(void *ctx,
- struct mlx5_devx_import_kek_attr *attr)
-{
- uint32_t in[MLX5_ST_SZ_DW(create_import_kek_in)] = {0};
- uint32_t out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)] = {0};
- struct mlx5_devx_obj *import_kek_obj = NULL;
- void *ptr = NULL, *key_addr = NULL;
-
- import_kek_obj = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*import_kek_obj),
- 0, SOCKET_ID_ANY);
- if (import_kek_obj == NULL) {
- DRV_LOG(ERR, "Failed to allocate IMPORT_KEK object data");
- rte_errno = ENOMEM;
- return NULL;
- }
- ptr = MLX5_ADDR_OF(create_import_kek_in, in, hdr);
- MLX5_SET(general_obj_in_cmd_hdr, ptr, opcode,
- MLX5_CMD_OP_CREATE_GENERAL_OBJECT);
- MLX5_SET(general_obj_in_cmd_hdr, ptr, obj_type,
- MLX5_GENERAL_OBJ_TYPE_IMPORT_KEK);
- ptr = MLX5_ADDR_OF(create_import_kek_in, in, import_kek);
- MLX5_SET(import_kek, ptr, key_size, attr->key_size);
- key_addr = MLX5_ADDR_OF(import_kek, ptr, key);
- memcpy(key_addr, (void *)(attr->key), MLX5_CRYPTO_KEY_MAX_SIZE);
- import_kek_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
- out, sizeof(out));
- if (import_kek_obj->obj == NULL) {
- DEVX_DRV_LOG(ERR, out, "create IMPORT_KEK", NULL, 0);
- mlx5_free(import_kek_obj);
- return NULL;
- }
- import_kek_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);
- return import_kek_obj;
-}
-
-/**
- * Create general object of type CREDENTIAL using DevX API.
- *
- * @param[in] ctx
- * Context returned from mlx5 open_device() glue function.
- * @param [in] attr
- * Pointer to CREDENTIAL attributes structure.
- *
- * @return
- * The DevX object created, NULL otherwise and rte_errno is set.
- */
-struct mlx5_devx_obj *
-mlx5_devx_cmd_create_credential_obj(void *ctx,
- struct mlx5_devx_credential_attr *attr)
-{
- uint32_t in[MLX5_ST_SZ_DW(create_credential_in)] = {0};
- uint32_t out[MLX5_ST_SZ_DW(general_obj_out_cmd_hdr)] = {0};
- struct mlx5_devx_obj *credential_obj = NULL;
- void *ptr = NULL, *credential_addr = NULL;
-
- credential_obj = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*credential_obj),
- 0, SOCKET_ID_ANY);
- if (credential_obj == NULL) {
- DRV_LOG(ERR, "Failed to allocate CREDENTIAL object data");
- rte_errno = ENOMEM;
- return NULL;
- }
- ptr = MLX5_ADDR_OF(create_credential_in, in, hdr);
- MLX5_SET(general_obj_in_cmd_hdr, ptr, opcode,
- MLX5_CMD_OP_CREATE_GENERAL_OBJECT);
- MLX5_SET(general_obj_in_cmd_hdr, ptr, obj_type,
- MLX5_GENERAL_OBJ_TYPE_CREDENTIAL);
- ptr = MLX5_ADDR_OF(create_credential_in, in, credential);
- MLX5_SET(credential, ptr, credential_role, attr->credential_role);
- credential_addr = MLX5_ADDR_OF(credential, ptr, credential);
- memcpy(credential_addr, (void *)(attr->credential),
- MLX5_CRYPTO_CREDENTIAL_SIZE);
- credential_obj->obj = mlx5_glue->devx_obj_create(ctx, in, sizeof(in),
- out, sizeof(out));
- if (credential_obj->obj == NULL) {
- DEVX_DRV_LOG(ERR, out, "create CREDENTIAL", NULL, 0);
- mlx5_free(credential_obj);
- return NULL;
- }
- credential_obj->id = MLX5_GET(general_obj_out_cmd_hdr, out, obj_id);
- return credential_obj;
-}
-
/**
* Create general object of type CRYPTO_LOGIN using DevX API.
*
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.h b/drivers/common/mlx5/mlx5_devx_cmds.h
index d6f0d35d91..a6e0699d4c 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.h
+++ b/drivers/common/mlx5/mlx5_devx_cmds.h
@@ -843,9 +843,6 @@ __rte_internal
int mlx5_devx_cmd_register_read(void *ctx, uint16_t reg_id,
uint32_t arg, uint32_t *data, uint32_t dw_cnt);
-int mlx5_devx_cmd_register_write(void *ctx, uint16_t reg_id,
- uint32_t arg, uint32_t *data, uint32_t dw_cnt);
-
__rte_internal
struct mlx5_devx_obj *
mlx5_devx_cmd_create_geneve_tlv_option(void *ctx,
@@ -921,14 +918,6 @@ __rte_internal
struct mlx5_devx_obj *
mlx5_devx_cmd_create_dek_obj(void *ctx, struct mlx5_devx_dek_attr *attr);
-struct mlx5_devx_obj *
-mlx5_devx_cmd_create_import_kek_obj(void *ctx,
- struct mlx5_devx_import_kek_attr *attr);
-
-struct mlx5_devx_obj *
-mlx5_devx_cmd_create_credential_obj(void *ctx,
- struct mlx5_devx_credential_attr *attr);
-
__rte_internal
struct mlx5_devx_obj *
mlx5_devx_cmd_create_crypto_login_obj(void *ctx,
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 28/45] bus/fslmc: remove unused VFIO helpers
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (26 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 27/45] common/mlx5: remove unused internal functions Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 29/45] bus/dpaa: remove unused FMan and netcfg helpers Stephen Hemminger
` (17 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
The IO IOVA conversion helpers and rte_fslmc_vfio_mem_dmaunmap()
have no caller. The dpaa2 drivers use the DMA map path and the
generic conversion helpers.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/fslmc/bus_fslmc_driver.h | 8 -------
drivers/bus/fslmc/fslmc_vfio.c | 36 ----------------------------
2 files changed, 44 deletions(-)
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 2e2fbd67e6..2ed17f3b08 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -127,8 +127,6 @@ struct rte_dpaa2_object {
int
rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size);
-int
-rte_fslmc_vfio_mem_dmaunmap(uint64_t iova, uint64_t size);
/**
* A structure describing a DPAA2 driver.
@@ -143,8 +141,6 @@ struct rte_dpaa2_driver {
int
rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size);
-int
-rte_fslmc_vfio_mem_dmaunmap(uint64_t iova, uint64_t size);
__rte_internal
uint64_t
rte_fslmc_cold_mem_vaddr_to_iova(void *vaddr,
@@ -158,10 +154,6 @@ rte_fslmc_mem_vaddr_to_iova(void *vaddr);
__rte_internal
__rte_hot void *
rte_fslmc_mem_iova_to_vaddr(uint64_t iova);
-uint64_t
-rte_fslmc_io_vaddr_to_iova(void *vaddr);
-void *
-rte_fslmc_io_iova_to_vaddr(uint64_t iova);
/**
* Register a DPAA2 driver.
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 8b5c2b637a..466e688c62 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -1060,36 +1060,6 @@ rte_fslmc_mem_iova_to_vaddr(uint64_t iova)
return rte_fslmc_cold_mem_iova_to_vaddr(iova, 0);
}
-uint64_t
-rte_fslmc_io_vaddr_to_iova(void *vaddr)
-{
- struct fslmc_dmaseg *dmaseg = NULL;
- uint64_t va = (uint64_t)vaddr;
-
- TAILQ_FOREACH(dmaseg, &fslmc_iosegs, next) {
- if ((va >= dmaseg->vaddr) &&
- va < dmaseg->vaddr + dmaseg->size)
- return dmaseg->iova + va - dmaseg->vaddr;
- }
-
- return RTE_BAD_IOVA;
-}
-
-void *
-rte_fslmc_io_iova_to_vaddr(uint64_t iova)
-{
- struct fslmc_dmaseg *dmaseg = NULL;
-
- TAILQ_FOREACH(dmaseg, &fslmc_iosegs, next) {
- if ((iova >= dmaseg->iova) &&
- iova < dmaseg->iova + dmaseg->size)
- return (void *)((uintptr_t)dmaseg->vaddr
- + (uintptr_t)(iova - dmaseg->iova));
- }
-
- return NULL;
-}
-
static void
fslmc_memevent_cb(enum rte_mem_event type, const void *addr,
size_t len, void *arg __rte_unused)
@@ -1193,12 +1163,6 @@ rte_fslmc_vfio_mem_dmamap(uint64_t vaddr, uint64_t iova, uint64_t size)
return fslmc_map_dma(vaddr, iova, size);
}
-int
-rte_fslmc_vfio_mem_dmaunmap(uint64_t iova, uint64_t size)
-{
- return fslmc_unmap_dma(0, iova, size);
-}
-
int
fslmc_vfio_dmamap(void)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 29/45] bus/dpaa: remove unused FMan and netcfg helpers
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (27 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 28/45] bus/fslmc: remove unused VFIO helpers Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 30/45] common/dpaax: remove unused IOVA table dump Stephen Hemminger
` (16 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
fman_if_get_fdoff(), fman_if_discard_rx_errors() and
netcfg_release() have no caller. The netcfg teardown path frees the
configuration directly.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/dpaa/base/fman/fman_hw.c | 34 -----------------------
drivers/bus/dpaa/base/fman/netcfg_layer.c | 11 --------
drivers/bus/dpaa/include/fsl_fman.h | 2 --
drivers/bus/dpaa/include/netcfg.h | 1 -
4 files changed, 48 deletions(-)
diff --git a/drivers/bus/dpaa/base/fman/fman_hw.c b/drivers/bus/dpaa/base/fman/fman_hw.c
index 3aa502c6e1..42e4f677a4 100644
--- a/drivers/bus/dpaa/base/fman/fman_hw.c
+++ b/drivers/bus/dpaa/base/fman/fman_hw.c
@@ -572,23 +572,6 @@ fman_if_set_fc_quanta(struct fman_if *fm_if, u16 pause_quanta)
return 0;
}
-int
-fman_if_get_fdoff(struct fman_if *fm_if)
-{
- u32 fmbm_rebm;
- int fdoff;
-
- struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if);
-
- assert(fman_ccsr_map_fd != -1);
-
- fmbm_rebm = in_be32(&((struct rx_bmi_regs *)__if->rx_bmi_map)->fmbm_rebm);
-
- fdoff = (fmbm_rebm >> FMAN_SP_EXT_BUF_MARG_START_SHIFT) & 0x1ff;
-
- return fdoff;
-}
-
void
fman_if_set_err_fqid(struct fman_if *fm_if, uint32_t err_fqid)
{
@@ -747,23 +730,6 @@ fman_if_set_dnia(struct fman_if *fm_if, uint32_t nia)
out_be32(fmqm_pndn, nia);
}
-void
-fman_if_discard_rx_errors(struct fman_if *fm_if)
-{
- struct __fman_if *__if = container_of(fm_if, struct __fman_if, __if);
- unsigned int *fmbm_rfsdm, *fmbm_rfsem;
-
- fmbm_rfsem = &((struct rx_bmi_regs *)__if->rx_bmi_map)->fmbm_rfsem;
- out_be32(fmbm_rfsem, 0);
-
- /* Configure the discard mask to discard the error packets which have
- * DMA errors, Frame size error, Header error etc. The mask 0x010EE3F0
- * is to configured discard all the errors which come in the FD[STATUS]
- */
- fmbm_rfsdm = &((struct rx_bmi_regs *)__if->rx_bmi_map)->fmbm_rfsdm;
- out_be32(fmbm_rfsdm, 0x010EE3F0);
-}
-
void
fman_if_receive_rx_errors(struct fman_if *fm_if,
unsigned int err_eq)
diff --git a/drivers/bus/dpaa/base/fman/netcfg_layer.c b/drivers/bus/dpaa/base/fman/netcfg_layer.c
index 9bc4447dd0..3ac9f103f9 100644
--- a/drivers/bus/dpaa/base/fman/netcfg_layer.c
+++ b/drivers/bus/dpaa/base/fman/netcfg_layer.c
@@ -146,14 +146,3 @@ netcfg_acquire(void)
return NULL;
}
-
-void
-netcfg_release(struct netcfg_info *cfg_ptr)
-{
- rte_free(cfg_ptr);
- /* Close socket for shared interfaces */
- if (skfd >= 0) {
- close(skfd);
- skfd = -1;
- }
-}
diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h
index a4f6eb59fc..86869320ca 100644
--- a/drivers/bus/dpaa/include/fsl_fman.h
+++ b/drivers/bus/dpaa/include/fsl_fman.h
@@ -133,7 +133,6 @@ int fman_if_set_ic_params(struct fman_if *fm_if,
const struct fman_if_ic_params *icp);
/* Get interface fd->offset value */
-int fman_if_get_fdoff(struct fman_if *fm_if);
/* Set interface fd->offset value */
__rte_internal
@@ -159,7 +158,6 @@ void fman_if_set_maxfrm(struct fman_if *fm_if, uint16_t max_frm);
void fman_if_set_dnia(struct fman_if *fm_if, uint32_t nia);
/* discard error packets on rx */
-void fman_if_discard_rx_errors(struct fman_if *fm_if);
__rte_internal
void fman_if_receive_rx_errors(struct fman_if *fm_if,
diff --git a/drivers/bus/dpaa/include/netcfg.h b/drivers/bus/dpaa/include/netcfg.h
index 842ce95d92..c69a9464da 100644
--- a/drivers/bus/dpaa/include/netcfg.h
+++ b/drivers/bus/dpaa/include/netcfg.h
@@ -38,7 +38,6 @@ struct netcfg_info *netcfg_acquire(void);
/* cfg_ptr: configuration information pointer.
* Frees the resources allocated by the configuration layer.
*/
-void netcfg_release(struct netcfg_info *cfg_ptr);
#ifdef RTE_LIBRTE_DPAA_DEBUG_DRIVER
/* cfg_ptr: configuration information pointer.
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 30/45] common/dpaax: remove unused IOVA table dump
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (28 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 29/45] bus/dpaa: remove unused FMan and netcfg helpers Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 31/45] net/idpf: remove unused queue enable helper Stephen Hemminger
` (15 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
dpaax_iova_table_dump() has no caller. It is a debug helper meant to
be called from a debugger, so say so if it should stay.
Remove the function and the comment block that described it.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/dpaax/dpaax_iova_table.c | 41 -------------------------
drivers/common/dpaax/dpaax_iova_table.h | 1 -
2 files changed, 42 deletions(-)
diff --git a/drivers/common/dpaax/dpaax_iova_table.c b/drivers/common/dpaax/dpaax_iova_table.c
index f76f50378b..3c9b817a8a 100644
--- a/drivers/common/dpaax/dpaax_iova_table.c
+++ b/drivers/common/dpaax/dpaax_iova_table.c
@@ -350,47 +350,6 @@ dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length)
return 0;
}
-/* dpaax_iova_table_dump
- * Dump the table, with its entries, on screen. Only works in Debug Mode
- * Not for weak hearted - the tables can get quite large
- */
-void
-dpaax_iova_table_dump(void)
-{
- unsigned int i, j;
- struct dpaax_iovat_element *entry;
-
- /* In case DEBUG is not enabled, some 'if' conditions might misbehave
- * as they have nothing else in them except a DPAAX_DEBUG() which if
- * tuned out would leave 'if' naked.
- */
- if (rte_log_get_global_level() < RTE_LOG_DEBUG) {
- DPAAX_ERR("Set log level to Debug for PA->Table dump!");
- return;
- }
-
- DPAAX_DEBUG(" === Start of PA->VA Translation Table ===");
- if (dpaax_iova_table_p == NULL) {
- DPAAX_DEBUG("\tNULL");
- return;
- }
-
- entry = dpaax_iova_table_p->entries;
- for (i = 0; i < dpaax_iova_table_p->count; i++) {
- DPAAX_DEBUG("\t(%16i),(%16"PRIu64"),(%16zu),(%16p)",
- i, entry[i].start, entry[i].len, entry[i].pages);
- DPAAX_DEBUG("\t\t (PA), (VA)");
- for (j = 0; j < (entry->len/DPAAX_MEM_SPLIT); j++) {
- if (entry[i].pages[j] == 0)
- continue;
- DPAAX_DEBUG("\t\t(%16"PRIx64"),(%16"PRIx64")",
- (entry[i].start + (j * sizeof(uint64_t))),
- entry[i].pages[j]);
- }
- }
- DPAAX_DEBUG(" === End of PA->VA Translation Table ===");
-}
-
static void
dpaax_memevent_cb(enum rte_mem_event type, const void *addr, size_t len,
void *arg __rte_unused)
diff --git a/drivers/common/dpaax/dpaax_iova_table.h b/drivers/common/dpaax/dpaax_iova_table.h
index f6cfc3e959..19af27c310 100644
--- a/drivers/common/dpaax/dpaax_iova_table.h
+++ b/drivers/common/dpaax/dpaax_iova_table.h
@@ -68,7 +68,6 @@ __rte_internal
void dpaax_iova_table_depopulate(void);
__rte_internal
int dpaax_iova_table_update(phys_addr_t paddr, void *vaddr, size_t length);
-void dpaax_iova_table_dump(void);
static inline void *dpaax_iova_table_get_va(phys_addr_t paddr) __rte_hot;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 31/45] net/idpf: remove unused queue enable helper
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (29 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 30/45] common/dpaax: remove unused IOVA table dump Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 32/45] gpudev: remove unused attach function Stephen Hemminger
` (14 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jingjing Wu, Praveen Shetty
idpf_vc_queues_ena_dis() has no caller. The idpf and cpfl drivers
enable queue groups through idpf_vc_queue_switch().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/idpf/idpf_common_virtchnl.c | 68 -------------------
drivers/net/intel/idpf/idpf_common_virtchnl.h | 1 -
2 files changed, 69 deletions(-)
diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.c b/drivers/net/intel/idpf/idpf_common_virtchnl.c
index b1a13d1c56..986ceede7d 100644
--- a/drivers/net/intel/idpf/idpf_common_virtchnl.c
+++ b/drivers/net/intel/idpf/idpf_common_virtchnl.c
@@ -887,74 +887,6 @@ idpf_vc_queue_switch(struct idpf_vport *vport, uint16_t qid,
}
#define IDPF_RXTX_QUEUE_CHUNKS_NUM 2
-int
-idpf_vc_queues_ena_dis(struct idpf_vport *vport, bool enable)
-{
- struct idpf_adapter *adapter = vport->adapter;
- struct virtchnl2_del_ena_dis_queues *queue_select;
- struct virtchnl2_queue_chunk *queue_chunk;
- uint32_t type;
- struct idpf_cmd_info args;
- uint16_t num_chunks;
- int err, len;
-
- num_chunks = IDPF_RXTX_QUEUE_CHUNKS_NUM;
- if (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT)
- num_chunks++;
- if (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT)
- num_chunks++;
-
- len = sizeof(struct virtchnl2_del_ena_dis_queues) +
- sizeof(struct virtchnl2_queue_chunk) * (num_chunks - 1);
- queue_select = rte_zmalloc("queue_select", len, 0);
- if (queue_select == NULL)
- return -ENOMEM;
-
- queue_chunk = queue_select->chunks.chunks;
- queue_select->chunks.num_chunks = num_chunks;
- queue_select->vport_id = vport->vport_id;
-
- type = VIRTCHNL_QUEUE_TYPE_RX;
- queue_chunk[type].type = type;
- queue_chunk[type].start_queue_id = vport->chunks_info.rx_start_qid;
- queue_chunk[type].num_queues = vport->num_rx_q;
-
- type = VIRTCHNL2_QUEUE_TYPE_TX;
- queue_chunk[type].type = type;
- queue_chunk[type].start_queue_id = vport->chunks_info.tx_start_qid;
- queue_chunk[type].num_queues = vport->num_tx_q;
-
- if (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) {
- type = VIRTCHNL2_QUEUE_TYPE_RX_BUFFER;
- queue_chunk[type].type = type;
- queue_chunk[type].start_queue_id =
- vport->chunks_info.rx_buf_start_qid;
- queue_chunk[type].num_queues = vport->num_rx_bufq;
- }
-
- if (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SPLIT) {
- type = VIRTCHNL2_QUEUE_TYPE_TX_COMPLETION;
- queue_chunk[type].type = type;
- queue_chunk[type].start_queue_id =
- vport->chunks_info.tx_compl_start_qid;
- queue_chunk[type].num_queues = vport->num_tx_complq;
- }
-
- args.ops = enable ? VIRTCHNL2_OP_ENABLE_QUEUES :
- VIRTCHNL2_OP_DISABLE_QUEUES;
- args.in_args = (uint8_t *)queue_select;
- args.in_args_size = len;
- args.out_buffer = adapter->mbx_resp;
- args.out_size = IDPF_DFLT_MBX_BUF_SIZE;
- err = idpf_vc_cmd_execute(adapter, &args);
- if (err != 0)
- DRV_LOG(ERR, "Failed to execute command of VIRTCHNL2_OP_%s_QUEUES",
- enable ? "ENABLE" : "DISABLE");
-
- rte_free(queue_select);
- return err;
-}
-
RTE_EXPORT_INTERNAL_SYMBOL(idpf_vc_vport_ena_dis)
int
idpf_vc_vport_ena_dis(struct idpf_vport *vport, bool enable)
diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.h b/drivers/net/intel/idpf/idpf_common_virtchnl.h
index a8c693240a..c683c0dd2b 100644
--- a/drivers/net/intel/idpf/idpf_common_virtchnl.h
+++ b/drivers/net/intel/idpf/idpf_common_virtchnl.h
@@ -27,7 +27,6 @@ int idpf_vc_cmd_execute(struct idpf_adapter *adapter,
__rte_internal
int idpf_vc_queue_switch(struct idpf_vport *vport, uint16_t qid,
bool rx, bool on, uint32_t type);
-int idpf_vc_queues_ena_dis(struct idpf_vport *vport, bool enable);
__rte_internal
int idpf_vc_vport_ena_dis(struct idpf_vport *vport, bool enable);
__rte_internal
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 32/45] gpudev: remove unused attach function
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (30 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 31/45] net/idpf: remove unused queue enable helper Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 33/45] cryptodev: remove unused device name helper Stephen Hemminger
` (13 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Elena Agostini, Anatoly Burakov
rte_gpu_attach() has no caller. It implemented secondary process
attach to a device created by the primary, but no driver or
application ever called it.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/gpudev/gpudev.c | 49 --------------------------------------
lib/gpudev/gpudev_driver.h | 3 ---
2 files changed, 52 deletions(-)
diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c
index 11e8728211..78bfd5bed3 100644
--- a/lib/gpudev/gpudev.c
+++ b/lib/gpudev/gpudev.c
@@ -245,55 +245,6 @@ rte_gpu_allocate(const char *name)
return dev;
}
-struct rte_gpu *
-rte_gpu_attach(const char *name)
-{
- int16_t dev_id;
- struct rte_gpu *dev;
- struct rte_gpu_mpshared *shared_dev = NULL;
-
- if (rte_eal_process_type() != RTE_PROC_SECONDARY) {
- GPU_LOG(ERR, "only secondary process can attach device");
- rte_errno = EPERM;
- return NULL;
- }
- if (name == NULL) {
- GPU_LOG(ERR, "attach device without a name");
- rte_errno = EINVAL;
- return NULL;
- }
-
- /* implicit initialization of library before adding first device */
- if (gpus == NULL && rte_gpu_init(RTE_GPU_DEFAULT_MAX) < 0)
- return NULL;
-
- /* initialize shared memory before adding first device */
- if (gpu_shared_mem == NULL && gpu_shared_mem_init() < 0)
- return NULL;
-
- for (dev_id = 0; dev_id < gpu_max; dev_id++) {
- shared_dev = &gpu_shared_mem->gpus[dev_id];
- if (strncmp(name, shared_dev->name, RTE_DEV_NAME_MAX_LEN) == 0)
- break;
- }
- if (dev_id >= gpu_max) {
- GPU_LOG(ERR, "device with name %s not found", name);
- rte_errno = ENOENT;
- return NULL;
- }
- dev = &gpus[dev_id];
- memset(dev, 0, sizeof(*dev));
-
- TAILQ_INIT(&dev->callbacks);
- dev->mpshared = shared_dev;
- rte_atomic_fetch_add_explicit(&dev->mpshared->process_refcnt, 1, rte_memory_order_relaxed);
-
- gpu_count++;
- GPU_LOG(DEBUG, "attached device %s (id %d) of total %d",
- name, dev_id, gpu_count);
- return dev;
-}
-
RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_gpu_add_child, 21.11)
int16_t
rte_gpu_add_child(const char *name, int16_t parent, uint64_t child_context)
diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
index 3f06bf89f0..7a569beb67 100644
--- a/lib/gpudev/gpudev_driver.h
+++ b/lib/gpudev/gpudev_driver.h
@@ -94,9 +94,6 @@ struct rte_gpu *rte_gpu_get_by_name(const char *name);
__rte_internal
struct rte_gpu *rte_gpu_allocate(const char *name);
-/* First step of initialization in secondary process. */
-struct rte_gpu *rte_gpu_attach(const char *name);
-
/* Last step of initialization. */
__rte_internal
void rte_gpu_complete_new(struct rte_gpu *dev);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 33/45] cryptodev: remove unused device name helper
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (31 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 32/45] gpudev: remove unused attach function Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 34/45] common/cnxk: remove unused MCS port recovery Stephen Hemminger
` (12 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Akhil Goyal, Fan Zhang
rte_cryptodev_pmd_create_dev_name() has no caller. Drivers build
their device names directly.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/cryptodev/cryptodev_pmd.h | 2 --
lib/cryptodev/rte_cryptodev.c | 24 ------------------------
2 files changed, 26 deletions(-)
diff --git a/lib/cryptodev/cryptodev_pmd.h b/lib/cryptodev/cryptodev_pmd.h
index f1512f36c9..daecf66b3a 100644
--- a/lib/cryptodev/cryptodev_pmd.h
+++ b/lib/cryptodev/cryptodev_pmd.h
@@ -634,8 +634,6 @@ void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
* @internal
* Create unique device name
*/
-int
-rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
/**
* @internal
diff --git a/lib/cryptodev/rte_cryptodev.c b/lib/cryptodev/rte_cryptodev.c
index 97121eaf37..4c8367d946 100644
--- a/lib/cryptodev/rte_cryptodev.c
+++ b/lib/cryptodev/rte_cryptodev.c
@@ -2886,30 +2886,6 @@ rte_crypto_op_pool_create(const char *name, enum rte_crypto_op_type type,
return mp;
}
-int
-rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix)
-{
- struct rte_cryptodev *dev = NULL;
- uint32_t i = 0;
-
- if (name == NULL)
- return -EINVAL;
-
- for (i = 0; i < RTE_CRYPTO_MAX_DEVS; i++) {
- int ret = snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN,
- "%s_%u", dev_name_prefix, i);
-
- if (ret < 0)
- return ret;
-
- dev = rte_cryptodev_pmd_get_named_dev(name);
- if (!dev)
- return 0;
- }
-
- return -1;
-}
-
TAILQ_HEAD(cryptodev_driver_list, cryptodev_driver);
static struct cryptodev_driver_list cryptodev_driver_list =
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 34/45] common/cnxk: remove unused MCS port recovery
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (32 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 33/45] cryptodev: remove unused device name helper Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 35/45] bus/dpaa: remove unused QMan and BMan functions Stephen Hemminger
` (11 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra
roc_mcs_port_recovery() has no caller, and removing it leaves
mcs_port_reset_set() unreachable. Remove both.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/cnxk/roc_mcs.c | 258 ----------------------------------
drivers/common/cnxk/roc_mcs.h | 2 -
2 files changed, 260 deletions(-)
diff --git a/drivers/common/cnxk/roc_mcs.c b/drivers/common/cnxk/roc_mcs.c
index 5894750f7e..7059bea15c 100644
--- a/drivers/common/cnxk/roc_mcs.c
+++ b/drivers/common/cnxk/roc_mcs.c
@@ -72,25 +72,6 @@ roc_mcs_hw_info_get(struct roc_mcs_hw_info *hw_info)
return rc;
}
-static int
-mcs_port_reset_set(struct roc_mcs *mcs, struct roc_mcs_port_reset_req *port, uint8_t reset)
-{
- struct mcs_port_reset_req *req;
- struct msg_rsp *rsp;
-
- MCS_SUPPORT_CHECK;
-
- req = mbox_alloc_msg_mcs_port_reset(mcs->mbox);
- if (req == NULL)
- return -ENOMEM;
-
- req->reset = reset;
- req->lmac_id = port->port_id;
- req->mcs_id = mcs->idx;
-
- return mbox_process_msg(mcs->mbox, (void *)&rsp);
-}
-
int
roc_mcs_pn_threshold_set(struct roc_mcs *mcs, struct roc_mcs_set_pn_threshold *pn)
{
@@ -143,245 +124,6 @@ roc_mcs_intr_configure(struct roc_mcs *mcs, struct roc_mcs_intr_cfg *config)
return rc;
}
-int
-roc_mcs_port_recovery(struct roc_mcs *mcs, union roc_mcs_event_data *mdata, uint8_t port_id)
-{
- struct mcs_priv *priv = roc_mcs_to_mcs_priv(mcs);
- struct roc_mcs_pn_table_write_req pn_table = {0};
- struct roc_mcs_rx_sc_sa_map rx_map = {0};
- struct roc_mcs_tx_sc_sa_map tx_map = {0};
- struct roc_mcs_port_reset_req port = {0};
- struct roc_mcs_clear_stats stats = {0};
- int tx_cnt = 0, rx_cnt = 0, rc = 0;
- uint64_t set;
- int i;
-
- port.port_id = port_id;
- rc = mcs_port_reset_set(mcs, &port, 1);
-
- /* Reset TX/RX PN tables */
- for (i = 0; i < (priv->sa_entries << 1); i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].sa_bmap, i);
- if (set) {
- pn_table.pn_id = i;
- pn_table.next_pn = 1;
- pn_table.dir = MCS_RX;
- if (i >= priv->sa_entries) {
- pn_table.dir = MCS_TX;
- pn_table.pn_id -= priv->sa_entries;
- }
- rc = roc_mcs_pn_table_write(mcs, &pn_table);
- if (rc)
- return rc;
-
- if (i >= priv->sa_entries)
- tx_cnt++;
- else
- rx_cnt++;
- }
- }
-
- if (tx_cnt || rx_cnt) {
- mdata->tx_sa_array = plt_zmalloc(tx_cnt * sizeof(uint16_t), 0);
- if (tx_cnt && (mdata->tx_sa_array == NULL)) {
- rc = -ENOMEM;
- goto exit;
- }
- mdata->rx_sa_array = plt_zmalloc(rx_cnt * sizeof(uint16_t), 0);
- if (rx_cnt && (mdata->rx_sa_array == NULL)) {
- rc = -ENOMEM;
- goto exit;
- }
-
- mdata->num_tx_sa = tx_cnt;
- mdata->num_rx_sa = rx_cnt;
- for (i = 0; i < (priv->sa_entries << 1); i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].sa_bmap, i);
- if (set) {
- if (i >= priv->sa_entries)
- mdata->tx_sa_array[--tx_cnt] = i - priv->sa_entries;
- else
- mdata->rx_sa_array[--rx_cnt] = i;
- }
- }
- }
- tx_cnt = 0;
- rx_cnt = 0;
-
- /* Reset Tx active SA to index:0 */
- for (i = priv->sc_entries; i < (priv->sc_entries << 1); i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].sc_bmap, i);
- if (set) {
- uint16_t sc_id = i - priv->sc_entries;
-
- tx_map.sa_index0 = priv->port_rsrc[port_id].sc_conf[sc_id].tx.sa_idx0;
- tx_map.sa_index1 = priv->port_rsrc[port_id].sc_conf[sc_id].tx.sa_idx1;
- tx_map.rekey_ena = priv->port_rsrc[port_id].sc_conf[sc_id].tx.rekey_enb;
- tx_map.sectag_sci = priv->port_rsrc[port_id].sc_conf[sc_id].tx.sci;
- tx_map.sa_index0_vld = 1;
- tx_map.sa_index1_vld = 0;
- tx_map.tx_sa_active = 0;
- tx_map.sc_id = sc_id;
- rc = roc_mcs_tx_sc_sa_map_write(mcs, &tx_map);
- if (rc)
- return rc;
-
- tx_cnt++;
- }
- }
-
- if (tx_cnt) {
- mdata->tx_sc_array = plt_zmalloc(tx_cnt * sizeof(uint16_t), 0);
- if (tx_cnt && (mdata->tx_sc_array == NULL)) {
- rc = -ENOMEM;
- goto exit;
- }
-
- mdata->num_tx_sc = tx_cnt;
- for (i = priv->sc_entries; i < (priv->sc_entries << 1); i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].sc_bmap, i);
- if (set)
- mdata->tx_sc_array[--tx_cnt] = i - priv->sc_entries;
- }
- }
-
- /* Clear SA_IN_USE for active ANs in RX CPM */
- for (i = 0; i < priv->sc_entries; i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].sc_bmap, i);
- if (set) {
- rx_map.sa_index = priv->port_rsrc[port_id].sc_conf[i].rx.sa_idx;
- rx_map.an = priv->port_rsrc[port_id].sc_conf[i].rx.an;
- rx_map.sa_in_use = 0;
- rx_map.sc_id = i;
- rc = roc_mcs_rx_sc_sa_map_write(mcs, &rx_map);
- if (rc)
- return rc;
-
- rx_cnt++;
- }
- }
-
- /* Reset flow(flow/secy/sc/sa) stats mapped to this PORT */
- for (i = 0; i < (priv->tcam_entries << 1); i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].tcam_bmap, i);
- if (set) {
- stats.type = MCS_FLOWID_STATS;
- stats.id = i;
- stats.dir = MCS_RX;
- if (i >= priv->sa_entries) {
- stats.dir = MCS_TX;
- stats.id -= priv->tcam_entries;
- }
- rc = roc_mcs_stats_clear(mcs, &stats);
- if (rc)
- return rc;
- }
- }
- for (i = 0; i < (priv->secy_entries << 1); i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].secy_bmap, i);
- if (set) {
- stats.type = MCS_SECY_STATS;
- stats.id = i;
- stats.dir = MCS_RX;
- if (i >= priv->sa_entries) {
- stats.dir = MCS_TX;
- stats.id -= priv->secy_entries;
- }
- rc = roc_mcs_stats_clear(mcs, &stats);
- if (rc)
- return rc;
- }
- }
- for (i = 0; i < (priv->sc_entries << 1); i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].sc_bmap, i);
- if (set) {
- stats.type = MCS_SC_STATS;
- stats.id = i;
- stats.dir = MCS_RX;
- if (i >= priv->sa_entries) {
- stats.dir = MCS_TX;
- stats.id -= priv->sc_entries;
- }
- rc = roc_mcs_stats_clear(mcs, &stats);
- if (rc)
- return rc;
- }
- }
- if (roc_model_is_cn10kb_a0()) {
- for (i = 0; i < (priv->sa_entries << 1); i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].sa_bmap, i);
- if (set) {
- stats.type = MCS_SA_STATS;
- stats.id = i;
- stats.dir = MCS_RX;
- if (i >= priv->sa_entries) {
- stats.dir = MCS_TX;
- stats.id -= priv->sa_entries;
- }
- rc = roc_mcs_stats_clear(mcs, &stats);
- if (rc)
- return rc;
- }
- }
- }
- {
- stats.type = MCS_PORT_STATS;
- stats.id = port_id;
- rc = roc_mcs_stats_clear(mcs, &stats);
- if (rc)
- return rc;
- }
-
- if (rx_cnt) {
- mdata->rx_sc_array = plt_zmalloc(rx_cnt * sizeof(uint16_t), 0);
- if (mdata->rx_sc_array == NULL) {
- rc = -ENOMEM;
- goto exit;
- }
- mdata->sc_an_array = plt_zmalloc(rx_cnt * sizeof(uint8_t), 0);
- if (mdata->sc_an_array == NULL) {
- rc = -ENOMEM;
- goto exit;
- }
-
- mdata->num_rx_sc = rx_cnt;
- }
-
- /* Reactivate in-use ANs for active SCs in RX CPM */
- for (i = 0; i < priv->sc_entries; i++) {
- set = plt_bitmap_get(priv->port_rsrc[port_id].sc_bmap, i);
- if (set) {
- rx_map.sa_index = priv->port_rsrc[port_id].sc_conf[i].rx.sa_idx;
- rx_map.an = priv->port_rsrc[port_id].sc_conf[i].rx.an;
- rx_map.sa_in_use = 1;
- rx_map.sc_id = i;
- rc = roc_mcs_rx_sc_sa_map_write(mcs, &rx_map);
- if (rc)
- return rc;
-
- mdata->rx_sc_array[--rx_cnt] = i;
- mdata->sc_an_array[rx_cnt] = priv->port_rsrc[port_id].sc_conf[i].rx.an;
- }
- }
-
- port.port_id = port_id;
- rc = mcs_port_reset_set(mcs, &port, 0);
-
- return rc;
-exit:
- if (mdata->num_tx_sa)
- plt_free(mdata->tx_sa_array);
- if (mdata->num_rx_sa)
- plt_free(mdata->rx_sa_array);
- if (mdata->num_tx_sc)
- plt_free(mdata->tx_sc_array);
- if (mdata->num_rx_sc) {
- plt_free(mdata->rx_sc_array);
- plt_free(mdata->sc_an_array);
- }
- return rc;
-}
-
int
roc_mcs_event_cb_register(struct roc_mcs *mcs, enum roc_mcs_event_type event,
roc_mcs_dev_cb_fn cb_fn, void *cb_arg, void *userdata)
diff --git a/drivers/common/cnxk/roc_mcs.h b/drivers/common/cnxk/roc_mcs.h
index bba7b855e6..4db6137780 100644
--- a/drivers/common/cnxk/roc_mcs.h
+++ b/drivers/common/cnxk/roc_mcs.h
@@ -574,8 +574,6 @@ __roc_api int roc_mcs_event_cb_unregister(struct roc_mcs *mcs, enum roc_mcs_even
__roc_api int roc_mcs_intr_configure(struct roc_mcs *mcs, struct roc_mcs_intr_cfg *config);
/* Port recovery from fatal errors */
-int roc_mcs_port_recovery(struct roc_mcs *mcs, union roc_mcs_event_data *mdata,
- uint8_t port_id);
/* FIPS reset */
__roc_api int roc_mcs_fips_reset(struct roc_mcs *mcs, struct roc_mcs_fips_req *req);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 35/45] bus/dpaa: remove unused QMan and BMan functions
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (33 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 34/45] common/cnxk: remove unused MCS port recovery Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 36/45] bus/fslmc: remove unused MC object functions Stephen Hemminger
` (10 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
bman_release(), bman_thread_irq(), qman_clear_irq(), qman_enqueue(),
qman_fq_state() and qman_volatile_dequeue() have no caller.
The dpaa net and crypto drivers enqueue through qman_enqueue_multi()
and the order restoration variant, not the single frame
qman_enqueue(). Remove the functions, their declarations and the
documentation blocks that described them.
qman_query_fq_np() and qman_release_cgrid_range() are only reached
from qman_poll_fq_for_init() and qman_release_cgrid(), two static
inline wrappers in fsl_qman.h that have no caller of their own. The
wrappers go too, along with the BMAN_RELEASE_FLAG_NOW definition
which described the removed bman_release().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
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/include/fsl_bman.h | 9 +-
drivers/bus/dpaa/include/fsl_qman.h | 115 ----------------------
drivers/bus/dpaa/include/fsl_usd.h | 2 -
7 files changed, 1 insertion(+), 291 deletions(-)
diff --git a/drivers/bus/dpaa/base/qbman/bman.c b/drivers/bus/dpaa/base/qbman/bman.c
index 31114b2d57..9f7ace4e26 100644
--- a/drivers/bus/dpaa/base/qbman/bman.c
+++ b/drivers/bus/dpaa/base/qbman/bman.c
@@ -299,46 +299,6 @@ bman_release_fast(struct bman_pool *pool, const uint64_t *bufs,
return 0;
}
-int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
- u32 flags __maybe_unused)
-{
- struct bman_portal *p;
- struct bm_rcr_entry *r;
- u32 i;
- u8 avail;
-
-#ifdef RTE_LIBRTE_DPAA_HWDEBUG
- if (!num || (num > FSL_BM_BURST_MAX))
- return -EINVAL;
- if (pool->params.flags & BMAN_POOL_FLAG_NO_RELEASE)
- return -EINVAL;
-#endif
-
- p = get_affine_portal();
- avail = bm_rcr_get_avail(&p->p);
- if (avail < 2)
- update_rcr_ci(p, avail);
- r = bm_rcr_start(&p->p);
- if (unlikely(!r))
- return -EBUSY;
-
- /*
- * we can copy all but the first entry, as this can trigger badness
- * with the valid-bit
- */
- r->bufs[0].opaque =
- cpu_to_be64(((u64)pool->params.bpid << 48) |
- (bufs[0].opaque & MAX_U48));
- for (i = 1; i < num; i++)
- r->bufs[i].opaque =
- cpu_to_be64(bufs[i].opaque & MAX_U48);
-
- bm_rcr_pvb_commit(&p->p, BM_RCR_VERB_CMD_BPID_SINGLE |
- (num & BM_RCR_VERB_BUFCOUNT_MASK));
-
- return 0;
-}
-
static inline uint64_t
__rte_unused bman_extract_addr(struct bm_buffer *buf)
{
diff --git a/drivers/bus/dpaa/base/qbman/bman_driver.c b/drivers/bus/dpaa/base/qbman/bman_driver.c
index 516c057e9d..8289901e60 100644
--- a/drivers/bus/dpaa/base/qbman/bman_driver.c
+++ b/drivers/bus/dpaa/base/qbman/bman_driver.c
@@ -132,17 +132,6 @@ int bman_thread_finish(void)
return fsl_bman_portal_finish();
}
-void bman_thread_irq(void)
-{
- qbman_invoke_irq(pcfg.irq);
- /* Now we need to uninhibit interrupts. This is the only code outside
- * the regular portal driver that manipulates any portal register, so
- * rather than breaking that encapsulation I am simply hard-coding the
- * offset to the inhibit register here.
- */
- out_be32(pcfg.addr_virt[DPAA_PORTAL_CI] + 0xe0c, 0);
-}
-
int bman_init_ccsr(const struct device_node *node)
{
int ccsr_map_fd;
diff --git a/drivers/bus/dpaa/base/qbman/dpaa_alloc.c b/drivers/bus/dpaa/base/qbman/dpaa_alloc.c
index d3437bab0b..4b2d67bb54 100644
--- a/drivers/bus/dpaa/base/qbman/dpaa_alloc.c
+++ b/drivers/bus/dpaa/base/qbman/dpaa_alloc.c
@@ -60,11 +60,6 @@ int qman_alloc_cgrid_range(u32 *result, u32 count, u32 align, int partial)
return process_alloc(dpaa_id_cgrid, result, count, align, partial);
}
-void qman_release_cgrid_range(u32 cgrid, u32 count)
-{
- process_release(dpaa_id_cgrid, cgrid, count);
-}
-
int qman_reserve_cgrid_range(u32 cgrid, u32 count)
{
return process_reserve(dpaa_id_cgrid, cgrid, count);
diff --git a/drivers/bus/dpaa/base/qbman/qman.c b/drivers/bus/dpaa/base/qbman/qman.c
index 3c056e4547..75a1b2251b 100644
--- a/drivers/bus/dpaa/base/qbman/qman.c
+++ b/drivers/bus/dpaa/base/qbman/qman.c
@@ -1298,14 +1298,6 @@ qman_portal_poll_rx(uint32_t poll_limit, void **bufs,
return rx_number;
}
-void qman_clear_irq(void)
-{
- struct qman_portal *p = get_affine_portal();
- u32 clear = QM_DQAVAIL_MASK | (p->irq_sources &
- ~(QM_PIRQ_CSCI | QM_PIRQ_CCSCI));
- qm_isr_status_clear(&p->p, clear);
-}
-
u32 qman_portal_dequeue(struct rte_event ev[], unsigned int poll_limit,
void **bufs)
{
@@ -1616,14 +1608,6 @@ u32 qman_fq_fqid(struct qman_fq *fq)
return fq->fqid;
}
-void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags)
-{
- if (state)
- *state = fq->state;
- if (flags)
- *flags = fq->flags;
-}
-
int qman_init_fq(struct qman_fq *fq, u32 flags, struct qm_mcc_initfq *opts)
{
struct qm_mc_command *mcc;
@@ -1986,48 +1970,6 @@ int qman_query_fq_has_pkts(struct qman_fq *fq)
return ret;
}
-int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np)
-{
- struct qm_mc_command *mcc;
- struct qm_mc_result *mcr;
- struct qman_portal *p = get_affine_portal();
-
- u8 res;
-
- mcc = qm_mc_start(&p->p);
- mcc->queryfq.fqid = cpu_to_be32(fq->fqid);
- qm_mc_commit(&p->p, QM_MCC_VERB_QUERYFQ_NP);
- while (!(mcr = qm_mc_result(&p->p)))
- cpu_relax();
- DPAA_ASSERT((mcr->verb & QM_MCR_VERB_MASK) == QM_MCR_VERB_QUERYFQ_NP);
- res = mcr->result;
- if (res == QM_MCR_RESULT_OK) {
- *np = mcr->queryfq_np;
- np->fqd_link = be24_to_cpu(np->fqd_link);
- np->odp_seq = be16_to_cpu(np->odp_seq);
- np->orp_nesn = be16_to_cpu(np->orp_nesn);
- np->orp_ea_hseq = be16_to_cpu(np->orp_ea_hseq);
- np->orp_ea_tseq = be16_to_cpu(np->orp_ea_tseq);
- np->orp_ea_hptr = be24_to_cpu(np->orp_ea_hptr);
- np->orp_ea_tptr = be24_to_cpu(np->orp_ea_tptr);
- np->pfdr_hptr = be24_to_cpu(np->pfdr_hptr);
- np->pfdr_tptr = be24_to_cpu(np->pfdr_tptr);
- np->ics_surp = be16_to_cpu(np->ics_surp);
- np->byte_cnt = be32_to_cpu(np->byte_cnt);
- np->frm_cnt = be24_to_cpu(np->frm_cnt);
- np->ra1_sfdr = be16_to_cpu(np->ra1_sfdr);
- np->ra2_sfdr = be16_to_cpu(np->ra2_sfdr);
- np->od1_sfdr = be16_to_cpu(np->od1_sfdr);
- np->od2_sfdr = be16_to_cpu(np->od2_sfdr);
- np->od3_sfdr = be16_to_cpu(np->od3_sfdr);
- }
- if (res == QM_MCR_RESULT_ERR_FQID)
- return -ERANGE;
- else if (res != QM_MCR_RESULT_OK)
- return -EIO;
- return 0;
-}
-
int qman_query_fq_frm_cnt(struct qman_fq *fq, u32 *frm_cnt)
{
struct qm_mc_command *mcc;
@@ -2209,43 +2151,6 @@ int qman_set_vdq(struct qman_fq *fq, u16 num, uint32_t vdqcr_flags)
return ret;
}
-int qman_volatile_dequeue(struct qman_fq *fq, u32 flags __maybe_unused,
- u32 vdqcr)
-{
- struct qman_portal *p;
- int ret = -EBUSY;
-
- if ((fq->state != qman_fq_state_parked) &&
- (fq->state != qman_fq_state_retired))
- return -EINVAL;
- if (vdqcr & QM_VDQCR_FQID_MASK)
- return -EINVAL;
- if (fq_isset(fq, QMAN_FQ_STATE_VDQCR))
- return -EBUSY;
- vdqcr = (vdqcr & ~QM_VDQCR_FQID_MASK) | fq->fqid;
-
- p = get_affine_portal();
-
- if (!p->vdqcr_owned) {
- FQLOCK(fq);
- if (fq_isset(fq, QMAN_FQ_STATE_VDQCR)) {
- FQUNLOCK(fq);
- goto escape;
- }
- fq_set(fq, QMAN_FQ_STATE_VDQCR);
- FQUNLOCK(fq);
- p->vdqcr_owned = fq;
- ret = 0;
- }
-escape:
- if (ret)
- return ret;
-
- /* VDQCR is set */
- qm_dqrr_vdqcr_set(&p->p, vdqcr);
- return 0;
-}
-
static noinline void update_eqcr_ci(struct qman_portal *p, u8 avail)
{
if (avail)
@@ -2318,21 +2223,6 @@ static inline struct qm_eqcr_entry *try_p_eq_start(struct qman_portal *p,
return eq;
}
-int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags)
-{
- struct qman_portal *p = get_affine_portal();
- struct qm_eqcr_entry *eq;
-
- eq = try_p_eq_start(p, fq, fd, flags);
- if (!eq)
- return -EBUSY;
- /* Note: QM_EQCR_VERB_INTERRUPT == QMAN_ENQUEUE_FLAG_WAIT_SYNC */
- qm_eqcr_pvb_commit(&p->p, QM_EQCR_VERB_CMD_ENQUEUE |
- (flags & (QM_EQCR_VERB_COLOUR_MASK | QM_EQCR_VERB_INTERRUPT)));
- /* Factor the below out, it's used from qman_enqueue_orp() too */
- return 0;
-}
-
int qman_enqueue_multi(struct qman_fq *fq,
const struct qm_fd *fd, u32 *flags,
int frames_to_send)
diff --git a/drivers/bus/dpaa/include/fsl_bman.h b/drivers/bus/dpaa/include/fsl_bman.h
index 8d4ef4a245..a0ae993727 100644
--- a/drivers/bus/dpaa/include/fsl_bman.h
+++ b/drivers/bus/dpaa/include/fsl_bman.h
@@ -238,9 +238,6 @@ struct bman_pool_params {
#define BMAN_POOL_FLAG_DYNAMIC_BPID 0x00000008 /* (de)allocate bpid */
#define BMAN_POOL_FLAG_THRESH 0x00000010 /* set depletion thresholds */
-/* Flags to bman_release() */
-#define BMAN_RELEASE_FLAG_NOW 0x00000008 /* issue immediate release */
-
/**
* bman_get_portal_index - get portal configuration index
@@ -338,15 +335,11 @@ __rte_internal
const struct bman_pool_params *bman_get_params(const struct bman_pool *pool);
/**
- * bman_release - Release buffer(s) to the buffer pool
+ * bman_release_fast - Release buffer(s) to the buffer pool
* @pool: the buffer pool object to release to
* @bufs: an array of buffers to release
* @num: the number of buffers in @bufs (1-8)
- * @flags: bit-mask of BMAN_RELEASE_FLAG_*** options
- *
*/
-int bman_release(struct bman_pool *pool, const struct bm_buffer *bufs, u8 num,
- u32 flags);
__rte_internal
int bman_release_fast(struct bman_pool *pool, const uint64_t *bufs,
uint8_t num);
diff --git a/drivers/bus/dpaa/include/fsl_qman.h b/drivers/bus/dpaa/include/fsl_qman.h
index 12af1d8029..9a6d9e1edd 100644
--- a/drivers/bus/dpaa/include/fsl_qman.h
+++ b/drivers/bus/dpaa/include/fsl_qman.h
@@ -1593,18 +1593,6 @@ void qman_destroy_fq(struct qman_fq *fq, u32 flags);
__rte_internal
u32 qman_fq_fqid(struct qman_fq *fq);
-/**
- * qman_fq_state - Queries the state of a FQ object
- * @fq: the frame queue object to query
- * @state: pointer to state enum to return the FQ scheduling state
- * @flags: pointer to state flags to receive QMAN_FQ_STATE_*** bitmask
- *
- * Queries the state of the FQ object, without performing any h/w commands.
- * This captures the state, as seen by the driver, at the time the function
- * executes.
- */
-void qman_fq_state(struct qman_fq *fq, enum qman_fq_state *state, u32 *flags);
-
/**
* qman_init_fq - Initialises FQ fields, leaves the FQ "parked" or "scheduled"
* @fq: the frame queue object to modify, must be 'parked' or new.
@@ -1708,13 +1696,6 @@ int qman_query_fq(struct qman_fq *fq, struct qm_fqd *fqd);
*/
int qman_query_fq_has_pkts(struct qman_fq *fq);
-/**
- * qman_query_fq_np - Queries non-programmable FQD fields
- * @fq: the frame queue object to be queried
- * @np: storage for the queried FQD fields
- */
-int qman_query_fq_np(struct qman_fq *fq, struct qm_mcr_queryfq_np *np);
-
/**
* qman_query_fq_frmcnt - Queries fq frame count
* @fq: the frame queue object to be queried
@@ -1733,61 +1714,6 @@ int qman_query_fq_frm_cnt(struct qman_fq *fq, u32 *frm_cnt);
*/
int qman_query_wq(u8 query_dedicated, struct qm_mcr_querywq *wq);
-/**
- * qman_volatile_dequeue - Issue a volatile dequeue command
- * @fq: the frame queue object to dequeue from
- * @flags: a bit-mask of QMAN_VOLATILE_FLAG_*** options
- * @vdqcr: bit mask of QM_VDQCR_*** options, as per qm_dqrr_vdqcr_set()
- *
- * Attempts to lock access to the portal's VDQCR volatile dequeue functionality.
- * The function will block and sleep if QMAN_VOLATILE_FLAG_WAIT is specified and
- * the VDQCR is already in use, otherwise returns non-zero for failure. If
- * QMAN_VOLATILE_FLAG_FINISH is specified, the function will only return once
- * the VDQCR command has finished executing (ie. once the callback for the last
- * DQRR entry resulting from the VDQCR command has been called). If not using
- * the FINISH flag, completion can be determined either by detecting the
- * presence of the QM_DQRR_STAT_UNSCHEDULED and QM_DQRR_STAT_DQCR_EXPIRED bits
- * in the "stat" field of the "struct qm_dqrr_entry" passed to the FQ's dequeue
- * callback, or by waiting for the QMAN_FQ_STATE_VDQCR bit to disappear from the
- * "flags" retrieved from qman_fq_state().
- */
-int qman_volatile_dequeue(struct qman_fq *fq, u32 flags, u32 vdqcr);
-
-/**
- * qman_enqueue - Enqueue a frame to a frame queue
- * @fq: the frame queue object to enqueue to
- * @fd: a descriptor of the frame to be enqueued
- * @flags: bit-mask of QMAN_ENQUEUE_FLAG_*** options
- *
- * Fills an entry in the EQCR of portal @qm to enqueue the frame described by
- * @fd. The descriptor details are copied from @fd to the EQCR entry, the 'pid'
- * field is ignored. The return value is non-zero on error, such as ring full
- * (and FLAG_WAIT not specified), congestion avoidance (FLAG_WATCH_CGR
- * specified), etc. If the ring is full and FLAG_WAIT is specified, this
- * function will block. If FLAG_INTERRUPT is set, the EQCI bit of the portal
- * interrupt will assert when Qman consumes the EQCR entry (subject to "status
- * disable", "enable", and "inhibit" registers). If FLAG_DCA is set, Qman will
- * perform an implied "discrete consumption acknowledgment" on the dequeue
- * ring's (DQRR) entry, at the ring index specified by the FLAG_DCA_IDX(x)
- * macro. (As an alternative to issuing explicit DCA actions on DQRR entries,
- * this implicit DCA can delay the release of a "held active" frame queue
- * corresponding to a DQRR entry until Qman consumes the EQCR entry - providing
- * order-preservation semantics in packet-forwarding scenarios.) If FLAG_DCA is
- * set, then FLAG_DCA_PARK can also be set to imply that the DQRR consumption
- * acknowledgment should "park request" the "held active" frame queue. Ie.
- * when the portal eventually releases that frame queue, it will be left in the
- * Parked state rather than Tentatively Scheduled or Truly Scheduled. If the
- * portal is watching congestion groups, the QMAN_ENQUEUE_FLAG_WATCH_CGR flag
- * is requested, and the FQ is a member of a congestion group, then this
- * function returns -EAGAIN if the congestion group is currently congested.
- * Note, this does not eliminate ERNs, as the async interface means we can be
- * sending enqueue commands to an un-congested FQ that becomes congested before
- * the enqueue commands are processed, but it does minimise needless thrashing
- * of an already busy hardware resource by throttling many of the to-be-dropped
- * enqueues "at the source".
- */
-int qman_enqueue(struct qman_fq *fq, const struct qm_fd *fd, u32 flags);
-
__rte_internal
int qman_enqueue_multi(struct qman_fq *fq, const struct qm_fd *fd, u32 *flags,
int frames_to_send);
@@ -2061,17 +1987,6 @@ static inline int qman_alloc_cgrid(u32 *result)
return (ret > 0) ? 0 : ret;
}
-/**
- * qman_release_cgrid_range - Release the specified range of CGR IDs
- * @id: the base CGR ID of the range to deallocate
- * @count: the number of CGR IDs in the range
- */
-void qman_release_cgrid_range(u32 id, unsigned int count);
-static inline void qman_release_cgrid(u32 id)
-{
- qman_release_cgrid_range(id, 1);
-}
-
/**
* qman_reserve_cgrid_range - Reserve the specified range of CGR ID
* @id: the base CGR ID of the range to reserve
@@ -2087,36 +2002,6 @@ void qman_seed_cgrid_range(u32 id, unsigned int count);
/* Helpers */
/* ------- */
-/**
- * qman_poll_fq_for_init - Check if an FQ has been initialised from OOS
- * @fqid: the FQID that will be initialised by other s/w
- *
- * In many situations, a FQID is provided for communication between s/w
- * entities, and whilst the consumer is responsible for initialising and
- * scheduling the FQ, the producer(s) generally create a wrapper FQ object using
- * and only call qman_enqueue() (no FQ initialisation, scheduling, etc). Ie;
- * qman_create_fq(..., QMAN_FQ_FLAG_NO_MODIFY, ...);
- * However, data can not be enqueued to the FQ until it is initialised out of
- * the OOS state - this function polls for that condition. It is particularly
- * useful for users of IPC functions - each endpoint's Rx FQ is the other
- * endpoint's Tx FQ, so each side can initialise and schedule their Rx FQ object
- * and then use this API on the (NO_MODIFY) Tx FQ object in order to
- * synchronise. The function returns zero for success, +1 if the FQ is still in
- * the OOS state, or negative if there was an error.
- */
-static inline int qman_poll_fq_for_init(struct qman_fq *fq)
-{
- struct qm_mcr_queryfq_np np;
- int err;
-
- err = qman_query_fq_np(fq, &np);
- if (err)
- return err;
- if ((np.state & QM_MCR_NP_STATE_MASK) == QM_MCR_NP_STATE_OOS)
- return 1;
- return 0;
-}
-
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define cpu_to_hw_sg(x)
#define hw_sg_to_cpu(x)
diff --git a/drivers/bus/dpaa/include/fsl_usd.h b/drivers/bus/dpaa/include/fsl_usd.h
index d4e2ea139d..d9363e830a 100644
--- a/drivers/bus/dpaa/include/fsl_usd.h
+++ b/drivers/bus/dpaa/include/fsl_usd.h
@@ -72,10 +72,8 @@ int bman_thread_fd(void);
__rte_internal
void qman_thread_irq(void);
-void bman_thread_irq(void);
__rte_internal
void qman_fq_portal_thread_irq(struct qman_portal *qp);
-void qman_clear_irq(void);
/* Global setup */
int qman_global_init(void);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 36/45] bus/fslmc: remove unused MC object functions
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (34 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 35/45] bus/dpaa: remove unused QMan and BMan functions Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 37/45] eal: remove unused Windows interrupt handle accessors Stephen Hemminger
` (9 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
The DPBP notification config, DPCI order restoration config, DPCON
disable and reset, and the DPIO stashing destination accessors are
MC command wrappers with no caller. The same applies to
dpaa2_dpbp_supported() and two QBMan portal helpers.
Remove the functions, their declarations and the documentation
blocks that described them.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/fslmc/mc/dpbp.c | 74 ----------
drivers/bus/fslmc/mc/dpci.c | 97 -------------
drivers/bus/fslmc/mc/dpcon.c | 45 -------
drivers/bus/fslmc/mc/dpio.c | 127 ------------------
drivers/bus/fslmc/mc/fsl_dpbp.h | 8 --
drivers/bus/fslmc/mc/fsl_dpci.h | 14 --
drivers/bus/fslmc/mc/fsl_dpcon.h | 8 --
drivers/bus/fslmc/mc/fsl_dpio.h | 20 ---
drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 7 -
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 -
.../fslmc/qbman/include/fsl_qbman_portal.h | 20 ---
drivers/bus/fslmc/qbman/qbman_portal.c | 17 ---
12 files changed, 439 deletions(-)
diff --git a/drivers/bus/fslmc/mc/dpbp.c b/drivers/bus/fslmc/mc/dpbp.c
index cb5a288e68..423defb082 100644
--- a/drivers/bus/fslmc/mc/dpbp.c
+++ b/drivers/bus/fslmc/mc/dpbp.c
@@ -360,77 +360,3 @@ int dpbp_get_num_free_bufs(struct fsl_mc_io *mc_io,
return 0;
}
-
-/**
- * dpbp_set_notifications() - Set notifications towards software
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPBP object
- * @cfg: notifications configuration
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpbp_set_notifications(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpbp_notification_cfg *cfg)
-{
- struct dpbp_cmd_set_notifications *cmd_params;
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPBP_CMDID_SET_NOTIFICATIONS,
- cmd_flags, token);
- cmd_params = (struct dpbp_cmd_set_notifications *)cmd.params;
- cmd_params->depletion_entry = cpu_to_le32(cfg->depletion_entry);
- cmd_params->depletion_exit = cpu_to_le32(cfg->depletion_exit);
- cmd_params->surplus_entry = cpu_to_le32(cfg->surplus_entry);
- cmd_params->surplus_exit = cpu_to_le32(cfg->surplus_exit);
- cmd_params->options = cpu_to_le32(cfg->options);
- cmd_params->message_ctx = cpu_to_le64(cfg->message_ctx);
- cmd_params->message_iova = cpu_to_le64(cfg->message_iova);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
-/**
- * dpbp_get_notifications() - Get the notifications configuration
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPBP object
- * @cfg: notifications configuration
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpbp_get_notifications(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpbp_notification_cfg *cfg)
-{
- struct dpbp_rsp_get_notifications *rsp_params;
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPBP_CMDID_GET_NOTIFICATIONS,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- rsp_params = (struct dpbp_rsp_get_notifications *)cmd.params;
- cfg->depletion_entry = le32_to_cpu(rsp_params->depletion_entry);
- cfg->depletion_exit = le32_to_cpu(rsp_params->depletion_exit);
- cfg->surplus_entry = le32_to_cpu(rsp_params->surplus_entry);
- cfg->surplus_exit = le32_to_cpu(rsp_params->surplus_exit);
- cfg->options = le32_to_cpu(rsp_params->options);
- cfg->message_ctx = le64_to_cpu(rsp_params->message_ctx);
- cfg->message_iova = le64_to_cpu(rsp_params->message_iova);
-
- return 0;
-}
diff --git a/drivers/bus/fslmc/mc/dpci.c b/drivers/bus/fslmc/mc/dpci.c
index 3e58c7a218..4b6471a398 100644
--- a/drivers/bus/fslmc/mc/dpci.c
+++ b/drivers/bus/fslmc/mc/dpci.c
@@ -467,100 +467,3 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
return 0;
}
-
-/**
- * dpci_set_opr() - Set Order Restoration configuration.
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPCI object
- * @index: The queue index
- * @options: Configuration mode options
- * can be OPR_OPT_CREATE or OPR_OPT_RETIRE
- * @cfg: Configuration options for the OPR
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpci_set_opr(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t index,
- uint8_t options,
- struct opr_cfg *cfg)
-{
- struct dpci_cmd_set_opr *cmd_params;
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPCI_CMDID_SET_OPR,
- cmd_flags,
- token);
- cmd_params = (struct dpci_cmd_set_opr *)cmd.params;
- cmd_params->index = index;
- cmd_params->options = options;
- cmd_params->oloe = cfg->oloe;
- cmd_params->oeane = cfg->oeane;
- cmd_params->olws = cfg->olws;
- cmd_params->oa = cfg->oa;
- cmd_params->oprrws = cfg->oprrws;
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
-/**
- * dpci_get_opr() - Retrieve Order Restoration config and query.
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPCI object
- * @index: The queue index
- * @cfg: Returned OPR configuration
- * @qry: Returned OPR query
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpci_get_opr(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t index,
- struct opr_cfg *cfg,
- struct opr_qry *qry)
-{
- struct dpci_rsp_get_opr *rsp_params;
- struct dpci_cmd_get_opr *cmd_params;
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPCI_CMDID_GET_OPR,
- cmd_flags,
- token);
- cmd_params = (struct dpci_cmd_get_opr *)cmd.params;
- cmd_params->index = index;
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- rsp_params = (struct dpci_rsp_get_opr *)cmd.params;
- cfg->oloe = rsp_params->oloe;
- cfg->oeane = rsp_params->oeane;
- cfg->olws = rsp_params->olws;
- cfg->oa = rsp_params->oa;
- cfg->oprrws = rsp_params->oprrws;
- qry->rip = dpci_get_field(rsp_params->flags, RIP);
- qry->enable = dpci_get_field(rsp_params->flags, OPR_ENABLE);
- qry->nesn = le16_to_cpu(rsp_params->nesn);
- qry->ndsn = le16_to_cpu(rsp_params->ndsn);
- qry->ea_tseq = le16_to_cpu(rsp_params->ea_tseq);
- qry->tseq_nlis = dpci_get_field(rsp_params->tseq_nlis, TSEQ_NLIS);
- qry->ea_hseq = le16_to_cpu(rsp_params->ea_hseq);
- qry->hseq_nlis = dpci_get_field(rsp_params->hseq_nlis, HSEQ_NLIS);
- qry->ea_hptr = le16_to_cpu(rsp_params->ea_hptr);
- qry->ea_tptr = le16_to_cpu(rsp_params->ea_tptr);
- qry->opr_vid = le16_to_cpu(rsp_params->opr_vid);
- qry->opr_id = le16_to_cpu(rsp_params->opr_id);
-
- return 0;
-}
diff --git a/drivers/bus/fslmc/mc/dpcon.c b/drivers/bus/fslmc/mc/dpcon.c
index 044ca7bb8b..36715d5a79 100644
--- a/drivers/bus/fslmc/mc/dpcon.c
+++ b/drivers/bus/fslmc/mc/dpcon.c
@@ -182,29 +182,6 @@ int dpcon_enable(struct fsl_mc_io *mc_io,
return mc_send_command(mc_io, &cmd);
}
-/**
- * dpcon_disable() - Disable the DPCON
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPCON object
- *
- * Return: '0' on Success; Error code otherwise
- */
-int dpcon_disable(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token)
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPCON_CMDID_DISABLE,
- cmd_flags,
- token);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
/**
* dpcon_is_enabled() - Check if the DPCON is enabled.
* @mc_io: Pointer to MC portal's I/O object
@@ -240,28 +217,6 @@ int dpcon_is_enabled(struct fsl_mc_io *mc_io,
return 0;
}
-/**
- * dpcon_reset() - Reset the DPCON, returns the object to initial state.
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPCON object
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpcon_reset(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token)
-{
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPCON_CMDID_RESET,
- cmd_flags, token);
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
/**
* dpcon_get_attributes() - Retrieve DPCON attributes.
* @mc_io: Pointer to MC portal's I/O object
diff --git a/drivers/bus/fslmc/mc/dpio.c b/drivers/bus/fslmc/mc/dpio.c
index a23692417c..21c7f93794 100644
--- a/drivers/bus/fslmc/mc/dpio.c
+++ b/drivers/bus/fslmc/mc/dpio.c
@@ -343,133 +343,6 @@ int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
return mc_send_command(mc_io, &cmd);
}
-/**
- * dpio_get_stashing_destination() - Get the stashing destination..
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPIO object
- * @sdest: Returns the stashing destination value
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t *sdest)
-{
- struct dpio_stashing_dest *rsp_params;
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPIO_CMDID_GET_STASHING_DEST,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- rsp_params = (struct dpio_stashing_dest *)cmd.params;
- *sdest = rsp_params->sdest;
-
- return 0;
-}
-
-/**
- * dpio_set_stashing_destination_by_core_id() - Set the stashing destination source
- * using the core id.
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPIO object
- * @core_id: Core id stashing destination
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpio_set_stashing_destination_by_core_id(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t core_id)
-{
- struct dpio_stashing_dest_by_core_id *cmd_params;
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPIO_CMDID_SET_STASHING_DEST_BY_CORE_ID,
- cmd_flags,
- token);
- cmd_params = (struct dpio_stashing_dest_by_core_id *)cmd.params;
- cmd_params->core_id = core_id;
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
-/**
- * dpio_set_stashing_destination_source() - Set the stashing destination source.
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPIO object
- * @ss: Stashing destination source (0 manual/1 automatic)
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpio_set_stashing_destination_source(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t ss)
-{
- struct dpio_stashing_dest_source *cmd_params;
- struct mc_command cmd = { 0 };
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPIO_CMDID_SET_STASHING_DEST_SOURCE,
- cmd_flags,
- token);
- cmd_params = (struct dpio_stashing_dest_source *)cmd.params;
- cmd_params->ss = ss;
-
- /* send command to mc*/
- return mc_send_command(mc_io, &cmd);
-}
-
-/**
- * dpio_get_stashing_destination_source() - Get the stashing destination source.
- * @mc_io: Pointer to MC portal's I/O object
- * @cmd_flags: Command flags; one or more of 'MC_CMD_FLAG_'
- * @token: Token of DPIO object
- * @ss: Returns the stashing destination source (0 manual/1 automatic)
- *
- * Return: '0' on Success; Error code otherwise.
- */
-int dpio_get_stashing_destination_source(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t *ss)
-{
- struct dpio_stashing_dest_source *rsp_params;
- struct mc_command cmd = { 0 };
- int err;
-
- /* prepare command */
- cmd.header = mc_encode_cmd_header(DPIO_CMDID_GET_STASHING_DEST_SOURCE,
- cmd_flags,
- token);
-
- /* send command to mc*/
- err = mc_send_command(mc_io, &cmd);
- if (err)
- return err;
-
- /* retrieve response parameters */
- rsp_params = (struct dpio_stashing_dest_source *)cmd.params;
- *ss = rsp_params->ss;
-
- return 0;
-}
-
/**
* dpio_add_static_dequeue_channel() - Add a static dequeue channel.
* @mc_io: Pointer to MC portal's I/O object
diff --git a/drivers/bus/fslmc/mc/fsl_dpbp.h b/drivers/bus/fslmc/mc/fsl_dpbp.h
index 894ff86d9c..4e3c51c776 100644
--- a/drivers/bus/fslmc/mc/fsl_dpbp.h
+++ b/drivers/bus/fslmc/mc/fsl_dpbp.h
@@ -52,14 +52,6 @@ int dpbp_open(struct fsl_mc_io *mc_io,
int dpbp_close(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
-int dpbp_set_notifications(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpbp_notification_cfg *cfg);
-int dpbp_get_notifications(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- struct dpbp_notification_cfg *cfg);
#define DPBP_NOTIF_OPT_WRIOP 0x00010000
/**
diff --git a/drivers/bus/fslmc/mc/fsl_dpci.h b/drivers/bus/fslmc/mc/fsl_dpci.h
index 8d318d12f7..05b17f639b 100644
--- a/drivers/bus/fslmc/mc/fsl_dpci.h
+++ b/drivers/bus/fslmc/mc/fsl_dpci.h
@@ -231,18 +231,4 @@ int dpci_get_api_version(struct fsl_mc_io *mc_io,
uint16_t *major_ver,
uint16_t *minor_ver);
-int dpci_set_opr(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t index,
- uint8_t options,
- struct opr_cfg *cfg);
-
-int dpci_get_opr(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t index,
- struct opr_cfg *cfg,
- struct opr_qry *qry);
-
#endif /* __FSL_DPCI_H */
diff --git a/drivers/bus/fslmc/mc/fsl_dpcon.h b/drivers/bus/fslmc/mc/fsl_dpcon.h
index d84c5ae3e9..3a9d29cd1b 100644
--- a/drivers/bus/fslmc/mc/fsl_dpcon.h
+++ b/drivers/bus/fslmc/mc/fsl_dpcon.h
@@ -55,19 +55,11 @@ int dpcon_enable(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token);
-int dpcon_disable(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token);
-
int dpcon_is_enabled(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
uint16_t token,
int *en);
-int dpcon_reset(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token);
-
/**
* struct dpcon_attr - Structure representing DPCON attributes
* @id: DPCON object ID
diff --git a/drivers/bus/fslmc/mc/fsl_dpio.h b/drivers/bus/fslmc/mc/fsl_dpio.h
index 9c1513fedd..6a01060db1 100644
--- a/drivers/bus/fslmc/mc/fsl_dpio.h
+++ b/drivers/bus/fslmc/mc/fsl_dpio.h
@@ -81,26 +81,6 @@ int dpio_set_stashing_destination(struct fsl_mc_io *mc_io,
uint16_t token,
uint8_t sdest);
-int dpio_get_stashing_destination(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t *sdest);
-
-int dpio_set_stashing_destination_by_core_id(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t core_id);
-
-int dpio_set_stashing_destination_source(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t ss);
-
-int dpio_get_stashing_destination_source(struct fsl_mc_io *mc_io,
- uint32_t cmd_flags,
- uint16_t token,
- uint8_t *ss);
-
__rte_internal
int dpio_add_static_dequeue_channel(struct fsl_mc_io *mc_io,
uint32_t cmd_flags,
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
index f09c5bb9bf..a4f0337f60 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c
@@ -129,13 +129,6 @@ void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp)
}
}
-int dpaa2_dpbp_supported(void)
-{
- if (TAILQ_EMPTY(&dpbp_dev_list))
- return -1;
- return 0;
-}
-
static void
dpaa2_close_dpbp_device(int object_id)
{
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index 0643b734f7..a122e599f0 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -565,8 +565,6 @@ struct dpaa2_dpbp_dev *dpaa2_alloc_dpbp_dev(void);
__rte_internal
void dpaa2_free_dpbp_dev(struct dpaa2_dpbp_dev *dpbp);
-int dpaa2_dpbp_supported(void);
-
__rte_internal
struct dpaa2_dpci_dev *rte_dpaa2_alloc_dpci_dev(void);
diff --git a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
index f8f056ae1d..46ddb9abb6 100644
--- a/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
+++ b/drivers/bus/fslmc/qbman/include/fsl_qbman_portal.h
@@ -473,16 +473,6 @@ void qbman_swp_dqrr_idx_consume(struct qbman_swp *s, uint8_t dqrr_index);
__rte_internal
uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr);
-/**
- * qbman_get_dqrr_from_idx() - Use index to get the dqrr entry from the
- * given portal
- * @s: the given portal.
- * @idx: the dqrr index.
- *
- * Return dqrr entry object.
- */
-struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx);
-
/* ------------------------------------------------- */
/* Polling user-provided storage for dequeue results */
/* ------------------------------------------------- */
@@ -982,16 +972,6 @@ void qbman_eq_desc_set_token(struct qbman_eq_desc *d, uint8_t token);
__rte_internal
void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid);
-/**
- * qbman_eq_desc_set_qd() - Set Queuing Destination for the enqueue command.
- * @d: the enqueue descriptor
- * @qdid: the id of the queuing destination to be enqueued.
- * @qd_bin: the queuing destination bin
- * @qd_prio: the queuing destination priority.
- */
-void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
- uint16_t qd_bin, uint8_t qd_prio);
-
/**
* qbman_eq_desc_set_eqdi() - enable/disable EQDI interrupt
* @d: the enqueue descriptor
diff --git a/drivers/bus/fslmc/qbman/qbman_portal.c b/drivers/bus/fslmc/qbman/qbman_portal.c
index 71be1a504f..7c2d7161f2 100644
--- a/drivers/bus/fslmc/qbman/qbman_portal.c
+++ b/drivers/bus/fslmc/qbman/qbman_portal.c
@@ -688,15 +688,6 @@ void qbman_eq_desc_set_fq(struct qbman_eq_desc *d, uint32_t fqid)
d->eq.tgtid = fqid;
}
-void qbman_eq_desc_set_qd(struct qbman_eq_desc *d, uint32_t qdid,
- uint16_t qd_bin, uint8_t qd_prio)
-{
- d->eq.verb |= 1 << QB_ENQUEUE_CMD_TARGET_TYPE_SHIFT;
- d->eq.tgtid = qdid;
- d->eq.qdbin = qd_bin;
- d->eq.qpri = qd_prio;
-}
-
void qbman_eq_desc_set_eqdi(struct qbman_eq_desc *d, int enable)
{
if (enable)
@@ -2957,11 +2948,3 @@ uint8_t qbman_get_dqrr_idx(const struct qbman_result *dqrr)
{
return QBMAN_IDX_FROM_DQRR(dqrr);
}
-
-struct qbman_result *qbman_get_dqrr_from_idx(struct qbman_swp *s, uint8_t idx)
-{
- struct qbman_result *dq;
-
- dq = qbman_cena_read(&s->sys, QBMAN_CENA_SWP_DQRR(idx));
- return dq;
-}
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 37/45] eal: remove unused Windows interrupt handle accessors
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (35 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 36/45] bus/fslmc: remove unused MC object functions Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 38/45] common/sfc_efx: make efx_family static Stephen Hemminger
` (8 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Harman Kalra
rte_intr_instance_windows_handle_get() and the matching set
function have no caller, on Windows or anywhere else. Remove them
and their declarations.
With both gone, nothing reads or writes the windows_handle member of
struct rte_intr_handle, so it goes too and the anonymous union that
held it collapses to the two file descriptors.
Only the Linux build is compile tested here, but the functions are
built from common code and nothing under lib/eal/windows or in any
driver references them.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/eal/common/eal_common_interrupts.c | 21 -----------------
lib/eal/common/eal_interrupts.h | 9 ++------
lib/eal/include/rte_interrupts.h | 31 --------------------------
3 files changed, 2 insertions(+), 59 deletions(-)
diff --git a/lib/eal/common/eal_common_interrupts.c b/lib/eal/common/eal_common_interrupts.c
index aa3ff0da50..4cad724f8d 100644
--- a/lib/eal/common/eal_common_interrupts.c
+++ b/lib/eal/common/eal_common_interrupts.c
@@ -519,24 +519,3 @@ void rte_intr_vec_list_free(struct rte_intr_handle *intr_handle)
intr_handle->intr_vec = NULL;
intr_handle->vec_list_size = 0;
}
-
-void *rte_intr_instance_windows_handle_get(struct rte_intr_handle *intr_handle)
-{
- CHECK_VALID_INTR_HANDLE(intr_handle);
-
- return intr_handle->windows_handle;
-fail:
- return NULL;
-}
-
-int rte_intr_instance_windows_handle_set(struct rte_intr_handle *intr_handle,
- void *windows_handle)
-{
- CHECK_VALID_INTR_HANDLE(intr_handle);
-
- intr_handle->windows_handle = windows_handle;
-
- return 0;
-fail:
- return -rte_errno;
-}
diff --git a/lib/eal/common/eal_interrupts.h b/lib/eal/common/eal_interrupts.h
index c9d674471f..d1760946d1 100644
--- a/lib/eal/common/eal_interrupts.h
+++ b/lib/eal/common/eal_interrupts.h
@@ -6,13 +6,8 @@
#define EAL_INTERRUPTS_H
struct rte_intr_handle {
- union {
- struct {
- int dev_fd; /**< VFIO/UIO cfg device file descriptor */
- int fd; /**< interrupt event file descriptor */
- };
- void *windows_handle; /**< device driver handle */
- };
+ int dev_fd; /**< VFIO/UIO cfg device file descriptor */
+ int fd; /**< interrupt event file descriptor */
uint32_t alloc_flags; /**< flags passed at allocation */
enum rte_intr_handle_type type; /**< handle type */
uint32_t max_intr; /**< max interrupt requested */
diff --git a/lib/eal/include/rte_interrupts.h b/lib/eal/include/rte_interrupts.h
index a0b83c99d1..34c6044075 100644
--- a/lib/eal/include/rte_interrupts.h
+++ b/lib/eal/include/rte_interrupts.h
@@ -767,37 +767,6 @@ __rte_internal
int
rte_intr_event_list_update(struct rte_intr_handle *intr_handle, int size);
-/**
- * @internal
- * Returns the Windows handle of the given interrupt instance.
- *
- * @param intr_handle
- * pointer to the interrupt handle.
- *
- * @return
- * - On success, Windows handle.
- * - On failure, NULL.
- */
-void *
-rte_intr_instance_windows_handle_get(struct rte_intr_handle *intr_handle);
-
-/**
- * @internal
- * Set the Windows handle for the given interrupt instance.
- *
- * @param intr_handle
- * pointer to the interrupt handle.
- * @param windows_handle
- * Windows handle to be set.
- *
- * @return
- * - On success, zero
- * - On failure, a negative value and rte_errno is set.
- */
-int
-rte_intr_instance_windows_handle_set(struct rte_intr_handle *intr_handle,
- void *windows_handle);
-
#ifdef __cplusplus
}
#endif
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 38/45] common/sfc_efx: make efx_family static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (36 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 37/45] eal: remove unused Windows interrupt handle accessors Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 39/45] gpudev: make event notify helper static Stephen Hemminger
` (7 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Andrew Rybchenko
efx_family() is only called from efx_family_probe_bar() in the same
file. Make it static and drop the declaration.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/sfc_efx/base/efx.h | 8 --------
drivers/common/sfc_efx/base/efx_nic.c | 2 +-
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/common/sfc_efx/base/efx.h b/drivers/common/sfc_efx/base/efx.h
index 5626563cb8..5c58bdb9a9 100644
--- a/drivers/common/sfc_efx/base/efx.h
+++ b/drivers/common/sfc_efx/base/efx.h
@@ -80,14 +80,6 @@ typedef struct efx_bar_region_s {
efsys_dma_addr_t ebr_length;
} efx_bar_region_t;
-/* The function is deprecated. It is used only if Riverhead is not supported. */
-extern __checkReturn efx_rc_t
-efx_family(
- __in uint16_t venid,
- __in uint16_t devid,
- __out efx_family_t *efp,
- __out unsigned int *membarp);
-
#if EFSYS_OPT_PCI
/* PCIe interface numbers for multi-host configurations. */
diff --git a/drivers/common/sfc_efx/base/efx_nic.c b/drivers/common/sfc_efx/base/efx_nic.c
index f21c59fb00..9c7d17823f 100644
--- a/drivers/common/sfc_efx/base/efx_nic.c
+++ b/drivers/common/sfc_efx/base/efx_nic.c
@@ -8,7 +8,7 @@
#include "efx_impl.h"
- __checkReturn efx_rc_t
+static __checkReturn efx_rc_t
efx_family(
__in uint16_t venid,
__in uint16_t devid,
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 39/45] gpudev: make event notify helper static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (37 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 38/45] common/sfc_efx: make efx_family static Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 40/45] mldev: make device lookup " Stephen Hemminger
` (6 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Elena Agostini
rte_gpu_notify() is only called from gpudev.c when a device is
added or removed. Make it static, with a forward declaration
alongside the existing one for gpu_free_callbacks().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/gpudev/gpudev.c | 3 ++-
lib/gpudev/gpudev_driver.h | 3 ---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/gpudev/gpudev.c b/lib/gpudev/gpudev.c
index 78bfd5bed3..9ee956366d 100644
--- a/lib/gpudev/gpudev.c
+++ b/lib/gpudev/gpudev.c
@@ -50,6 +50,7 @@ struct rte_gpu_callback {
};
static rte_rwlock_t gpu_callback_lock = RTE_RWLOCK_INITIALIZER;
static void gpu_free_callbacks(struct rte_gpu *dev);
+static void rte_gpu_notify(struct rte_gpu *dev, enum rte_gpu_event event);
RTE_EXPORT_EXPERIMENTAL_SYMBOL(rte_gpu_init, 21.11)
int
@@ -456,7 +457,7 @@ gpu_free_callbacks(struct rte_gpu *dev)
rte_rwlock_write_unlock(&gpu_callback_lock);
}
-void
+static void
rte_gpu_notify(struct rte_gpu *dev, enum rte_gpu_event event)
{
int16_t dev_id;
diff --git a/lib/gpudev/gpudev_driver.h b/lib/gpudev/gpudev_driver.h
index 7a569beb67..87b896ad46 100644
--- a/lib/gpudev/gpudev_driver.h
+++ b/lib/gpudev/gpudev_driver.h
@@ -102,9 +102,6 @@ void rte_gpu_complete_new(struct rte_gpu *dev);
__rte_internal
int rte_gpu_release(struct rte_gpu *dev);
-/* Call registered callbacks. No multi-process event. */
-void rte_gpu_notify(struct rte_gpu *dev, enum rte_gpu_event);
-
#ifdef __cplusplus
}
#endif
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 40/45] mldev: make device lookup helper static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (38 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 39/45] gpudev: make event notify helper static Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 41/45] bus/fslmc: make internal helpers static Stephen Hemminger
` (5 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Srikanth Yalavarthi
rte_ml_dev_pmd_get_dev() is only used inside rte_mldev.c.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/mldev/rte_mldev.c | 2 +-
lib/mldev/rte_mldev_pmd.h | 14 --------------
2 files changed, 1 insertion(+), 15 deletions(-)
diff --git a/lib/mldev/rte_mldev.c b/lib/mldev/rte_mldev.c
index 2381af75c7..a40b7c5d4d 100644
--- a/lib/mldev/rte_mldev.c
+++ b/lib/mldev/rte_mldev.c
@@ -23,7 +23,7 @@ struct rte_ml_op_pool_private {
uint16_t user_size; /* Size of private user data with each operation. */
};
-struct rte_ml_dev *
+static struct rte_ml_dev *
rte_ml_dev_pmd_get_dev(int16_t dev_id)
{
return &ml_dev_globals.devs[dev_id];
diff --git a/lib/mldev/rte_mldev_pmd.h b/lib/mldev/rte_mldev_pmd.h
index 6cf50662c5..6278cc5a2a 100644
--- a/lib/mldev/rte_mldev_pmd.h
+++ b/lib/mldev/rte_mldev_pmd.h
@@ -40,20 +40,6 @@ struct rte_ml_dev_pmd_init_params {
struct rte_ml_dev;
-/**
- * @internal
- *
- * Get the ML device pointer for the device. Assumes a valid device index.
- *
- * @param dev_id
- * Device ID value to select the device structure.
- *
- * @return
- * The rte_ml_dev pointer for the given device ID.
- */
-struct rte_ml_dev *
-rte_ml_dev_pmd_get_dev(int16_t dev_id);
-
/**
* @internal
*
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 41/45] bus/fslmc: make internal helpers static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (39 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 40/45] mldev: make device lookup " Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 42/45] net/cnxk: make inline inbound mode setter static Stephen Hemminger
` (4 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Hemant Agrawal, Sachin Saxena
dpaa2_dpio_intr_deinit() and rte_fslmc_cold_mem_iova_to_vaddr() are
each used only in the file that defines them.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/fslmc/bus_fslmc_driver.h | 3 ---
drivers/bus/fslmc/fslmc_vfio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.c | 2 +-
drivers/bus/fslmc/portal/dpaa2_hw_dpio.h | 2 --
drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 3 ---
5 files changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/bus/fslmc/bus_fslmc_driver.h b/drivers/bus/fslmc/bus_fslmc_driver.h
index 2ed17f3b08..f5da0987e7 100644
--- a/drivers/bus/fslmc/bus_fslmc_driver.h
+++ b/drivers/bus/fslmc/bus_fslmc_driver.h
@@ -145,9 +145,6 @@ __rte_internal
uint64_t
rte_fslmc_cold_mem_vaddr_to_iova(void *vaddr,
uint64_t size);
-void *
-rte_fslmc_cold_mem_iova_to_vaddr(uint64_t iova,
- uint64_t size);
__rte_internal
__rte_hot uint64_t
rte_fslmc_mem_vaddr_to_iova(void *vaddr);
diff --git a/drivers/bus/fslmc/fslmc_vfio.c b/drivers/bus/fslmc/fslmc_vfio.c
index 466e688c62..988ff7e07a 100644
--- a/drivers/bus/fslmc/fslmc_vfio.c
+++ b/drivers/bus/fslmc/fslmc_vfio.c
@@ -1024,7 +1024,7 @@ rte_fslmc_cold_mem_vaddr_to_iova(void *vaddr,
return RTE_BAD_IOVA;
}
-void *
+static void *
rte_fslmc_cold_mem_iova_to_vaddr(uint64_t iova,
uint64_t size)
{
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
index c4c4f16080..254ae8f56e 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.c
@@ -279,7 +279,7 @@ int dpaa2_dpio_intr_init(struct dpaa2_dpio_dev *dpio_dev, int threshold,
return 0;
}
-void dpaa2_dpio_intr_deinit(struct dpaa2_dpio_dev *dpio_dev)
+static void dpaa2_dpio_intr_deinit(struct dpaa2_dpio_dev *dpio_dev)
{
int ret;
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
index 6681f5ffdc..55caf35595 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_dpio.h
@@ -55,8 +55,6 @@ __rte_internal
int dpaa2_dpio_intr_init(struct dpaa2_dpio_dev *dpio_dev, int threshold,
int timeout, bool build_epoll);
-void dpaa2_dpio_intr_deinit(struct dpaa2_dpio_dev *dpio_dev);
-
/* pin a DPIO's MSI IRQ to the calling lcore's core (rx-queue interrupt mode) */
__rte_internal
void dpaa2_dpio_affine_intr_to_core(int32_t dpio_id);
diff --git a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
index a122e599f0..d58b3ad490 100644
--- a/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
+++ b/drivers/bus/fslmc/portal/dpaa2_hw_pvt.h
@@ -487,9 +487,6 @@ dpaa2_mem_va_to_iova_check(void *va, uint64_t size)
#define DPAA2_VADDR_TO_IOVA_AND_CHECK(_vaddr, size) \
dpaa2_mem_va_to_iova_check(_vaddr, size)
-#define DPAA2_IOVA_TO_VADDR_AND_CHECK(_iova, size) \
- rte_fslmc_cold_mem_iova_to_vaddr(_iova, size)
-
static inline
int check_swp_active_dqs(uint16_t dpio_index)
{
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 42/45] net/cnxk: make inline inbound mode setter static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (40 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 41/45] bus/fslmc: make internal helpers static Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 43/45] common/sxe2: make memory event callback static Stephen Hemminger
` (3 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra
cnxk_nix_inb_mode_set() is only called from cnxk_ethdev.c.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/cnxk/cnxk_ethdev.c | 2 +-
drivers/net/cnxk/cnxk_ethdev.h | 2 --
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/cnxk/cnxk_ethdev.c b/drivers/net/cnxk/cnxk_ethdev.c
index c0ce326475..f2895fffcc 100644
--- a/drivers/net/cnxk/cnxk_ethdev.c
+++ b/drivers/net/cnxk/cnxk_ethdev.c
@@ -189,7 +189,7 @@ cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb)
cnxk_ethdev_rx_offload_cb = cb;
}
-int
+static int
cnxk_nix_inb_mode_set(struct cnxk_eth_dev *dev, bool use_inl_dev)
{
struct roc_nix *nix = &dev->nix;
diff --git a/drivers/net/cnxk/cnxk_ethdev.h b/drivers/net/cnxk/cnxk_ethdev.h
index f358a32311..b3cae5d227 100644
--- a/drivers/net/cnxk/cnxk_ethdev.h
+++ b/drivers/net/cnxk/cnxk_ethdev.h
@@ -790,8 +790,6 @@ int cnxk_nix_lookup_mem_metapool_clear(struct cnxk_eth_dev *dev);
int cnxk_nix_lookup_mem_bufsize_set(struct cnxk_eth_dev *dev, uint64_t size);
int cnxk_nix_lookup_mem_bufsize_clear(struct cnxk_eth_dev *dev);
-int cnxk_nix_inb_mode_set(struct cnxk_eth_dev *dev, bool use_inl_dev);
-
__rte_internal
void cnxk_ethdev_rx_offload_cb_register(cnxk_ethdev_rx_offload_cb_t cb);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 43/45] common/sxe2: make memory event callback static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (41 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 42/45] net/cnxk: make inline inbound mode setter static Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 44/45] net/idpf: make internal burst functions static Stephen Hemminger
` (2 subsequent siblings)
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jie Liu
sxe2_common_mem_event_cb() is only registered and used inside
sxe2_common.c.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/sxe2/sxe2_common.c | 2 +-
drivers/common/sxe2/sxe2_common.h | 4 ----
2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/common/sxe2/sxe2_common.c b/drivers/common/sxe2/sxe2_common.c
index 6670f3d814..3ad26c026c 100644
--- a/drivers/common/sxe2/sxe2_common.c
+++ b/drivers/common/sxe2/sxe2_common.c
@@ -246,7 +246,7 @@ static int32_t sxe2_dma_mem_map(struct sxe2_common_device *cdev,
return ret;
}
-void
+static void
sxe2_common_mem_event_cb(enum rte_mem_event type,
const void *addr, size_t size, void *arg __rte_unused)
{
diff --git a/drivers/common/sxe2/sxe2_common.h b/drivers/common/sxe2/sxe2_common.h
index 3d97470e7d..135b386ed4 100644
--- a/drivers/common/sxe2/sxe2_common.h
+++ b/drivers/common/sxe2/sxe2_common.h
@@ -68,10 +68,6 @@ struct sxe2_class_driver {
uint32_t intr_rmv;
};
-void
-sxe2_common_mem_event_cb(enum rte_mem_event type,
- const void *addr, size_t size, void *arg __rte_unused);
-
__rte_internal
void
sxe2_class_driver_register(struct sxe2_class_driver *driver);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 44/45] net/idpf: make internal burst functions static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (42 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 43/45] common/sxe2: make memory event callback static Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-29 20:49 ` [PATCH 45/45] common/cnxk: make internal roc " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Jingjing Wu, Praveen Shetty
The single queue and split queue burst functions are installed
through the Rx and Tx path info tables in the same file, and
idpf_vc_one_msg_read() is only used by the virtchnl code there.
Make them static.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/intel/idpf/idpf_common_rxtx.c | 12 ++++++------
drivers/net/intel/idpf/idpf_common_rxtx.h | 12 ------------
drivers/net/intel/idpf/idpf_common_virtchnl.c | 2 +-
drivers/net/intel/idpf/idpf_common_virtchnl.h | 2 --
4 files changed, 7 insertions(+), 21 deletions(-)
diff --git a/drivers/net/intel/idpf/idpf_common_rxtx.c b/drivers/net/intel/idpf/idpf_common_rxtx.c
index 61e5bc035c..7a0083456d 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx.c
+++ b/drivers/net/intel/idpf/idpf_common_rxtx.c
@@ -648,7 +648,7 @@ idpf_split_rx_bufq_refill(struct idpf_rx_queue *rx_bufq)
rx_bufq->rx_tail = next_avail;
}
-uint16_t
+static uint16_t
idpf_dp_splitq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
{
@@ -928,7 +928,7 @@ idpf_get_context_desc(uint64_t ol_flags, const struct rte_mbuf *mbuf,
return 1;
}
-uint16_t
+static uint16_t
idpf_dp_splitq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
{
@@ -1159,7 +1159,7 @@ idpf_singleq_rx_rss_offload(struct rte_mbuf *mb,
}
-uint16_t
+static uint16_t
idpf_dp_singleq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
{
@@ -1282,7 +1282,7 @@ idpf_dp_singleq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
return nb_rx;
}
-uint16_t
+static uint16_t
idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts)
{
@@ -1427,7 +1427,7 @@ idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
}
/* TX function */
-uint16_t
+static uint16_t
idpf_dp_singleq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
{
@@ -1436,7 +1436,7 @@ idpf_dp_singleq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
idpf_get_context_desc, NULL, NULL);
}
-uint16_t
+static uint16_t
idpf_dp_singleq_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts)
{
diff --git a/drivers/net/intel/idpf/idpf_common_rxtx.h b/drivers/net/intel/idpf/idpf_common_rxtx.h
index 128455b595..110b32627c 100644
--- a/drivers/net/intel/idpf/idpf_common_rxtx.h
+++ b/drivers/net/intel/idpf/idpf_common_rxtx.h
@@ -232,16 +232,6 @@ __rte_internal
int idpf_qc_single_rxq_mbufs_alloc(struct idpf_rx_queue *rxq);
__rte_internal
int idpf_qc_split_rxq_mbufs_alloc(struct idpf_rx_queue *rxq);
-uint16_t idpf_dp_splitq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
- uint16_t nb_pkts);
-uint16_t idpf_dp_splitq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
- uint16_t nb_pkts);
-uint16_t idpf_dp_singleq_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
- uint16_t nb_pkts);
-uint16_t idpf_dp_singleq_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
- uint16_t nb_pkts);
-uint16_t idpf_dp_singleq_xmit_pkts_simple(void *tx_queue, struct rte_mbuf **tx_pkts,
- uint16_t nb_pkts);
__rte_internal
uint16_t idpf_dp_prep_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
@@ -261,8 +251,6 @@ uint16_t idpf_dp_splitq_xmit_pkts_avx512(void *tx_queue, struct rte_mbuf **tx_pk
uint16_t nb_pkts);
uint16_t idpf_dp_splitq_recv_pkts_avx2(void *rxq, struct rte_mbuf **rx_pkts,
uint16_t nb_pkts);
-uint16_t idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
- uint16_t nb_pkts);
uint16_t idpf_dp_splitq_xmit_pkts_avx2(void *tx_queue, struct rte_mbuf **tx_pkts,
uint16_t nb_pkts);
__rte_internal
diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.c b/drivers/net/intel/idpf/idpf_common_virtchnl.c
index 986ceede7d..517214d5e0 100644
--- a/drivers/net/intel/idpf/idpf_common_virtchnl.c
+++ b/drivers/net/intel/idpf/idpf_common_virtchnl.c
@@ -187,7 +187,7 @@ idpf_read_msg_from_cp(struct idpf_adapter *adapter, uint16_t buf_len,
#define MAX_TRY_TIMES 200
#define ASQ_DELAY_MS 10
-int
+static int
idpf_vc_one_msg_read(struct idpf_adapter *adapter, uint32_t ops, uint16_t buf_len,
uint8_t *buf)
{
diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.h b/drivers/net/intel/idpf/idpf_common_virtchnl.h
index c683c0dd2b..d6fbcaeb5d 100644
--- a/drivers/net/intel/idpf/idpf_common_virtchnl.h
+++ b/drivers/net/intel/idpf/idpf_common_virtchnl.h
@@ -36,8 +36,6 @@ int idpf_vc_vectors_dealloc(struct idpf_vport *vport);
int idpf_vc_ptype_info_query(struct idpf_adapter *adapter,
struct virtchnl2_get_ptype_info *req_ptype_info,
struct virtchnl2_get_ptype_info *recv_ptype_info);
-int idpf_vc_one_msg_read(struct idpf_adapter *adapter, uint32_t ops,
- uint16_t buf_len, uint8_t *buf);
__rte_internal
int idpf_vc_rxq_config(struct idpf_vport *vport, struct idpf_rx_queue *rxq);
__rte_internal
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH 45/45] common/cnxk: make internal roc functions static
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (43 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 44/45] net/idpf: make internal burst functions static Stephen Hemminger
@ 2026-11-29 20:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
45 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-29 20:49 UTC (permalink / raw)
To: dev
Cc: Stephen Hemminger, Nithin Dabilpuram, Kiran Kumar K,
Sunil Kumar Kori, Satha Rao, Harman Kalra, Srikanth Yalavarthi
23 roc functions are used only in the file that defines them. Make
them static and drop their declarations from the roc headers.
Nine of them are called before their definition, so they get a
forward declaration after the includes.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/cnxk/cnxk_security.c | 6 +++---
drivers/common/cnxk/cnxk_security.h | 11 -----------
drivers/common/cnxk/roc_bphy_irq.c | 2 +-
drivers/common/cnxk/roc_bphy_irq.h | 2 --
drivers/common/cnxk/roc_ml.c | 15 ++++++++++-----
drivers/common/cnxk/roc_ml.h | 5 -----
drivers/common/cnxk/roc_nix.c | 4 +++-
drivers/common/cnxk/roc_nix.h | 13 -------------
drivers/common/cnxk/roc_nix_fc.c | 11 +++++++----
drivers/common/cnxk/roc_nix_inl.c | 2 +-
drivers/common/cnxk/roc_nix_inl.h | 2 --
drivers/common/cnxk/roc_nix_ops.c | 2 +-
| 2 +-
drivers/common/cnxk/roc_nix_tm_ops.c | 2 +-
drivers/common/cnxk/roc_npa.c | 8 ++++++--
drivers/common/cnxk/roc_npa.h | 3 ---
drivers/common/cnxk/roc_npc.c | 2 +-
drivers/common/cnxk/roc_npc.h | 2 --
drivers/common/cnxk/roc_ree.c | 6 ++++--
drivers/common/cnxk/roc_ree.h | 4 ----
drivers/common/cnxk/roc_sso.c | 2 +-
drivers/common/cnxk/roc_sso.h | 1 -
22 files changed, 40 insertions(+), 67 deletions(-)
diff --git a/drivers/common/cnxk/cnxk_security.c b/drivers/common/cnxk/cnxk_security.c
index 4e160f2e74..54c5afca8b 100644
--- a/drivers/common/cnxk/cnxk_security.c
+++ b/drivers/common/cnxk/cnxk_security.c
@@ -596,7 +596,7 @@ cnxk_ot_ipsec_outb_sa_fill(struct roc_ot_ipsec_outb_sa *sa,
return 0;
}
-uint8_t
+static uint8_t
cnxk_ipsec_ivlen_get(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_auth_algorithm a_algo,
enum rte_crypto_aead_algorithm aead_algo)
@@ -632,7 +632,7 @@ cnxk_ipsec_ivlen_get(enum rte_crypto_cipher_algorithm c_algo,
return ivlen;
}
-uint8_t
+static uint8_t
cnxk_ipsec_icvlen_get(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_auth_algorithm a_algo,
enum rte_crypto_aead_algorithm aead_algo)
@@ -678,7 +678,7 @@ cnxk_ipsec_icvlen_get(enum rte_crypto_cipher_algorithm c_algo,
return icv;
}
-uint8_t
+static uint8_t
cnxk_ipsec_outb_roundup_byte(enum rte_crypto_cipher_algorithm c_algo,
enum rte_crypto_aead_algorithm aead_algo)
{
diff --git a/drivers/common/cnxk/cnxk_security.h b/drivers/common/cnxk/cnxk_security.h
index d44cd19e75..f1625bd94c 100644
--- a/drivers/common/cnxk/cnxk_security.h
+++ b/drivers/common/cnxk/cnxk_security.h
@@ -26,17 +26,6 @@ int __roc_api
cnxk_ipsec_outb_rlens_get(struct cnxk_ipsec_outb_rlens *rlens,
struct rte_security_ipsec_xform *ipsec_xfrm,
struct rte_crypto_sym_xform *crypto_xfrm);
-uint8_t
-cnxk_ipsec_ivlen_get(enum rte_crypto_cipher_algorithm c_algo,
- enum rte_crypto_auth_algorithm a_algo,
- enum rte_crypto_aead_algorithm aead_algo);
-uint8_t
-cnxk_ipsec_icvlen_get(enum rte_crypto_cipher_algorithm c_algo,
- enum rte_crypto_auth_algorithm a_algo,
- enum rte_crypto_aead_algorithm aead_algo);
-
-uint8_t cnxk_ipsec_outb_roundup_byte(enum rte_crypto_cipher_algorithm c_algo,
- enum rte_crypto_aead_algorithm aead_algo);
/* [CN10K] */
int __roc_api cnxk_ot_ipsec_inb_sa_fill(struct roc_ot_ipsec_inb_sa *sa,
diff --git a/drivers/common/cnxk/roc_bphy_irq.c b/drivers/common/cnxk/roc_bphy_irq.c
index 7b39b61537..771e576ce2 100644
--- a/drivers/common/cnxk/roc_bphy_irq.c
+++ b/drivers/common/cnxk/roc_bphy_irq.c
@@ -274,7 +274,7 @@ roc_bphy_irq_handler_set(struct roc_bphy_irq_chip *chip, int cpu, int irq_num,
return retval;
}
-bool
+static bool
roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip, int irq_num)
{
if (irq_num < 0 || (uint64_t)irq_num >= irq_chip->max_irq)
diff --git a/drivers/common/cnxk/roc_bphy_irq.h b/drivers/common/cnxk/roc_bphy_irq.h
index 6b18c01299..9d0247d3ca 100644
--- a/drivers/common/cnxk/roc_bphy_irq.h
+++ b/drivers/common/cnxk/roc_bphy_irq.h
@@ -33,8 +33,6 @@ struct roc_bphy_intr {
__roc_api struct roc_bphy_irq_chip *roc_bphy_intr_init(void);
__roc_api void roc_bphy_intr_fini(struct roc_bphy_irq_chip *irq_chip);
__roc_api void roc_bphy_intr_handler(unsigned int irq_num);
-bool roc_bphy_intr_available(struct roc_bphy_irq_chip *irq_chip,
- int irq_num);
__roc_api int roc_bphy_intr_clear(struct roc_bphy_irq_chip *chip, int irq_num);
__roc_api uint64_t roc_bphy_intr_max_get(struct roc_bphy_irq_chip *irq_chip);
__roc_api int roc_bphy_intr_register(struct roc_bphy_irq_chip *irq_chip,
diff --git a/drivers/common/cnxk/roc_ml.c b/drivers/common/cnxk/roc_ml.c
index 6f9869125a..9e0bedde95 100644
--- a/drivers/common/cnxk/roc_ml.c
+++ b/drivers/common/cnxk/roc_ml.c
@@ -5,6 +5,11 @@
#include "roc_api.h"
#include "roc_priv.h"
+static void roc_ml_clk_force_on(struct roc_ml *roc_ml);
+static void roc_ml_clk_force_off(struct roc_ml *roc_ml);
+static void roc_ml_dma_stall_on(struct roc_ml *roc_ml);
+static void roc_ml_dma_stall_off(struct roc_ml *roc_ml);
+
#define TIME_SEC_IN_MS 1000
static int
@@ -94,7 +99,7 @@ roc_ml_addr_mlip2ap(struct roc_ml *roc_ml, void *addr)
return PLT_PTR_ADD(addr, ml_mlr_base - ML_AXI_START_ADDR);
}
-bool
+static bool
roc_ml_scratch_is_valid_bit_set(struct roc_ml *roc_ml)
{
union ml_scratch_fw_ctrl_s reg_fw_ctrl;
@@ -225,7 +230,7 @@ roc_ml_jcmdq_enqueue_sl(struct roc_ml *roc_ml, struct ml_job_cmd_s *job_cmd)
return ret;
}
-void
+static void
roc_ml_clk_force_on(struct roc_ml *roc_ml)
{
uint64_t reg_val = 0;
@@ -235,7 +240,7 @@ roc_ml_clk_force_on(struct roc_ml *roc_ml)
roc_ml_reg_write64(roc_ml, reg_val, ML_CFG);
}
-void
+static void
roc_ml_clk_force_off(struct roc_ml *roc_ml)
{
uint64_t reg_val = 0;
@@ -247,7 +252,7 @@ roc_ml_clk_force_off(struct roc_ml *roc_ml)
roc_ml_reg_write64(roc_ml, reg_val, ML_CFG);
}
-void
+static void
roc_ml_dma_stall_on(struct roc_ml *roc_ml)
{
uint64_t reg_val = 0;
@@ -257,7 +262,7 @@ roc_ml_dma_stall_on(struct roc_ml *roc_ml)
roc_ml_reg_write64(roc_ml, reg_val, ML_JOB_MGR_CTRL);
}
-void
+static void
roc_ml_dma_stall_off(struct roc_ml *roc_ml)
{
uint64_t reg_val = 0;
diff --git a/drivers/common/cnxk/roc_ml.h b/drivers/common/cnxk/roc_ml.h
index 43cb7e9c3a..892396e11d 100644
--- a/drivers/common/cnxk/roc_ml.h
+++ b/drivers/common/cnxk/roc_ml.h
@@ -121,7 +121,6 @@ void *__roc_api roc_ml_addr_ap2mlip(struct roc_ml *roc_ml, void *addr);
void *__roc_api roc_ml_addr_mlip2ap(struct roc_ml *roc_ml, void *addr);
/* Scratch and JCMDQ functions */
-bool roc_ml_scratch_is_valid_bit_set(struct roc_ml *roc_ml);
bool __roc_api roc_ml_scratch_is_done_bit_set(struct roc_ml *roc_ml);
bool __roc_api roc_ml_scratch_enqueue(struct roc_ml *roc_ml, void *work_ptr);
bool __roc_api roc_ml_scratch_dequeue(struct roc_ml *roc_ml, void *work_ptr);
@@ -130,10 +129,6 @@ bool __roc_api roc_ml_jcmdq_enqueue_lf(struct roc_ml *roc_ml, struct ml_job_cmd_
bool __roc_api roc_ml_jcmdq_enqueue_sl(struct roc_ml *roc_ml, struct ml_job_cmd_s *job_cmd);
/* Device management functions */
-void roc_ml_clk_force_on(struct roc_ml *roc_ml);
-void roc_ml_clk_force_off(struct roc_ml *roc_ml);
-void roc_ml_dma_stall_on(struct roc_ml *roc_ml);
-void roc_ml_dma_stall_off(struct roc_ml *roc_ml);
bool __roc_api roc_ml_mlip_is_enabled(struct roc_ml *roc_ml);
int __roc_api roc_ml_mlip_reset(struct roc_ml *roc_ml, bool force);
diff --git a/drivers/common/cnxk/roc_nix.c b/drivers/common/cnxk/roc_nix.c
index ce957d061f..9cb112a6d0 100644
--- a/drivers/common/cnxk/roc_nix.c
+++ b/drivers/common/cnxk/roc_nix.c
@@ -6,6 +6,8 @@
#include "roc_nix_flow_vec.h"
#include "roc_priv.h"
+static int roc_nix_af_rx_flow_vec_ctrl_set(struct roc_nix *roc_nix);
+
bool
roc_nix_is_lbk(struct roc_nix *roc_nix)
{
@@ -619,7 +621,7 @@ nix_af_rx_flow_vec_ctrl_set(struct mbox *mbox)
return rc;
}
-int
+static int
roc_nix_af_rx_flow_vec_ctrl_set(struct roc_nix *roc_nix)
{
struct nix *nix = roc_nix_to_nix_priv(roc_nix);
diff --git a/drivers/common/cnxk/roc_nix.h b/drivers/common/cnxk/roc_nix.h
index f3729f5e77..bcec15dd82 100644
--- a/drivers/common/cnxk/roc_nix.h
+++ b/drivers/common/cnxk/roc_nix.h
@@ -853,7 +853,6 @@ int __roc_api roc_nix_tm_hierarchy_disable(struct roc_nix *roc_nix);
int __roc_api roc_nix_tm_hierarchy_enable(struct roc_nix *roc_nix,
enum roc_nix_tm_tree tree,
bool xmit_enable);
-int roc_nix_tm_hierarchy_xmit_enable(struct roc_nix *roc_nix, enum roc_nix_tm_tree tree);
/*
@@ -963,8 +962,6 @@ int __roc_api roc_nix_switch_hdr_set(struct roc_nix *roc_nix, uint64_t switch_he
int __roc_api roc_nix_lso_fmt_setup(struct roc_nix *roc_nix);
int __roc_api roc_nix_lso_fmt_get(struct roc_nix *roc_nix, uint8_t udp_tun[ROC_NIX_LSO_TUN_MAX],
uint8_t tun[ROC_NIX_LSO_TUN_MAX]);
-int roc_nix_lso_alt_flags_profile_setup(struct roc_nix *roc_nix,
- nix_lso_alt_flg_format_t *fmt);
int __roc_api roc_nix_eeprom_info_get(struct roc_nix *roc_nix,
struct roc_nix_eeprom_info *info);
@@ -987,12 +984,6 @@ void roc_nix_fc_npa_bp_cfg(struct roc_nix *roc_nix, uint64_t pool_id, uint8_t en
uint8_t force, uint8_t tc, uint64_t drop_percent);
int roc_nix_bpids_alloc(struct roc_nix *roc_nix, uint8_t type,
uint8_t bp_cnt, uint16_t *bpids);
-int roc_nix_rx_chan_cfg_get(struct roc_nix *roc_nix, uint16_t chan,
- bool is_cpt, uint64_t *cfg);
-int roc_nix_rx_chan_cfg_set(struct roc_nix *roc_nix, uint16_t chan,
- bool is_cpt, uint64_t val);
-int roc_nix_chan_bpid_set(struct roc_nix *roc_nix, uint16_t chan,
- uint64_t bpid, int ena, bool cpt_chan);
/* NPC */
int __roc_api roc_nix_npc_promisc_ena_dis(struct roc_nix *roc_nix, int enable);
@@ -1006,11 +997,7 @@ int __roc_api roc_nix_npc_rx_ena_dis(struct roc_nix *roc_nix, bool enable);
int __roc_api roc_nix_npc_mcast_config(struct roc_nix *roc_nix,
bool mcast_enable, bool prom_enable);
-int roc_nix_af_rx_flow_vec_ctrl_set(struct roc_nix *roc_nix);
-
/* RSS */
-void roc_nix_rss_key_default_fill(struct roc_nix *roc_nix,
- uint8_t key[ROC_NIX_RSS_KEY_LEN]);
void __roc_api roc_nix_rss_key_set(struct roc_nix *roc_nix,
const uint8_t key[ROC_NIX_RSS_KEY_LEN]);
void __roc_api roc_nix_rss_key_get(struct roc_nix *roc_nix,
diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c
index 8c78ff9733..f8efcc2639 100644
--- a/drivers/common/cnxk/roc_nix_fc.c
+++ b/drivers/common/cnxk/roc_nix_fc.c
@@ -5,6 +5,9 @@
#include "roc_api.h"
#include "roc_priv.h"
+static int roc_nix_chan_bpid_set(struct roc_nix *roc_nix, uint16_t chan, uint64_t bpid,
+ int ena, bool cpt_chan);
+
static int
nix_fc_rxchan_bpid_set(struct roc_nix *roc_nix, bool enable)
{
@@ -617,7 +620,7 @@ roc_nix_bpids_alloc(struct roc_nix *roc_nix, uint8_t type, uint8_t bp_cnt, uint1
return nix_bpids_alloc(&nix->dev, type, bp_cnt, bpids);
}
-int
+static int
roc_nix_rx_chan_cfg_get(struct roc_nix *roc_nix, uint16_t chan, bool is_cpt, uint64_t *cfg)
{
struct nix *nix = roc_nix_to_nix_priv(roc_nix);
@@ -643,7 +646,7 @@ roc_nix_rx_chan_cfg_get(struct roc_nix *roc_nix, uint16_t chan, bool is_cpt, uin
return rc;
}
-int
+static int
roc_nix_rx_chan_cfg_set(struct roc_nix *roc_nix, uint16_t chan, bool is_cpt, uint64_t val)
{
struct nix *nix = roc_nix_to_nix_priv(roc_nix);
@@ -674,10 +677,10 @@ roc_nix_rx_chan_cfg_set(struct roc_nix *roc_nix, uint16_t chan, bool is_cpt, uin
#define NIX_BPID2_OFF 32
#define NIX_BPID3_OFF 44
-int
+static int
roc_nix_chan_bpid_set(struct roc_nix *roc_nix, uint16_t chan, uint64_t bpid, int ena, bool cpt_chan)
{
- uint64_t cfg;
+ uint64_t cfg = 0;
int rc;
if (!roc_feature_nix_has_rxchan_multi_bpid())
diff --git a/drivers/common/cnxk/roc_nix_inl.c b/drivers/common/cnxk/roc_nix_inl.c
index 53d749080c..6e4d661997 100644
--- a/drivers/common/cnxk/roc_nix_inl.c
+++ b/drivers/common/cnxk/roc_nix_inl.c
@@ -1197,7 +1197,7 @@ roc_nix_inl_inb_spi_range(struct roc_nix *roc_nix, bool inb_inl_dev,
return mask;
}
-uint32_t
+static uint32_t
roc_nix_inl_inb_sa_sz(struct roc_nix *roc_nix, bool inl_dev_sa)
{
struct idev_cfg *idev = idev_get_cfg();
diff --git a/drivers/common/cnxk/roc_nix_inl.h b/drivers/common/cnxk/roc_nix_inl.h
index b9aee487c9..90b86bb172 100644
--- a/drivers/common/cnxk/roc_nix_inl.h
+++ b/drivers/common/cnxk/roc_nix_inl.h
@@ -173,8 +173,6 @@ bool __roc_api roc_nix_inl_inb_rx_inject_enable(struct roc_nix *roc_nix, bool in
uint32_t __roc_api roc_nix_inl_inb_spi_range(struct roc_nix *roc_nix,
bool inl_dev_sa, uint32_t *min,
uint32_t *max);
-uint32_t roc_nix_inl_inb_sa_sz(struct roc_nix *roc_nix,
- bool inl_dev_sa);
uintptr_t __roc_api roc_nix_inl_inb_sa_get(struct roc_nix *roc_nix,
bool inl_dev_sa, uint32_t spi);
void __roc_api roc_nix_inb_mode_set(struct roc_nix *roc_nix, bool use_inl_dev);
diff --git a/drivers/common/cnxk/roc_nix_ops.c b/drivers/common/cnxk/roc_nix_ops.c
index 9ec7c09084..e7211d7288 100644
--- a/drivers/common/cnxk/roc_nix_ops.c
+++ b/drivers/common/cnxk/roc_nix_ops.c
@@ -161,7 +161,7 @@ nix_lso_tun_tcp(struct nix_lso_format_cfg *req, bool outer_v4, bool inner_v4)
field++;
}
-int
+static int
roc_nix_lso_alt_flags_profile_setup(struct roc_nix *roc_nix, nix_lso_alt_flg_format_t *fmt)
{
struct nix *nix = roc_nix_to_nix_priv(roc_nix);
--git a/drivers/common/cnxk/roc_nix_rss.c b/drivers/common/cnxk/roc_nix_rss.c
index ac5df654ff..3b7a8d42da 100644
--- a/drivers/common/cnxk/roc_nix_rss.c
+++ b/drivers/common/cnxk/roc_nix_rss.c
@@ -5,7 +5,7 @@
#include "roc_api.h"
#include "roc_priv.h"
-void
+static void
roc_nix_rss_key_default_fill(struct roc_nix *roc_nix,
uint8_t key[ROC_NIX_RSS_KEY_LEN])
{
diff --git a/drivers/common/cnxk/roc_nix_tm_ops.c b/drivers/common/cnxk/roc_nix_tm_ops.c
index 406234b5c7..128a5c7f15 100644
--- a/drivers/common/cnxk/roc_nix_tm_ops.c
+++ b/drivers/common/cnxk/roc_nix_tm_ops.c
@@ -434,7 +434,7 @@ roc_nix_tm_hierarchy_disable(struct roc_nix *roc_nix)
return rc;
}
-int
+static int
roc_nix_tm_hierarchy_xmit_enable(struct roc_nix *roc_nix, enum roc_nix_tm_tree tree)
{
struct nix *nix = roc_nix_to_nix_priv(roc_nix);
diff --git a/drivers/common/cnxk/roc_npa.c b/drivers/common/cnxk/roc_npa.c
index 107fce8b61..de63d8ef06 100644
--- a/drivers/common/cnxk/roc_npa.c
+++ b/drivers/common/cnxk/roc_npa.c
@@ -5,6 +5,10 @@
#include "roc_api.h"
#include "roc_priv.h"
+static void roc_npa_dev_unlock(void);
+
+static void roc_npa_dev_lock(void);
+
static roc_npa_lf_init_cb_t lf_init_cb;
int
@@ -1733,7 +1737,7 @@ roc_npa_dev_fini(struct roc_npa *roc_npa)
return dev_fini(&npa->dev, npa->pci_dev);
}
-void
+static void
roc_npa_dev_lock(void)
{
struct idev_cfg *idev = idev_get_cfg();
@@ -1742,7 +1746,7 @@ roc_npa_dev_lock(void)
plt_spinlock_lock(&idev->npa_dev_lock);
}
-void
+static void
roc_npa_dev_unlock(void)
{
struct idev_cfg *idev = idev_get_cfg();
diff --git a/drivers/common/cnxk/roc_npa.h b/drivers/common/cnxk/roc_npa.h
index c715348e65..2fa828c803 100644
--- a/drivers/common/cnxk/roc_npa.h
+++ b/drivers/common/cnxk/roc_npa.h
@@ -900,7 +900,4 @@ int roc_npa_ctx_dump(void);
int roc_npa_aura_drop_set(uint64_t aura_handle, uint64_t limit,
bool ena);
-void roc_npa_dev_lock(void);
-void roc_npa_dev_unlock(void);
-
#endif /* _ROC_NPA_H_ */
diff --git a/drivers/common/cnxk/roc_npc.c b/drivers/common/cnxk/roc_npc.c
index aecea84ee1..de73e0b47b 100644
--- a/drivers/common/cnxk/roc_npc.c
+++ b/drivers/common/cnxk/roc_npc.c
@@ -1577,7 +1577,7 @@ npc_inline_dev_ipsec_action_free(struct npc *npc, struct roc_npc_flow *flow)
return 1;
}
-void
+static void
roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base, uint16_t *chan_mask)
{
struct roc_nix *roc_nix = roc_npc->roc_nix;
diff --git a/drivers/common/cnxk/roc_npc.h b/drivers/common/cnxk/roc_npc.h
index 8481cca824..1f602d458a 100644
--- a/drivers/common/cnxk/roc_npc.h
+++ b/drivers/common/cnxk/roc_npc.h
@@ -497,8 +497,6 @@ int __roc_api roc_npc_mcam_merge_base_steering_rule(struct roc_npc *roc_npc,
int __roc_api roc_npc_mcam_default_rule_action_get(struct roc_npc *roc_npc, uint64_t *action);
int __roc_api roc_npc_mcam_move(struct roc_npc *roc_npc, uint16_t old_ent, uint16_t new_ent);
void *__roc_api roc_npc_aged_flow_ctx_get(struct roc_npc *roc_npc, uint32_t mcam_id);
-void roc_npc_sdp_channel_get(struct roc_npc *roc_npc, uint16_t *chan_base,
- uint16_t *chan_mask);
int __roc_api roc_npc_mcam_get_stats(struct roc_npc *roc_npc, struct roc_npc_flow *flow,
uint64_t *count);
int __roc_api roc_npc_skip_size_pkind_get(struct roc_npc *roc_npc);
diff --git a/drivers/common/cnxk/roc_ree.c b/drivers/common/cnxk/roc_ree.c
index 447b52d0fa..19799118ec 100644
--- a/drivers/common/cnxk/roc_ree.c
+++ b/drivers/common/cnxk/roc_ree.c
@@ -5,6 +5,8 @@
#include "roc_api.h"
#include "roc_priv.h"
+static int roc_ree_af_reg_read(struct roc_ree_vf *vf, uint64_t reg, uint64_t *val);
+
#define REE0_PF 19
#define REE1_PF 20
@@ -135,7 +137,7 @@ ree_send_mbox_msg(struct roc_ree_vf *vf)
return 0;
}
-int
+static int
roc_ree_config_lf(struct roc_ree_vf *vf, uint8_t lf, uint8_t pri, uint32_t size)
{
struct ree_lf_req_msg *req;
@@ -162,7 +164,7 @@ roc_ree_config_lf(struct roc_ree_vf *vf, uint8_t lf, uint8_t pri, uint32_t size)
return 0;
}
-int
+static int
roc_ree_af_reg_read(struct roc_ree_vf *vf, uint64_t reg, uint64_t *val)
{
struct ree_rd_wr_reg_msg *msg;
diff --git a/drivers/common/cnxk/roc_ree.h b/drivers/common/cnxk/roc_ree.h
index 5afe7da8b4..98c85463c7 100644
--- a/drivers/common/cnxk/roc_ree.h
+++ b/drivers/common/cnxk/roc_ree.h
@@ -111,10 +111,6 @@ int __roc_api roc_ree_dev_fini(struct roc_ree_vf *vf);
int __roc_api roc_ree_queues_attach(struct roc_ree_vf *vf, uint8_t nb_queues);
int __roc_api roc_ree_queues_detach(struct roc_ree_vf *vf);
int __roc_api roc_ree_msix_offsets_get(struct roc_ree_vf *vf);
-int roc_ree_config_lf(struct roc_ree_vf *vf, uint8_t lf, uint8_t pri,
- uint32_t size);
-int roc_ree_af_reg_read(struct roc_ree_vf *vf, uint64_t reg,
- uint64_t *val);
int __roc_api roc_ree_rule_db_get(struct roc_ree_vf *vf, char *rule_db,
uint32_t rule_db_len, char *rule_dbi,
uint32_t rule_dbi_len);
diff --git a/drivers/common/cnxk/roc_sso.c b/drivers/common/cnxk/roc_sso.c
index 98accfc399..2ec76a7585 100644
--- a/drivers/common/cnxk/roc_sso.c
+++ b/drivers/common/cnxk/roc_sso.c
@@ -638,7 +638,7 @@ roc_sso_hwgrp_agq_free(struct roc_sso *roc_sso, uint16_t hwgrp, uint32_t agq_id)
sso_agq_op_wait(roc_sso, hwgrp);
}
-void
+static void
roc_sso_hwgrp_agq_release(struct roc_sso *roc_sso, uint16_t hwgrp)
{
struct sso *sso = roc_sso_to_sso_priv(roc_sso);
diff --git a/drivers/common/cnxk/roc_sso.h b/drivers/common/cnxk/roc_sso.h
index da16cc1efb..df7c441228 100644
--- a/drivers/common/cnxk/roc_sso.h
+++ b/drivers/common/cnxk/roc_sso.h
@@ -110,7 +110,6 @@ void __roc_api roc_sso_hws_gwc_invalidate(struct roc_sso *roc_sso, uint8_t *hws,
int __roc_api roc_sso_hwgrp_agq_alloc(struct roc_sso *roc_sso, uint16_t hwgrp,
struct roc_sso_agq_data *data, uint32_t *agq_id);
void __roc_api roc_sso_hwgrp_agq_free(struct roc_sso *roc_sso, uint16_t hwgrp, uint32_t agq_id);
-void roc_sso_hwgrp_agq_release(struct roc_sso *roc_sso, uint16_t hwgrp);
/* Utility function */
uint16_t __roc_api roc_sso_pf_func_get(void);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* Re: [PATCH 15/45] net/nfb: do not export MDIO speed capability helper
2026-11-29 20:49 ` [PATCH 15/45] net/nfb: do not export MDIO speed capability helper Stephen Hemminger
@ 2026-11-30 9:56 ` Martin Spinler
0 siblings, 0 replies; 90+ messages in thread
From: Martin Spinler @ 2026-11-30 9:56 UTC (permalink / raw)
To: Stephen Hemminger, dev
On Sun, 2026-11-29 at 12:49 -0800, Stephen Hemminger wrote:
> nfb_mdio_cl45_pma_get_speed_capa() is called from nfb_ethdev.c in the
> same driver, so it does not need to be an exported internal symbol.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Martin Spinler <spinler@cesnet.cz>
^ permalink raw reply [flat|nested] 90+ messages in thread
* RE: [PATCH 17/45] common/mlx5: do not export internal symbols used only in common code
2026-11-29 20:49 ` [PATCH 17/45] common/mlx5: do not export internal symbols used only in common code Stephen Hemminger
@ 2026-11-30 10:50 ` Dariusz Sosnowski
0 siblings, 0 replies; 90+ messages in thread
From: Dariusz Sosnowski @ 2026-11-30 10:50 UTC (permalink / raw)
To: Stephen Hemminger, dev@dpdk.org
Cc: Slava Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Sunday, November 29, 2026 9:49 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Dariusz Sosnowski
> <dsosnowski@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Bing
> Zhao <bingz@nvidia.com>; Ori Kam <orika@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>; Matan Azrad <matan@nvidia.com>
> Subject: [PATCH 17/45] common/mlx5: do not export internal symbols used
> only in common code
>
> These DevX commands, the multi-process request helpers, the list lookup and
> the malloc statistics dump are only used inside common/mlx5. The net,
> crypto, compress and regex mlx5 drivers use other entry points, which keep
> their exports.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
^ permalink raw reply [flat|nested] 90+ messages in thread
* RE: [PATCH 27/45] common/mlx5: remove unused internal functions
2026-11-29 20:49 ` [PATCH 27/45] common/mlx5: remove unused internal functions Stephen Hemminger
@ 2026-11-30 10:51 ` Dariusz Sosnowski
0 siblings, 0 replies; 90+ messages in thread
From: Dariusz Sosnowski @ 2026-11-30 10:51 UTC (permalink / raw)
To: Stephen Hemminger, dev@dpdk.org
Cc: Slava Ovsiienko, Bing Zhao, Ori Kam, Suanming Mou, Matan Azrad,
Anatoly Burakov
> -----Original Message-----
> From: Stephen Hemminger <stephen@networkplumber.org>
> Sent: Sunday, November 29, 2026 9:49 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger <stephen@networkplumber.org>; Dariusz Sosnowski
> <dsosnowski@nvidia.com>; Slava Ovsiienko <viacheslavo@nvidia.com>; Bing
> Zhao <bingz@nvidia.com>; Ori Kam <orika@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>; Matan Azrad <matan@nvidia.com>; Anatoly
> Burakov <anatoly.burakov@intel.com>
> Subject: [PATCH 27/45] common/mlx5: remove unused internal functions
>
> The IMPORT_KEK and CREDENTIAL object creation commands, the NIC
> register write command, the list lookup helper and the multi-process un-init
> functions have no caller. Remove them along with their declarations.
>
> mlx5_memory_stat_dump() is left alone; it is a debug helper meant to be
> called from a debugger.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
^ permalink raw reply [flat|nested] 90+ messages in thread
* [PATCH v2 00/38] enable unreachable code detection
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
` (44 preceding siblings ...)
2026-11-29 20:49 ` [PATCH 45/45] common/cnxk: make internal roc " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 01/38] net/mlx4: fix unreachable code warnings Stephen Hemminger
` (37 more replies)
45 siblings, 38 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Unreachable code is often a symptom of a real bug: a misplaced
return, an inverted condition, or a loop that can only run once.
DPDK does not build with -Wunreachable-code anywhere, so none of it
gets caught.
This series fixes everything clang reports with
-Wunreachable-code-aggressive and turns the check on for the whole
tree. Only clang implements it; GCC rejects the flag and documents
-Wunreachable-code as doing nothing.
It found four real bugs: only one event vector adapter per queue
was usable, a leftover debug abort() in the dpaa2 flow engine, the
dpaa2 traffic manager port state check stubbed out as "if (0)", and
eight dead error paths in the ipsec-secgw config parser.
The rest is dead statements and examples that could never run their
own cleanup, which now handle SIGINT and SIGTERM. Removing a
trailing return is not just tidying: a case that later forgets to
return becomes a compiler error rather than silently returning zero.
Eleven drivers keep an exemption for base code imported from
vendors, applied through base_cflags where the driver separates its
base sources so its own code is still checked.
Bugzilla ID: 2135
Bugzilla ID: 2139
Bugzilla ID: 2140
The patches for mlx4, mlx5 and ipsec-gw are rebased versions of
upstream patches in patchwork.
v2 - use correct ipsec patch
- add patch for building test on FreeBSD
Dariusz Sosnowski (2):
net/mlx4: fix unreachable code warnings
net/mlx5: fix unreachable code warnings
Radu Nicolau (1):
examples/ipsec-secgw: remove dead code
Stephen Hemminger (35):
eventdev: fix vector adapter instance allocation
test/eal: skip filesystem test on FreeBSD
eal: silence unreachable code in version string
net/dpaa2: remove debug abort in flow destroy
app/testpmd: fix unreachable VF traffic error message
examples/eventdev_pipeline: remove dead continue
examples/skeleton: handle SIGINT and SIGTERM
examples/rxtx_callbacks: handle SIGINT and SIGTERM
examples/service_cores: handle SIGINT and SIGTERM
examples/timer: handle SIGINT and SIGTERM
examples/multi_process: handle SIGINT and SIGTERM in client
examples/server_node_efd: handle SIGINT and SIGTERM in node
examples/pipeline: handle SIGINT and SIGTERM
ethdev: fix unreachable warnings from switch declarations
config: add per-directory option for -Wunreachable-code
bus/dpaa: exempt this driver from unreachable code detection
net/qede: disable unreachable code checks
net/txgbe: disable unreachable code checks
net/ixgbe: disable unreachable code check
net/ngbe: disable unreachable code check
net/octeontx: replace unreachable code
common/sfc_efx: disable unreachable code check for base code
net/dpaa2: check port state before changing TM hierarchy
net/e1000: disable unreachable code check for base code
net/ice: disable unreachable code check for base code
raw/ifpga: disable unreachable code check for base code
net/bnxt: disable unreachable code check
net/ntnic: disable unreachable code check
lib: mark never returning thread functions
lib: remove unreachable statements
app: remove unreachable statements
examples: remove unreachable statements
drivers: remove unreachable statements
efd: mark configuration dependent vector selection
config: enable unreachable code detection
app/dumpcap/main.c | 1 -
app/pdump/main.c | 1 -
.../comp_perf_options_parse.c | 1 -
app/test-crypto-perf/cperf_ops.c | 1 -
app/test-crypto-perf/cperf_options_parsing.c | 1 -
app/test-flow-perf/main.c | 1 -
app/test-gpudev/main.c | 1 -
app/test-pmd/config.c | 4 +-
app/test-pmd/parameters.c | 2 -
app/test-regex/main.c | 2 -
app/test-security-perf/test_security_perf.c | 1 -
app/test/test_cryptodev.c | 9 ---
app/test/test_cryptodev_crosscheck.c | 6 --
app/test/test_eal_flags.c | 1 -
app/test/test_eal_fs.c | 12 ++--
app/test/test_event_vector_adapter.c | 19 +++--
config/meson.build | 9 +++
drivers/bus/dpaa/meson.build | 3 +
drivers/common/cnxk/roc_nix_fc.c | 2 -
drivers/common/mlx5/linux/mlx5_nl.c | 1 -
drivers/common/sfc_efx/base/meson.build | 1 +
drivers/crypto/caam_jr/caam_jr.c | 1 -
drivers/crypto/openssl/rte_openssl_pmd.c | 1 -
drivers/dma/dpaa/dpaa_qdma.c | 2 -
drivers/event/dsw/dsw_xstats.c | 1 -
drivers/ml/cnxk/cnxk_ml_ops.c | 10 ---
drivers/net/bnx2x/bnx2x.c | 2 -
drivers/net/bnxt/meson.build | 3 +
drivers/net/cnxk/cnxk_ethdev_mtr.c | 3 -
drivers/net/dpaa2/dpaa2_flow.c | 1 -
drivers/net/dpaa2/dpaa2_tm.c | 6 +-
drivers/net/intel/e1000/meson.build | 3 +
drivers/net/intel/ice/meson.build | 3 +
drivers/net/intel/ipn3ke/ipn3ke_representor.c | 3 -
drivers/net/intel/ipn3ke/ipn3ke_tm.c | 1 -
drivers/net/intel/ixgbe/meson.build | 3 +
drivers/net/mlx4/mlx4_flow.c | 14 ++--
drivers/net/mlx5/linux/mlx5_mp_os.c | 1 -
drivers/net/mlx5/mlx5_flow_dv.c | 1 -
drivers/net/mlx5/mlx5_flow_flex.c | 1 -
drivers/net/mlx5/mlx5_flow_hw.c | 18 +++--
drivers/net/mlx5/mlx5_flow_verbs.c | 16 ++---
drivers/net/ngbe/base/meson.build | 3 +
drivers/net/ntnic/meson.build | 3 +
drivers/net/octeontx/base/octeontx_pkovf.c | 9 ++-
drivers/net/qede/base/meson.build | 3 +
drivers/net/qede/meson.build | 2 +-
drivers/net/sfc/sfc_mae.c | 2 -
drivers/net/txgbe/base/meson.build | 3 +
drivers/net/txgbe/meson.build | 1 +
drivers/raw/ifpga/base/meson.build | 1 +
drivers/vdpa/ifc/ifcvf_vdpa.c | 4 --
drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 1 -
drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 -
drivers/vdpa/nfp/nfp_vdpa.c | 5 --
examples/bond/main.c | 1 -
examples/eventdev_pipeline/main.c | 4 +-
examples/ipsec-secgw/parser.c | 40 +++--------
examples/l2fwd-jobstats/main.c | 2 -
examples/l3fwd/main.c | 4 --
.../client_server_mp/mp_client/client.c | 20 +++++-
examples/ntb/ntb_fwd.c | 1 -
examples/pipeline/main.c | 21 +++++-
examples/pipeline/thread.c | 2 +-
examples/pipeline/thread.h | 6 ++
examples/rxtx_callbacks/main.c | 19 ++++-
examples/server_node_efd/efd_node/node.c | 20 +++++-
examples/service_cores/main.c | 23 +++++-
examples/skeleton/basicfwd.c | 18 ++++-
examples/timer/main.c | 23 +++++-
examples/vhost/main.c | 4 +-
lib/cmdline/cmdline_parse_num.c | 2 -
lib/eal/common/rte_version.c | 7 +-
lib/efd/rte_efd.c | 10 +--
lib/ethdev/rte_flow.c | 71 +++++++++----------
lib/eventdev/rte_event_eth_rx_adapter.c | 4 +-
lib/eventdev/rte_event_vector_adapter.c | 5 +-
lib/fib/rte_fib.c | 1 -
lib/fib/rte_fib6.c | 1 -
lib/sched/rte_sched.c | 1 -
lib/vhost/socket.c | 4 +-
lib/vhost/vhost_crypto.c | 1 -
82 files changed, 282 insertions(+), 245 deletions(-)
--
2.53.0
^ permalink raw reply [flat|nested] 90+ messages in thread
* [PATCH v2 01/38] net/mlx4: fix unreachable code warnings
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 02/38] net/mlx5: " Stephen Hemminger
` (36 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Dariusz Sosnowski, stable, Stephen Hemminger
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Building with clang and -Wunreachable-code generates warnings
on variable declarations inside switch block in mlx4_flow_prepare().
Move them up to silence the warnings.
Bugzilla ID: 2139
Fixes: 267d07dacdeb ("net/mlx4: tidy up flow rule handling code")
Fixes: 078b8b452e6b ("net/mlx4: add RSS flow rule action support")
Fixes: ac8d22de2394 ("ethdev: flatten RSS configuration in flow API")
Fixes: ef134c8daa08 ("net/mlx4: fix ignored RSS hash types")
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Suggested-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx4/mlx4_flow.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c
index b520664d95..f812884c34 100644
--- a/drivers/net/mlx4/mlx4_flow.c
+++ b/drivers/net/mlx4/mlx4_flow.c
@@ -747,6 +747,13 @@ mlx4_flow_prepare(struct mlx4_priv *priv,
}
/* Go over actions list. */
for (action = actions; action->type; ++action) {
+ const struct rte_flow_action_queue *queue;
+ const struct rte_flow_action_rss *rss;
+ const uint8_t *rss_key;
+ uint32_t rss_key_len;
+ uint64_t fields;
+ unsigned int i;
+
/* This one may appear anywhere multiple times. */
if (action->type == RTE_FLOW_ACTION_TYPE_VOID)
continue;
@@ -758,13 +765,6 @@ mlx4_flow_prepare(struct mlx4_priv *priv,
}
overlap = 1;
switch (action->type) {
- const struct rte_flow_action_queue *queue;
- const struct rte_flow_action_rss *rss;
- const uint8_t *rss_key;
- uint32_t rss_key_len;
- uint64_t fields;
- unsigned int i;
-
case RTE_FLOW_ACTION_TYPE_DROP:
flow->drop = 1;
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 02/38] net/mlx5: fix unreachable code warnings
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 01/38] net/mlx4: fix unreachable code warnings Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 03/38] examples/ipsec-secgw: remove dead code Stephen Hemminger
` (35 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Dariusz Sosnowski, xuemingl, 14pwcse1224, stable,
Stephen Hemminger
From: Dariusz Sosnowski <dsosnowski@nvidia.com>
Building with clang and -Wunreachable-code produces warnings:
- In flow_verbs_discover_priorities()
- With recent rdma-core versions, a condition is skipped
because of goto statement under ifdefs for new version.
- In flow_hw_validate_rule_pattern() and
flow_hw_validate_rule_actions()
- On variable declarations inside switch at the beginning of
switch blocks.
This patch silences these warnings.
First issue is resolved by reorganizing ifdef guards
to remove the need for goto.
Second issue is resolved by moving variable declarations
out of the switch block.
Bugzilla ID: 2140
Fixes: 1d47e9335e2f ("net/mlx5: improve Verbs flow priority discovery")
Fixes: 57c7b94301ee ("net/mlx5: add async flow operation validation")
Fixes: 179e70fd7ad2 ("net/mlx5: fix connection tracking state item validation")
Cc: xuemingl@nvidia.com
Cc: 14pwcse1224@uetpeshawar.edu.pk
Cc: stable@dpdk.org
Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/mlx5_flow_hw.c | 17 ++++++++---------
drivers/net/mlx5/mlx5_flow_verbs.c | 16 +++++++---------
2 files changed, 15 insertions(+), 18 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 6e6bf07799..62482c911d 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -17351,6 +17351,11 @@ flow_hw_validate_rule_pattern(struct rte_eth_dev *dev,
pt_item++;
for (; pt_item->type != RTE_FLOW_ITEM_TYPE_END; pt_item++, items++) {
+ const struct rte_flow_item_ethdev *ethdev;
+ const struct rte_flow_item_tx_queue *tx_queue;
+ const struct rte_flow_item_conntrack *spec;
+ struct mlx5_txq_ctrl *txq;
+
if (pt_item->type != items->type)
return rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM,
items, "Item type does not match the template");
@@ -17375,11 +17380,6 @@ flow_hw_validate_rule_pattern(struct rte_eth_dev *dev,
items, "Item spec is required");
switch (items->type) {
- const struct rte_flow_item_ethdev *ethdev;
- const struct rte_flow_item_tx_queue *tx_queue;
- const struct rte_flow_item_conntrack *spec;
- struct mlx5_txq_ctrl *txq;
-
case RTE_FLOW_ITEM_TYPE_REPRESENTED_PORT:
ethdev = items->spec;
if (flow_hw_validate_target_port_id(dev, ethdev->port_id)) {
@@ -17486,7 +17486,10 @@ flow_hw_validate_rule_actions(struct rte_eth_dev *dev,
* Configuration of masked actions is ignored.
*/
LIST_FOREACH(act_data, &hw_acts->act_list, next) {
+ const struct rte_flow_action_modify_field *mf;
+ const struct rte_flow_action_ethdev *ethdev;
const struct rte_flow_action *user_action;
+ enum rte_flow_action_type expected_type;
user_action = &actions[act_data->action_src];
@@ -17507,10 +17510,6 @@ flow_hw_validate_rule_actions(struct rte_eth_dev *dev,
"Action requires configuration");
switch ((int)user_action->type) {
- enum rte_flow_action_type expected_type;
- const struct rte_flow_action_ethdev *ethdev;
- const struct rte_flow_action_modify_field *mf;
-
case RTE_FLOW_ACTION_TYPE_INDIRECT:
expected_type = act_data->indirect.expected_type;
if (!flow_hw_valid_indirect_action_type(user_action, expected_type))
diff --git a/drivers/net/mlx5/mlx5_flow_verbs.c b/drivers/net/mlx5/mlx5_flow_verbs.c
index eb576f73d4..f404d2c739 100644
--- a/drivers/net/mlx5/mlx5_flow_verbs.c
+++ b/drivers/net/mlx5/mlx5_flow_verbs.c
@@ -50,14 +50,15 @@ struct ibv_spec_header {
*/
static int
flow_verbs_discover_priorities(struct rte_eth_dev *dev,
- const uint16_t *vprio, int vprio_n)
+ const uint16_t *vprio __rte_unused,
+ int vprio_n __rte_unused)
{
struct mlx5_priv *priv = dev->data->dev_private;
struct {
struct ibv_flow_attr attr;
struct ibv_flow_spec_eth eth;
struct ibv_flow_spec_action_drop drop;
- } flow_attr = {
+ } __rte_unused flow_attr = {
.attr = {
.num_of_specs = 2,
.port = (uint8_t)priv->dev_port,
@@ -79,16 +80,15 @@ flow_verbs_discover_priorities(struct rte_eth_dev *dev,
.type = IBV_FLOW_SPEC_ACTION_DROP,
},
};
- struct ibv_flow *flow;
- struct mlx5_hrxq *drop = priv->drop_queue.hrxq;
- int i;
+ struct ibv_flow *flow __rte_unused;
+ struct mlx5_hrxq *drop __rte_unused = priv->drop_queue.hrxq;
+ int i __rte_unused;
int priority = 0;
#if defined(HAVE_MLX5DV_DR_DEVX_PORT) || defined(HAVE_MLX5DV_DR_DEVX_PORT_V35)
/* If DevX supported, driver must support 16 verbs flow priorities. */
priority = 16;
- goto out;
-#endif
+#else
if (!drop->qp) {
rte_errno = ENOTSUP;
return -rte_errno;
@@ -101,8 +101,6 @@ flow_verbs_discover_priorities(struct rte_eth_dev *dev,
claim_zero(mlx5_glue->destroy_flow(flow));
priority = vprio[i];
}
-#if defined(HAVE_MLX5DV_DR_DEVX_PORT) || defined(HAVE_MLX5DV_DR_DEVX_PORT_V35)
-out:
#endif
DRV_LOG(INFO, "port %u supported flow priorities:"
" 0-%d for ingress or egress root table,"
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 03/38] examples/ipsec-secgw: remove dead code
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 01/38] net/mlx4: fix unreachable code warnings Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 02/38] net/mlx5: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 04/38] eventdev: fix vector adapter instance allocation Stephen Hemminger
` (34 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Radu Nicolau, stable, stephen
From: Radu Nicolau <radu.nicolau@intel.com>
rte_panic() does not return, so the goto statements following it
in parse_cfg_file() and the error_exit cleanup block are unreachable.
Remove them.
Bugzilla ID: 2144
Fixes: 0d547ed03717 ("examples/ipsec-secgw: support configuration file")
Cc: stable@dpdk.org
Cc: stephen@networkplumber.org
Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
---
examples/ipsec-secgw/parser.c | 40 +++++++----------------------------
1 file changed, 8 insertions(+), 32 deletions(-)
diff --git a/examples/ipsec-secgw/parser.c b/examples/ipsec-secgw/parser.c
index 29c4d3cb3d..fda6384e5a 100644
--- a/examples/ipsec-secgw/parser.c
+++ b/examples/ipsec-secgw/parser.c
@@ -434,15 +434,11 @@ parse_cfg_file(const char *cfg_filename)
uint32_t line_num = 0;
struct parse_status status = {0};
- if (f == NULL) {
+ if (f == NULL)
rte_panic("Error: invalid file descriptor %s\n", cfg_filename);
- goto error_exit;
- }
- if (cl == NULL) {
+ if (cl == NULL)
rte_panic("Error: cannot create cmdline instance\n");
- goto error_exit;
- }
cfg_sp_add_rule.data = &status;
cfg_sa_add_rule.data = &status;
@@ -460,12 +456,10 @@ parse_cfg_file(const char *cfg_filename)
line_num++;
- if (strlen(oneline) > 1022) {
+ if (strlen(oneline) > 1022)
rte_panic("%s:%u: error: "
"the line contains more characters the parser can handle\n",
cfg_filename, line_num);
- goto error_exit;
- }
/* process comment char '#' */
if (oneline[0] == '#')
@@ -478,47 +472,37 @@ parse_cfg_file(const char *cfg_filename)
/* process line concatenator '\' */
pos = strchr(oneline, 92);
if (pos != NULL) {
- if (pos != oneline+strlen(oneline) - 2) {
+ if (pos != oneline+strlen(oneline) - 2)
rte_panic("%s:%u: error: "
"no character should exist after '\\'\n",
cfg_filename, line_num);
- goto error_exit;
- }
*pos = '\0';
- if (strlen(oneline) + strlen(str) > 1022) {
+ if (strlen(oneline) + strlen(str) > 1022)
rte_panic("%s:%u: error: "
"the concatenated line contains more characters the parser can handle\n",
cfg_filename, line_num);
- goto error_exit;
- }
strcpy(str + strlen(str), oneline);
continue;
}
/* copy the line to str and process */
- if (strlen(oneline) + strlen(str) > 1022) {
+ if (strlen(oneline) + strlen(str) > 1022)
rte_panic("%s:%u: error: "
"the line contains more characters the parser can handle\n",
cfg_filename, line_num);
- goto error_exit;
- }
strcpy(str + strlen(str), oneline);
str[strlen(str)] = '\n';
- if (cmdline_parse(cl, str) < 0) {
+ if (cmdline_parse(cl, str) < 0)
rte_panic("%s:%u: error: parsing \"%s\" failed\n",
cfg_filename, line_num, str);
- goto error_exit;
- }
- if (status.status < 0) {
+ if (status.status < 0)
rte_panic("%s:%u: error: %s", cfg_filename,
line_num, status.parse_msg);
- goto error_exit;
- }
memset(str, 0, 1024);
} while (1);
@@ -531,12 +515,4 @@ parse_cfg_file(const char *cfg_filename)
sp6_sort_arr();
return 0;
-
-error_exit:
- if (cl)
- cmdline_stdin_exit(cl);
- if (f)
- fclose(f);
-
- return -1;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 04/38] eventdev: fix vector adapter instance allocation
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (2 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 03/38] examples/ipsec-secgw: remove dead code Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 05/38] test/eal: skip filesystem test on FreeBSD Stephen Hemminger
` (33 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, stable
Creating more than one vector adapter on an event queue always
failed with EEXIST, even though RTE_EVENT_VECTOR_ADAPTER_MAX_
INSTANCE_PER_QUEUE instances are allocated per queue.
The loop searching for a free instance returns NULL as soon as it
finds an instance in use, instead of continuing the search. Only
index zero is ever examined, so the loop increment is never
executed and clang reports it with
-Wunreachable-code-loop-increment.
Remove the early return so the loop scans all instances. The
existing check after the loop reports exhaustion, and now uses
ENOSPC which is the value documented for this case in the API.
Fixes: e12c3754da7a ("eventdev/vector: introduce event vector adapter")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/test_event_vector_adapter.c | 19 ++++++++++++++-----
lib/eventdev/rte_event_vector_adapter.c | 5 +----
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/app/test/test_event_vector_adapter.c b/app/test/test_event_vector_adapter.c
index c6d694421b..da58c478f0 100644
--- a/app/test/test_event_vector_adapter.c
+++ b/app/test/test_event_vector_adapter.c
@@ -5,6 +5,7 @@
#include <string.h>
#include <rte_common.h>
+#include <rte_errno.h>
#include <rte_malloc.h>
#include "test.h"
@@ -77,7 +78,7 @@ test_event_vector_adapter_create_multi(void)
[RTE_EVENT_VECTOR_ADAPTER_MAX_INSTANCE_PER_QUEUE];
struct rte_event_vector_adapter_conf conf;
struct rte_event_vector_adapter_info info;
- int ret, i, j;
+ int ret, i, j, nb;
memset(&conf, 0, sizeof(conf));
memset(&info, 0, sizeof(info));
@@ -100,22 +101,30 @@ test_event_vector_adapter_create_multi(void)
conf.ev.event_type = RTE_EVENT_TYPE_VECTOR | RTE_EVENT_TYPE_CPU;
conf.ev.sched_type = RTE_SCHED_TYPE_PARALLEL;
+ nb = RTE_MIN(info.max_vector_adapters_per_event_queue,
+ RTE_EVENT_VECTOR_ADAPTER_MAX_INSTANCE_PER_QUEUE);
+
for (i = 0; i < evdev_max_queues; i++) {
- for (j = 0; j < info.max_vector_adapters_per_event_queue; j++) {
- conf.ev.queue_id = j;
+ for (j = 0; j < nb; j++) {
+ conf.ev.queue_id = i;
adapter[i][j] = rte_event_vector_adapter_create(&conf);
TEST_ASSERT(adapter[i][j] != NULL, "Failed to create event vector adapter");
}
+ /* One more than the per queue limit must fail. */
+ if (nb == RTE_EVENT_VECTOR_ADAPTER_MAX_INSTANCE_PER_QUEUE)
+ TEST_ASSERT(rte_event_vector_adapter_create(&conf) == NULL &&
+ rte_errno == ENOSPC,
+ "Created more vector adapters than the queue supports");
}
for (i = 0; i < evdev_max_queues; i++)
- for (j = 0; j < info.max_vector_adapters_per_event_queue; j++)
+ for (j = 0; j < nb; j++)
TEST_ASSERT(adapter[i][j] == rte_event_vector_adapter_lookup(
adapter[i][j]->adapter_id),
"Failed to lookup event vector adapter");
for (i = 0; i < evdev_max_queues; i++)
- for (j = 0; j < info.max_vector_adapters_per_event_queue; j++)
+ for (j = 0; j < nb; j++)
rte_event_vector_adapter_destroy(adapter[i][j]);
rte_mempool_free(vector_mp);
diff --git a/lib/eventdev/rte_event_vector_adapter.c b/lib/eventdev/rte_event_vector_adapter.c
index 9a839517c8..a955227c48 100644
--- a/lib/eventdev/rte_event_vector_adapter.c
+++ b/lib/eventdev/rte_event_vector_adapter.c
@@ -193,14 +193,11 @@ rte_event_vector_adapter_create_ext(const struct rte_event_vector_adapter_conf *
adapter->used = true;
break;
}
- EVVEC_LOG_DBG("adapter %u is already in use", i);
- rte_errno = EEXIST;
- return NULL;
}
if (adapter == NULL) {
EVVEC_LOG_DBG("no available vector adapters");
- rte_errno = ENODEV;
+ rte_errno = ENOSPC;
return NULL;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 05/38] test/eal: skip filesystem test on FreeBSD
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (3 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 04/38] eventdev: fix vector adapter instance allocation Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-12-01 8:58 ` Bruce Richardson
2026-11-30 21:49 ` [PATCH v2 06/38] eal: silence unreachable code in version string Stephen Hemminger
` (32 subsequent siblings)
37 siblings, 1 reply; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The eal_fs test needs /proc/self/fd to find the name of the
temporary file it creates. FreeBSD does not have it, so the test
returned early from inside test_parse_sysfs_value(), which clang
reports as unreachable code for the rest of the function.
Worse, returning zero reported the test as passing when it had not
run at all.
Build the skip stub on FreeBSD as well as Windows and return
TEST_SKIPPED, which is what the rest of the file already does.
This also removes the unreachable body rather than hiding it.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test/test_eal_fs.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/app/test/test_eal_fs.c b/app/test/test_eal_fs.c
index 62eea98677..4201b7fc3f 100644
--- a/app/test/test_eal_fs.c
+++ b/app/test/test_eal_fs.c
@@ -10,11 +10,12 @@
#include "eal_filesystem.h"
-#ifdef RTE_EXEC_ENV_WINDOWS
+/* Both need /proc/self/fd to find the name of a temporary file. */
+#if defined(RTE_EXEC_ENV_WINDOWS) || defined(RTE_EXEC_ENV_FREEBSD)
static int
test_eal_fs(void)
{
- printf("eal_fs not supported on Windows, skipping test\n");
+ printf("eal_fs not supported on this platform, skipping test\n");
return TEST_SKIPPED;
}
@@ -31,11 +32,6 @@ test_parse_sysfs_value(void)
unsigned valid_number;
unsigned long retval = 0;
-#ifdef RTE_EXEC_ENV_FREEBSD
- /* BSD doesn't have /proc/pid/fd */
- return 0;
-#endif
-
printf("Testing function eal_parse_sysfs_value()\n");
/* get a temporary filename to use for all tests - create temp file handle and then
@@ -183,6 +179,6 @@ test_eal_fs(void)
return 0;
}
-#endif /* !RTE_EXEC_ENV_WINDOWS */
+#endif /* !RTE_EXEC_ENV_WINDOWS && !RTE_EXEC_ENV_FREEBSD */
REGISTER_FAST_TEST(eal_fs_autotest, NOHUGE_OK, ASAN_OK, test_eal_fs);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 06/38] eal: silence unreachable code in version string
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (4 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 05/38] test/eal: skip filesystem test on FreeBSD Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 07/38] net/dpaa2: remove debug abort in flow destroy Stephen Hemminger
` (31 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
rte_version() used "strlen(RTE_VER_SUFFIX) == 0" to detect an empty
suffix. Clang evaluates strlen of a constant string at compile time
and then reports the other branch as unreachable code.
Use sizeof instead, which clang treats as a configuration value and
does not warn about. Note that sizeof of a string literal includes
the NUL terminator, so the empty string is sizeof 1 rather than 0.
Also fix the indentation of the else.
Bugzilla ID: 2135
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eal/common/rte_version.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/lib/eal/common/rte_version.c b/lib/eal/common/rte_version.c
index 627b89d4a8..864d0cfdc5 100644
--- a/lib/eal/common/rte_version.c
+++ b/lib/eal/common/rte_version.c
@@ -36,14 +36,15 @@ rte_version(void)
static char version[32];
if (version[0] != 0)
return version;
- if (strlen(RTE_VER_SUFFIX) == 0)
+
+ if (sizeof(RTE_VER_SUFFIX) == 1) /* empty string */
snprintf(version, sizeof(version), "%s %d.%02d.%d",
RTE_VER_PREFIX,
RTE_VER_YEAR,
RTE_VER_MONTH,
RTE_VER_MINOR);
- else
- snprintf(version, sizeof(version), "%s %d.%02d.%d%s%d",
+ else
+ snprintf(version, sizeof(version), "%s %d.%02d.%d%s%d",
RTE_VER_PREFIX,
RTE_VER_YEAR,
RTE_VER_MONTH,
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 07/38] net/dpaa2: remove debug abort in flow destroy
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (5 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 06/38] eal: silence unreachable code in version string Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 08/38] app/testpmd: fix unreachable VF traffic error message Stephen Hemminger
` (30 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, stable
Removing a QoS entry when destroying a flow calls abort() on
failure, killing the application. Clang reports the following
"goto error" as unreachable.
The abort() looks like leftover debug code: it is the only one in
the driver, and the identical RSS case below reports the same
failure through the error path instead.
Remove it so the failure is reported to the caller with
rte_flow_error_set() like every other error in this function.
Fixes: 56c1817d532e ("net/dpaa2: refactor flow engine")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/dpaa2/dpaa2_flow.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/dpaa2/dpaa2_flow.c b/drivers/net/dpaa2/dpaa2_flow.c
index 979ab4cae0..cf2d66ed26 100644
--- a/drivers/net/dpaa2/dpaa2_flow.c
+++ b/drivers/net/dpaa2/dpaa2_flow.c
@@ -5398,7 +5398,6 @@ dpaa2_flow_destroy(struct rte_eth_dev *dev, struct rte_flow *_flow,
DPAA2_PMD_ERR("Remove FS QoS entry failed");
dpaa2_flow_qos_entry_log("Delete failed", flow,
-1);
- abort();
goto error;
}
}
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 08/38] app/testpmd: fix unreachable VF traffic error message
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (6 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 07/38] net/dpaa2: remove debug abort in flow destroy Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 09/38] examples/eventdev_pipeline: remove dead continue Stephen Hemminger
` (29 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
In set_vf_traffic() the ixgbe specific code ends with a return, so
the generic "not supported" message after the #endif can only be
reached when ixgbe is not built. Clang reports it as unreachable
in the normal build.
Put the generic message in an #else block so that exactly one path
is compiled in either configuration, and drop the now redundant
return.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/test-pmd/config.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 8986d6998f..5f255d2630 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -7301,12 +7301,12 @@ set_vf_traffic(portid_t port_id, uint8_t is_rx, uint16_t vf, uint8_t on)
fprintf(stderr,
"rte_pmd_ixgbe_set_vf_%s for port_id=%d failed diag=%d\n",
is_rx ? "rx" : "tx", port_id, diag);
- return;
-#endif
+#else
fprintf(stderr, "VF %s setting not supported for port %d\n",
is_rx ? "Rx" : "Tx", port_id);
RTE_SET_USED(vf);
RTE_SET_USED(on);
+#endif
}
int
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 09/38] examples/eventdev_pipeline: remove dead continue
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (7 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 08/38] app/testpmd: fix unreachable VF traffic error message Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 10/38] examples/skeleton: handle SIGINT and SIGTERM Stephen Hemminger
` (28 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Clang reports the continue after rte_panic() as unreachable.
rte_panic() does not return, so the statement can never execute.
Remove it and the now redundant braces.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/eventdev_pipeline/main.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/examples/eventdev_pipeline/main.c b/examples/eventdev_pipeline/main.c
index 00f409a07b..2c9b64655d 100644
--- a/examples/eventdev_pipeline/main.c
+++ b/examples/eventdev_pipeline/main.c
@@ -437,11 +437,9 @@ main(int argc, char **argv)
err = rte_eal_remote_launch(fdata->cap.worker,
&worker_data[worker_idx], lcore_id);
- if (err) {
+ if (err)
rte_panic("Failed to launch worker on core %d\n",
lcore_id);
- continue;
- }
if (fdata->worker_core[lcore_id])
worker_idx++;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 10/38] examples/skeleton: handle SIGINT and SIGTERM
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (8 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 09/38] examples/eventdev_pipeline: remove dead continue Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-12-01 8:59 ` Bruce Richardson
2026-11-30 21:49 ` [PATCH v2 11/38] examples/rxtx_callbacks: " Stephen Hemminger
` (27 subsequent siblings)
37 siblings, 1 reply; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The forwarding loop in lcore_main() never terminates, so the
rte_eal_cleanup() and return in main() are unreachable. Clang
reports this with -Wunreachable-code.
Add a signal handler setting force_quit, as done by l2fwd and
others, and test it in the loop. The function is no longer
__rte_noreturn, so the existing cleanup now runs on exit.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/skeleton/basicfwd.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/examples/skeleton/basicfwd.c b/examples/skeleton/basicfwd.c
index ca433fc89e..a05c8ea381 100644
--- a/examples/skeleton/basicfwd.c
+++ b/examples/skeleton/basicfwd.c
@@ -2,6 +2,8 @@
* Copyright(c) 2010-2015 Intel Corporation
*/
+#include <signal.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
@@ -18,6 +20,15 @@
#define MBUF_CACHE_SIZE 250
#define BURST_SIZE 32
+static volatile bool force_quit;
+
+static void
+signal_handler(int signum)
+{
+ if (signum == SIGINT || signum == SIGTERM)
+ force_quit = true;
+}
+
/* basicfwd.c: Basic DPDK skeleton forwarding example. */
/*
@@ -113,7 +124,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
*/
/* Basic forwarding application lcore. 8< */
-static __rte_noreturn void
+static void
lcore_main(void)
{
uint16_t port;
@@ -134,7 +145,7 @@ lcore_main(void)
rte_lcore_id());
/* Main work of application loop. 8< */
- for (;;) {
+ while (!force_quit) {
/*
* Receive packets on a port and forward them on the paired
* port. The mapping is 0 -> 1, 1 -> 0, 2 -> 3, 3 -> 2, etc.
@@ -182,6 +193,9 @@ main(int argc, char *argv[])
rte_exit(EXIT_FAILURE, "Error with EAL initialization\n");
/* >8 End of initializing the Environment Abstraction Layer (EAL). */
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
+
argc -= ret;
argv += ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 11/38] examples/rxtx_callbacks: handle SIGINT and SIGTERM
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (9 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 10/38] examples/skeleton: handle SIGINT and SIGTERM Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 12/38] examples/service_cores: " Stephen Hemminger
` (26 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The forwarding loop in lcore_main() never terminates, so the
rte_eal_cleanup() and return in main() are unreachable. Clang
reports this with -Wunreachable-code.
Add a signal handler setting force_quit, as done by l2fwd and
others, and test it in the loop. The function is no longer
__rte_noreturn, so the existing cleanup now runs on exit.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/rxtx_callbacks/main.c | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
index 4682921285..fe26e7cde2 100644
--- a/examples/rxtx_callbacks/main.c
+++ b/examples/rxtx_callbacks/main.c
@@ -2,7 +2,9 @@
* Copyright(c) 2010-2015 Intel Corporation
*/
+#include <signal.h>
#include <stdalign.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <inttypes.h>
@@ -23,6 +25,15 @@
static int hwts_dynfield_offset = -1;
+static volatile bool force_quit;
+
+static void
+signal_handler(int signum)
+{
+ if (signum == SIGINT || signum == SIGTERM)
+ force_quit = true;
+}
+
static inline rte_mbuf_timestamp_t *
hwts_field(struct rte_mbuf *mbuf)
{
@@ -244,7 +255,7 @@ port_init(uint16_t port, struct rte_mempool *mbuf_pool)
* Main thread that does the work, reading from INPUT_PORT
* and writing to OUTPUT_PORT
*/
-static __rte_noreturn void
+static void
lcore_main(void)
{
uint16_t port;
@@ -259,7 +270,7 @@ lcore_main(void)
printf("\nCore %u forwarding packets. [Ctrl+C to quit]\n",
rte_lcore_id());
- for (;;) {
+ while (!force_quit) {
RTE_ETH_FOREACH_DEV(port) {
struct rte_mbuf *bufs[BURST_SIZE];
const uint16_t nb_rx = rte_eth_rx_burst(port, 0,
@@ -301,6 +312,10 @@ main(int argc, char *argv[])
if (ret < 0)
rte_exit(EXIT_FAILURE, "Error with EAL initialization\n");
+
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
+
argc -= ret;
argv += ret;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 12/38] examples/service_cores: handle SIGINT and SIGTERM
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (10 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 11/38] examples/rxtx_callbacks: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 13/38] examples/timer: " Stephen Hemminger
` (25 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The profile display loop in main() never terminates, so the
rte_eal_cleanup() and return after it are unreachable. Clang
reports this with -Wunreachable-code.
Add a signal handler setting force_quit, as done by l2fwd and
others, and test it in the loop so that cleanup runs on exit.
Change the main loop to use sleep() which is interruptible
rather than rte_delay_us_sleep() which retries on EINTR.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/service_cores/main.c | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/examples/service_cores/main.c b/examples/service_cores/main.c
index 9f52082254..2c7a3f7488 100644
--- a/examples/service_cores/main.c
+++ b/examples/service_cores/main.c
@@ -2,6 +2,8 @@
* Copyright(c) 2017 Intel Corporation
*/
+#include <signal.h>
+#include <stdbool.h>
#include <unistd.h>
#include <stdio.h>
#include <string.h>
@@ -163,6 +165,15 @@ apply_profile(int profile_id)
}
}
+static volatile bool force_quit;
+
+static void
+signal_handler(int signum)
+{
+ if (signum == SIGINT || signum == SIGTERM)
+ force_quit = true;
+}
+
int
main(int argc, char **argv)
{
@@ -172,6 +183,9 @@ main(int argc, char **argv)
if (ret < 0)
rte_panic("Cannot init EAL\n");
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
+
uint32_t i;
for (i = 0; i < NUM_SERVICES; i++) {
services[i].callback_userdata = 0;
@@ -203,7 +217,7 @@ main(int argc, char **argv)
}
i = 0;
- while (1) {
+ while (!force_quit) {
const char clr[] = { 27, '[', '2', 'J', '\0' };
const char topLeft[] = { 27, '[', '1', ';', '1', 'H', '\0' };
printf("%s%s", clr, topLeft);
@@ -211,10 +225,13 @@ main(int argc, char **argv)
apply_profile(i);
printf("\n==> Profile: %s\n\n", profiles[i].name);
- rte_delay_us_sleep(1 * US_PER_S);
+ /* sleep() returns the time left if interrupted by a signal */
+ if (sleep(1) != 0)
+ break;
rte_service_dump(stdout, UINT32_MAX);
- rte_delay_us_sleep(5 * US_PER_S);
+ if (sleep(5) != 0)
+ break;
rte_service_dump(stdout, UINT32_MAX);
i++;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 13/38] examples/timer: handle SIGINT and SIGTERM
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (11 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 12/38] examples/service_cores: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 14/38] examples/multi_process: handle SIGINT and SIGTERM in client Stephen Hemminger
` (24 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The timer poll loop in lcore_mainloop() never terminates, so the
rte_eal_cleanup() and return in main() are unreachable. Clang
reports this with -Wunreachable-code.
Add a signal handler setting force_quit, as done by l2fwd and
others, and test it in the loop. The function is no longer
__rte_noreturn and now returns zero.
lcore_mainloop() also runs on the worker lcores, so main() must
wait for them to leave the loop before tearing down the EAL.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/timer/main.c | 23 +++++++++++++++++++++--
1 file changed, 21 insertions(+), 2 deletions(-)
diff --git a/examples/timer/main.c b/examples/timer/main.c
index a349846c7c..170c15ca19 100644
--- a/examples/timer/main.c
+++ b/examples/timer/main.c
@@ -2,6 +2,8 @@
* Copyright(c) 2010-2014 Intel Corporation
*/
+#include <signal.h>
+#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
@@ -56,7 +58,16 @@ timer1_cb(__rte_unused struct rte_timer *tim,
}
/* >8 End of timer1 callback. */
-static __rte_noreturn int
+static volatile bool force_quit;
+
+static void
+signal_handler(int signum)
+{
+ if (signum == SIGINT || signum == SIGTERM)
+ force_quit = true;
+}
+
+static int
lcore_mainloop(__rte_unused void *arg)
{
uint64_t prev_tsc = 0, cur_tsc, diff_tsc;
@@ -66,7 +77,7 @@ lcore_mainloop(__rte_unused void *arg)
printf("Starting mainloop on core %u\n", lcore_id);
/* Main loop. 8< */
- while (1) {
+ while (!force_quit) {
/*
* Call the timer handler on each core: as we don't need a
* very precise timer, so only call rte_timer_manage()
@@ -81,6 +92,8 @@ lcore_mainloop(__rte_unused void *arg)
}
}
/* >8 End of main loop. */
+
+ return 0;
}
int
@@ -95,6 +108,9 @@ main(int argc, char **argv)
if (ret < 0)
rte_panic("Cannot init EAL\n");
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
+
/* init RTE timer library */
rte_timer_subsystem_init();
/* >8 End of init EAL. */
@@ -126,6 +142,9 @@ main(int argc, char **argv)
(void) lcore_mainloop(NULL);
/* >8 End of call lcore_mainloop() on every worker lcore. */
+ /* wait for the workers to stop polling the timers */
+ rte_eal_mp_wait_lcore();
+
/* clean up the EAL */
rte_eal_cleanup();
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 14/38] examples/multi_process: handle SIGINT and SIGTERM in client
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (12 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 13/38] examples/timer: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 15/38] examples/server_node_efd: handle SIGINT and SIGTERM in node Stephen Hemminger
` (23 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The packet handling loop in main() never terminates, so the
rte_eal_cleanup() after it is unreachable. Clang reports this
with -Wunreachable-code.
Add a signal handler setting force_quit, as done by the server
process and others, and test it in the loop so that cleanup runs
on exit. Return zero explicitly rather than falling off the end
of main().
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
.../client_server_mp/mp_client/client.c | 20 +++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/examples/multi_process/client_server_mp/mp_client/client.c b/examples/multi_process/client_server_mp/mp_client/client.c
index 087c38ef73..2916881541 100644
--- a/examples/multi_process/client_server_mp/mp_client/client.c
+++ b/examples/multi_process/client_server_mp/mp_client/client.c
@@ -2,6 +2,8 @@
* Copyright(c) 2010-2016 Intel Corporation
*/
+#include <signal.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <inttypes.h>
@@ -195,9 +197,18 @@ handle_packet(struct rte_mbuf *buf)
}
+static volatile bool force_quit;
+
+static void
+signal_handler(int signum)
+{
+ if (signum == SIGINT || signum == SIGTERM)
+ force_quit = true;
+}
+
/*
* Application main function - loops through
- * receiving and processing packets. Never returns
+ * receiving and processing packets until interrupted
*/
int
main(int argc, char *argv[])
@@ -213,6 +224,9 @@ main(int argc, char *argv[])
if ((retval = rte_eal_init(argc, argv)) < 0)
return -1;
+
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
argc -= retval;
argv += retval;
@@ -243,7 +257,7 @@ main(int argc, char *argv[])
printf("\nClient process %d handling packets\n", client_id);
printf("[Press Ctrl-C to quit ...]\n");
- for (;;) {
+ while (!force_quit) {
uint16_t i, rx_pkts;
rx_pkts = rte_ring_dequeue_burst(rx_ring, pkts,
@@ -270,4 +284,6 @@ main(int argc, char *argv[])
/* clean up the EAL */
rte_eal_cleanup();
+
+ return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 15/38] examples/server_node_efd: handle SIGINT and SIGTERM in node
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (13 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 14/38] examples/multi_process: handle SIGINT and SIGTERM in client Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 16/38] examples/pipeline: handle SIGINT and SIGTERM Stephen Hemminger
` (22 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The packet handling loop in main() never terminates, so the
rte_eal_cleanup() after it is unreachable. Clang reports this
with -Wunreachable-code.
Add a signal handler setting force_quit, as done by l2fwd and
others, and test it in the loop so that cleanup runs on exit.
Return zero explicitly rather than falling off the end of main(),
and drop the "Never returns" comment which no longer applies.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/server_node_efd/efd_node/node.c | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
diff --git a/examples/server_node_efd/efd_node/node.c b/examples/server_node_efd/efd_node/node.c
index fc2aa5ffef..94ff4e9e0e 100644
--- a/examples/server_node_efd/efd_node/node.c
+++ b/examples/server_node_efd/efd_node/node.c
@@ -2,6 +2,8 @@
* Copyright(c) 2016-2017 Intel Corporation
*/
+#include <signal.h>
+#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <inttypes.h>
@@ -298,9 +300,18 @@ handle_packets(struct rte_hash *h, struct rte_mbuf **bufs, uint16_t num_packets)
}
/* >8 End of packets dequeuing. */
+static volatile bool force_quit;
+
+static void
+signal_handler(int signum)
+{
+ if (signum == SIGINT || signum == SIGTERM)
+ force_quit = true;
+}
+
/*
* Application main function - loops through
- * receiving and processing packets. Never returns
+ * receiving and processing packets until interrupted
*/
int
main(int argc, char *argv[])
@@ -318,6 +329,9 @@ main(int argc, char *argv[])
retval = rte_eal_init(argc, argv);
if (retval < 0)
return -1;
+
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
argc -= retval;
argv += retval;
@@ -356,7 +370,7 @@ main(int argc, char *argv[])
printf("\nNode process %d handling packets\n", node_id);
printf("[Press Ctrl-C to quit ...]\n");
- for (;;) {
+ while (!force_quit) {
uint16_t rx_pkts = PKT_READ_SIZE;
uint16_t port;
@@ -392,4 +406,6 @@ main(int argc, char *argv[])
/* clean up the EAL */
rte_eal_cleanup();
+
+ return 0;
}
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 16/38] examples/pipeline: handle SIGINT and SIGTERM
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (14 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 15/38] examples/server_node_efd: handle SIGINT and SIGTERM in node Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 17/38] ethdev: fix unreachable warnings from switch declarations Stephen Hemminger
` (21 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The dispatch loop in main() never terminates, so the
rte_eal_cleanup() after it is unreachable. Clang reports this
with -Wunreachable-code.
This example has two independent dispatch loops: the control
plane loop in main() and the data plane loop in thread_main()
running on every worker lcore. Stopping only the control plane
would tear down the EAL while the workers are still running
pipelines, so force_quit is declared in thread.h and tested by
both loops.
The connectivity poll functions are non blocking, so the control
plane loop notices the flag immediately.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
examples/pipeline/main.c | 21 ++++++++++++++++++++-
examples/pipeline/thread.c | 2 +-
examples/pipeline/thread.h | 6 ++++++
3 files changed, 27 insertions(+), 2 deletions(-)
diff --git a/examples/pipeline/main.c b/examples/pipeline/main.c
index da5dd2b3f6..57f9584a64 100644
--- a/examples/pipeline/main.c
+++ b/examples/pipeline/main.c
@@ -2,6 +2,8 @@
* Copyright(c) 2020 Intel Corporation
*/
+#include <signal.h>
+#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -131,6 +133,15 @@ parse_args(int argc, char **argv)
return 0;
}
+volatile bool force_quit;
+
+static void
+signal_handler(int signum)
+{
+ if (signum == SIGINT || signum == SIGTERM)
+ force_quit = true;
+}
+
int
main(int argc, char **argv)
{
@@ -149,6 +160,9 @@ main(int argc, char **argv)
return status;
};
+ signal(SIGINT, signal_handler);
+ signal(SIGTERM, signal_handler);
+
/* Thread */
status = thread_init();
if (status) {
@@ -178,12 +192,17 @@ main(int argc, char **argv)
};
/* Dispatch loop */
- for ( ; ; ) {
+ while (!force_quit) {
conn_poll_for_conn(conn);
conn_poll_for_msg(conn);
}
+ /* wait for the data plane threads to stop running the pipelines */
+ rte_eal_mp_wait_lcore();
+
/* clean up the EAL */
rte_eal_cleanup();
+
+ return 0;
}
diff --git a/examples/pipeline/thread.c b/examples/pipeline/thread.c
index cf2af55f68..8cdbd4fade 100644
--- a/examples/pipeline/thread.c
+++ b/examples/pipeline/thread.c
@@ -359,7 +359,7 @@ thread_main(void *arg __rte_unused)
t = &threads[thread_id];
/* Dispatch loop. */
- for ( ; ; ) {
+ while (!force_quit) {
uint32_t i;
/* Pipelines. */
diff --git a/examples/pipeline/thread.h b/examples/pipeline/thread.h
index f2e643def5..ad83b27506 100644
--- a/examples/pipeline/thread.h
+++ b/examples/pipeline/thread.h
@@ -5,10 +5,16 @@
#ifndef _INCLUDE_THREAD_H_
#define _INCLUDE_THREAD_H_
+#include <stdbool.h>
#include <stdint.h>
#include <rte_swx_pipeline.h>
+/**
+ * Set by the signal handler to stop the control and data plane threads.
+ */
+extern volatile bool force_quit;
+
/**
* Control plane (CP) thread.
*/
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 17/38] ethdev: fix unreachable warnings from switch declarations
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (15 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 16/38] examples/pipeline: handle SIGINT and SIGTERM Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 18/38] config: add per-directory option for -Wunreachable-code Stephen Hemminger
` (20 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Putting declarations inside switch block but before the first
case statement cause clang to flag them as unreachable code.
Simpler to just move.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/ethdev/rte_flow.c | 71 +++++++++++++++++++++----------------------
1 file changed, 34 insertions(+), 37 deletions(-)
diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flow.c
index ae08e100fa..393e365f9f 100644
--- a/lib/ethdev/rte_flow.c
+++ b/lib/ethdev/rte_flow.c
@@ -704,29 +704,28 @@ rte_flow_conv_item_spec(void *buf, const size_t size,
type == RTE_FLOW_CONV_ITEM_LAST ? item->last :
type == RTE_FLOW_CONV_ITEM_MASK ? item->mask :
NULL;
+ union {
+ const struct rte_flow_item_raw *raw;
+ const struct rte_flow_item_geneve_opt *geneve_opt;
+ } spec;
+ union {
+ const struct rte_flow_item_raw *raw;
+ } last;
+ union {
+ const struct rte_flow_item_raw *raw;
+ } mask;
+ union {
+ const struct rte_flow_item_raw *raw;
+ const struct rte_flow_item_geneve_opt *geneve_opt;
+ } src;
+ union {
+ struct rte_flow_item_raw *raw;
+ struct rte_flow_item_geneve_opt *geneve_opt;
+ } dst;
+ void *deep_src;
+ size_t tmp;
switch (item->type) {
- union {
- const struct rte_flow_item_raw *raw;
- const struct rte_flow_item_geneve_opt *geneve_opt;
- } spec;
- union {
- const struct rte_flow_item_raw *raw;
- } last;
- union {
- const struct rte_flow_item_raw *raw;
- } mask;
- union {
- const struct rte_flow_item_raw *raw;
- const struct rte_flow_item_geneve_opt *geneve_opt;
- } src;
- union {
- struct rte_flow_item_raw *raw;
- struct rte_flow_item_geneve_opt *geneve_opt;
- } dst;
- void *deep_src;
- size_t tmp;
-
case RTE_FLOW_ITEM_TYPE_RAW:
spec.raw = item->spec;
last.raw = item->last ? item->last : item->spec;
@@ -809,21 +808,20 @@ rte_flow_conv_action_conf(void *buf, const size_t size,
const struct rte_flow_action *action)
{
size_t off;
+ union {
+ const struct rte_flow_action_rss *rss;
+ const struct rte_flow_action_vxlan_encap *vxlan_encap;
+ const struct rte_flow_action_nvgre_encap *nvgre_encap;
+ } src;
+ union {
+ struct rte_flow_action_rss *rss;
+ struct rte_flow_action_vxlan_encap *vxlan_encap;
+ struct rte_flow_action_nvgre_encap *nvgre_encap;
+ } dst;
+ size_t tmp;
+ int ret;
switch (action->type) {
- union {
- const struct rte_flow_action_rss *rss;
- const struct rte_flow_action_vxlan_encap *vxlan_encap;
- const struct rte_flow_action_nvgre_encap *nvgre_encap;
- } src;
- union {
- struct rte_flow_action_rss *rss;
- struct rte_flow_action_vxlan_encap *vxlan_encap;
- struct rte_flow_action_nvgre_encap *nvgre_encap;
- } dst;
- size_t tmp;
- int ret;
-
case RTE_FLOW_ACTION_TYPE_RSS:
src.rss = action->conf;
dst.rss = buf;
@@ -1241,12 +1239,11 @@ rte_flow_conv(enum rte_flow_conv_op op,
const void *src,
struct rte_flow_error *error)
{
+ const struct rte_flow_attr *attr;
+ const struct rte_flow_item *item;
int ret;
switch (op) {
- const struct rte_flow_attr *attr;
- const struct rte_flow_item *item;
-
case RTE_FLOW_CONV_OP_NONE:
ret = 0;
break;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 18/38] config: add per-directory option for -Wunreachable-code
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (16 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 17/38] ethdev: fix unreachable warnings from switch declarations Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 19/38] bus/dpaa: exempt this driver from unreachable code detection Stephen Hemminger
` (19 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Unreachable code is usually a symptom of a real bug: a misplaced
return, an inverted condition, or a loop that can never iterate.
DPDK does not build with -Wunreachable-code anywhere, so none of
these get caught.
Add a no_unreachable_cflag variable, following the no_shadow_cflag
pattern, so that the few drivers with unreachable code in imported
base code can be excluded when the check is enabled.
Only clang implements this warning. GCC accepts -Wunreachable-code
but documents it as doing nothing, so finding these bugs requires a
clang build.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
config/meson.build | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/config/meson.build b/config/meson.build
index bfac1cd93d..9f501589b7 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -372,6 +372,11 @@ if cc.has_argument('-Wno-shadow')
no_shadow_cflag = '-Wno-shadow'
endif
+no_unreachable_cflag = []
+if cc.has_argument('-Wunreachable-code')
+ no_unreachable_cflag = '-Wno-unreachable-code'
+endif
+
# per-driver option to disable -Wcomma if supported by the compiler
no_comma_cflag = []
if cc.has_argument('-Wno-comma')
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 19/38] bus/dpaa: exempt this driver from unreachable code detection
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (17 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 18/38] config: add per-directory option for -Wunreachable-code Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 20/38] net/qede: disable unreachable code checks Stephen Hemminger
` (18 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
This driver has some unreachable code warnings in the base/ code.
The DQRR CFG register value in qm_dqrr_init() includes the terms
"(0 ? 0x40 : 0) /* Ignore RP */" and
"(0 ? 0x10 : 0) /* Ignore SP */",
which clang reports as unreachable code.
Both terms are always zero, so they contribute nothing to the
register value. They look like the remains of a configuration
macro that was replaced by its disabled value, leaving the
conditional behind. The same two lines appear unchanged in the
Linux kernel qbman driver, so this predates the DPDK import.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/bus/dpaa/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/bus/dpaa/meson.build b/drivers/bus/dpaa/meson.build
index d1f03bb093..ef5e5721e5 100644
--- a/drivers/bus/dpaa/meson.build
+++ b/drivers/bus/dpaa/meson.build
@@ -22,6 +22,9 @@ sources = files(
'dpaa_bus_base_symbols.c',
)
+# base code in base/ has unreachable code, and is not built separately
+cflags += no_unreachable_cflag
+
if cc.has_argument('-Wno-cast-qual')
cflags += '-Wno-cast-qual'
endif
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 20/38] net/qede: disable unreachable code checks
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (18 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 19/38] bus/dpaa: exempt this driver from unreachable code detection Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 21/38] net/txgbe: " Stephen Hemminger
` (17 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
There is unreachable code in the base/ files imported from the
vendor. Disable the check for the base code only, using
base_cflags, so the driver's own sources are still checked.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/qede/base/meson.build | 3 +++
drivers/net/qede/meson.build | 2 +-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/qede/base/meson.build b/drivers/net/qede/base/meson.build
index a6dad3ec7b..8469bb2c17 100644
--- a/drivers/net/qede/base/meson.build
+++ b/drivers/net/qede/base/meson.build
@@ -55,3 +55,6 @@ foreach flag: error_cflags
base_cflags += flag
endif
endforeach
+
+# base code has unreachable code
+base_cflags += no_unreachable_cflag
diff --git a/drivers/net/qede/meson.build b/drivers/net/qede/meson.build
index 7957aae3fa..836bb78c89 100644
--- a/drivers/net/qede/meson.build
+++ b/drivers/net/qede/meson.build
@@ -19,9 +19,9 @@ sources = files(
'qede_sriov.c',
)
+# warnings in the base code imported from the vendor
if cc.has_argument('-Wno-format-nonliteral')
cflags += '-Wno-format-nonliteral'
endif
-# Suppress shadow warnings for this driver
cflags += no_shadow_cflag
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 21/38] net/txgbe: disable unreachable code checks
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (19 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 20/38] net/qede: disable unreachable code checks Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 22/38] net/ixgbe: disable unreachable code check Stephen Hemminger
` (16 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
There is unreachable code in the base/ files imported from the
vendor. Disable the check for the base code only, using
base_cflags, so the driver's own sources are still checked.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/txgbe/base/meson.build | 3 +++
drivers/net/txgbe/meson.build | 1 +
2 files changed, 4 insertions(+)
diff --git a/drivers/net/txgbe/base/meson.build b/drivers/net/txgbe/base/meson.build
index a9a02577ce..b8cc9ce3c9 100644
--- a/drivers/net/txgbe/base/meson.build
+++ b/drivers/net/txgbe/base/meson.build
@@ -15,3 +15,6 @@ base_sources = files(
'txgbe_e56.c',
'txgbe_e56_bp.c',
)
+
+# base code has unreachable code
+base_cflags += no_unreachable_cflag
diff --git a/drivers/net/txgbe/meson.build b/drivers/net/txgbe/meson.build
index dea50bfe14..c10db31e0c 100644
--- a/drivers/net/txgbe/meson.build
+++ b/drivers/net/txgbe/meson.build
@@ -23,6 +23,7 @@ sources = files(
deps += ['hash', 'security']
+# warnings in the base code imported from the vendor
cflags += no_wvla_cflag
cflags += no_shadow_cflag
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 22/38] net/ixgbe: disable unreachable code check
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (20 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 21/38] net/txgbe: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 23/38] net/ngbe: " Stephen Hemminger
` (15 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
There is unreachable code in the base/ files imported from the
vendor. Disable the check for the base code only, using
base_cflags, so the driver's own sources are still checked.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/ixgbe/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/intel/ixgbe/meson.build b/drivers/net/intel/ixgbe/meson.build
index 7e26700835..a3d6979b2b 100644
--- a/drivers/net/intel/ixgbe/meson.build
+++ b/drivers/net/intel/ixgbe/meson.build
@@ -20,6 +20,9 @@ base_sources = files(
'base/ixgbe_x550.c',
)
+# base code has unreachable code
+base_cflags += no_unreachable_cflag
+
sources += files(
'ixgbe_82599_bypass.c',
'ixgbe_bypass.c',
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 23/38] net/ngbe: disable unreachable code check
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (21 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 22/38] net/ixgbe: disable unreachable code check Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 24/38] net/octeontx: replace unreachable code Stephen Hemminger
` (14 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
There is unreachable code in the base/ files imported from the
vendor. Disable the check for the base code only, using
base_cflags, so the driver's own sources are still checked.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/ngbe/base/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ngbe/base/meson.build b/drivers/net/ngbe/base/meson.build
index 6932f648af..83844049b8 100644
--- a/drivers/net/ngbe/base/meson.build
+++ b/drivers/net/ngbe/base/meson.build
@@ -14,3 +14,6 @@ base_sources = files(
)
cflags += no_wvla_cflag
+
+# base code has unreachable code
+base_cflags += no_unreachable_cflag
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 24/38] net/octeontx: replace unreachable code
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (22 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 23/38] net/ngbe: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 25/38] common/sfc_efx: disable unreachable code check for base code Stephen Hemminger
` (13 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The PKO flow control register value encoded the DQ stride with
"(PKO_DQ_FC_STRIDE == PKO_DQ_FC_STRIDE_16) ? 1 : 0", which clang
reports as unreachable because PKO_DQ_FC_STRIDE is defined as
PKO_DQ_FC_STRIDE_16.
The conditional documents nothing on its own: the reader has to
work out that it is constant and then look up the register layout.
Hard code the stride bit and add a static_assert() on the
PKO_DQ_FC_STRIDE definition, so changing the stride fails the
build instead of silently programming the wrong value.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/octeontx/base/octeontx_pkovf.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/net/octeontx/base/octeontx_pkovf.c b/drivers/net/octeontx/base/octeontx_pkovf.c
index 5326fe24b9..112b3a217b 100644
--- a/drivers/net/octeontx/base/octeontx_pkovf.c
+++ b/drivers/net/octeontx/base/octeontx_pkovf.c
@@ -2,6 +2,7 @@
* Copyright(c) 2017 Cavium, Inc
*/
+#include <assert.h>
#include <stdbool.h>
#include <string.h>
#include <stdio.h>
@@ -17,6 +18,12 @@
#include "octeontx_io.h"
#include "octeontx_pkovf.h"
+/*
+ * The DQ_FC_CONFIG STRIDE bit below is hard coded for a stride of 16.
+ */
+static_assert(PKO_DQ_FC_STRIDE == PKO_DQ_FC_STRIDE_16,
+ "PKO flow control stride must be 16");
+
struct octeontx_pko_iomem {
uint8_t *va;
rte_iova_t iova;
@@ -523,7 +530,7 @@ octeontx_pko_init_fc(const size_t pko_vf_count)
(sizeof(struct octeontx_pko_fc_ctl_s) * dq_ix)) & ~0x7F;
reg |= /* BASE */
(0x2 << 3) | /* HYST_BITS */
- (((PKO_DQ_FC_STRIDE == PKO_DQ_FC_STRIDE_16) ? 1 : 0) << 2) |
+ (1 << 2) | /* STRIDE: 16 */
(0x1 << 0); /* ENABLE */
octeontx_write64(reg, vf_bar0 + PKO_VF_DQ_FC_CONFIG);
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 25/38] common/sfc_efx: disable unreachable code check for base code
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (23 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 24/38] net/octeontx: replace unreachable code Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 26/38] net/dpaa2: check port state before changing TM hierarchy Stephen Hemminger
` (12 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
In efx_mon_init() the monitor type switch only has cases when
EFSYS_OPT_MON_MCDI is enabled. DPDK builds with it set to zero, so
only the default case which jumps to the error path remains and
clang reports the assignment after the switch as unreachable.
The code is correct in the upstream libefx where the option is
enabled, so add the flag to the list of warnings already disabled
for this base code.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/common/sfc_efx/base/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/common/sfc_efx/base/meson.build b/drivers/common/sfc_efx/base/meson.build
index 78383a38a2..885bf837cd 100644
--- a/drivers/common/sfc_efx/base/meson.build
+++ b/drivers/common/sfc_efx/base/meson.build
@@ -80,6 +80,7 @@ else
'-Wno-unused-variable',
'-Wno-empty-body',
'-Wno-unused-but-set-variable',
+ '-Wno-unreachable-code',
]
endif
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 26/38] net/dpaa2: check port state before changing TM hierarchy
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (24 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 25/38] common/sfc_efx: disable unreachable code check for base code Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 27/38] net/e1000: disable unreachable code check for base code Stephen Hemminger
` (11 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
dpaa2_node_add() and dpaa2_node_delete() had the "port is already
started" check stubbed out as "if (0)", one of them with an
"XXX: update it" comment. The error message and the
RTE_TM_ERROR_TYPE_UNSPECIFIED argument were already in place, so
only the condition was missing.
Use dev->data->dev_started, which is what other drivers test in
their traffic manager callbacks. The hierarchy is pushed to the
hardware by dpaa2_hierarchy_commit(), so building or removing
nodes while the port is running was never going to take effect.
Also removes the last two "if (0)" blocks outside base code, which
clang reports as unreachable code with
-Wunreachable-code-aggressive.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/dpaa2/dpaa2_tm.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/net/dpaa2/dpaa2_tm.c b/drivers/net/dpaa2/dpaa2_tm.c
index 3057f4d031..70c5ee66f0 100644
--- a/drivers/net/dpaa2/dpaa2_tm.c
+++ b/drivers/net/dpaa2/dpaa2_tm.c
@@ -445,7 +445,7 @@ dpaa2_node_add(struct rte_eth_dev *dev, uint32_t node_id,
struct dpaa2_tm_node *node, *parent = NULL;
int ret;
- if (0/* If device is started*/)
+ if (dev->data->dev_started)
return -rte_tm_error_set(error, EPERM,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
NULL, "Port is already started\n");
@@ -537,12 +537,10 @@ dpaa2_node_delete(struct rte_eth_dev *dev, uint32_t node_id,
struct dpaa2_dev_priv *priv = dev->data->dev_private;
struct dpaa2_tm_node *node;
- /* XXX: update it */
- if (0) {
+ if (dev->data->dev_started)
return -rte_tm_error_set(error, EPERM,
RTE_TM_ERROR_TYPE_UNSPECIFIED,
NULL, "Port is already started\n");
- }
node = dpaa2_node_from_id(priv, node_id);
if (!node)
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 27/38] net/e1000: disable unreachable code check for base code
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (25 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 26/38] net/dpaa2: check port state before changing TM hierarchy Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 28/38] net/ice: " Stephen Hemminger
` (10 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
There is unreachable code in the base/ files imported from the
vendor. Disable the check for the base code only, using
base_cflags, so the driver's own sources are still checked.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/e1000/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/intel/e1000/meson.build b/drivers/net/intel/e1000/meson.build
index 6f1e300718..4c35db5067 100644
--- a/drivers/net/intel/e1000/meson.build
+++ b/drivers/net/intel/e1000/meson.build
@@ -22,6 +22,9 @@ base_sources = files(
'base/e1000_vf.c',
)
+# base code has unreachable code
+base_cflags += no_unreachable_cflag
+
sources += files(
'e1000_logs.c',
'e1000_osdep.c',
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 28/38] net/ice: disable unreachable code check for base code
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (26 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 27/38] net/e1000: disable unreachable code check for base code Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 29/38] raw/ifpga: " Stephen Hemminger
` (9 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
There is unreachable code in the base/ files imported from the
vendor. Disable the check for the base code only, using
base_cflags, so the driver's own sources are still checked.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/ice/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/intel/ice/meson.build b/drivers/net/intel/ice/meson.build
index 00077be30a..f8eb1e0015 100644
--- a/drivers/net/intel/ice/meson.build
+++ b/drivers/net/intel/ice/meson.build
@@ -76,6 +76,9 @@ base_sources = files(
'base/ice_vf_mbx.c',
)
+# base code has unreachable code
+base_cflags += no_unreachable_cflag
+
if is_ms_compiler
base_error_cflags = [
'/wd4101', # unreferenced local variable
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 29/38] raw/ifpga: disable unreachable code check for base code
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (27 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 28/38] net/ice: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 30/38] net/bnxt: disable unreachable code check Stephen Hemminger
` (8 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
There is unreachable code in the base/ files imported from the
vendor. Add the flag next to the -Wno-comma already disabled for
that code, so the driver's own sources are still checked.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/raw/ifpga/base/meson.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build
index 225bde052b..ad344674a1 100644
--- a/drivers/raw/ifpga/base/meson.build
+++ b/drivers/raw/ifpga/base/meson.build
@@ -25,3 +25,4 @@ base_sources = files(
'opae_eth_group.c',
)
base_cflags += no_comma_cflag
+base_cflags += no_unreachable_cflag
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 30/38] net/bnxt: disable unreachable code check
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (28 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 29/38] raw/ifpga: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 31/38] net/ntnic: " Stephen Hemminger
` (7 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
There is unreachable code in the hcapi/ and tf_core/ files
imported from the vendor. Those are listed in sources rather than
base_sources, so they are not built separately and the exemption
has to apply to the whole driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/bnxt/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build
index 67bfd3f79b..f183237899 100644
--- a/drivers/net/bnxt/meson.build
+++ b/drivers/net/bnxt/meson.build
@@ -66,3 +66,6 @@ elif arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64')
endif
annotate_locks = false
+
+# hcapi/ and tf_core/ code has unreachable code
+cflags += no_unreachable_cflag
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 31/38] net/ntnic: disable unreachable code check
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (29 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 30/38] net/bnxt: disable unreachable code check Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 32/38] lib: mark never returning thread functions Stephen Hemminger
` (6 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
There is unreachable code in the nthw/ files imported from the
vendor. Those are listed in sources rather than base_sources, so
they are not built separately and the exemption has to apply to
the whole driver.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/ntnic/meson.build | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ntnic/meson.build b/drivers/net/ntnic/meson.build
index 60688c8aaf..3bed975b73 100644
--- a/drivers/net/ntnic/meson.build
+++ b/drivers/net/ntnic/meson.build
@@ -131,3 +131,6 @@ sources = files(
# Suppress shadow warnings for this driver due to extensive variable shadowing
cflags += no_shadow_cflag
+
+# nthw/ code has unreachable code
+cflags += no_unreachable_cflag
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 32/38] lib: mark never returning thread functions
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (30 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 31/38] net/ntnic: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 33/38] lib: remove unreachable statements Stephen Hemminger
` (5 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
rxa_intr_thread() and vhost_user_client_reconnect() loop forever,
so the return after the loop can never be reached and clang
reports it with -Wunreachable-code-aggressive.
Removing the return is not enough: GCC does not notice that the
loop never exits and warns that a non void function has no return
statement. Mark both functions __rte_noreturn instead, which is
what they are, and drop the dead return.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/eventdev/rte_event_eth_rx_adapter.c | 4 +---
lib/vhost/socket.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/lib/eventdev/rte_event_eth_rx_adapter.c b/lib/eventdev/rte_event_eth_rx_adapter.c
index 26c0a26db1..ba264d0ba0 100644
--- a/lib/eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/eventdev/rte_event_eth_rx_adapter.c
@@ -1163,7 +1163,7 @@ rxa_intr_ring_del_entries(struct event_eth_rx_adapter *rx_adapter,
* These events are picked up by rxa_intr_ring_dequeue() which is invoked from
* the adapter service function.
*/
-static uint32_t
+static __rte_noreturn uint32_t
rxa_intr_thread(void *arg)
{
struct event_eth_rx_adapter *rx_adapter = arg;
@@ -1181,8 +1181,6 @@ rxa_intr_thread(void *arg)
epoll_events[i].epdata.data);
}
}
-
- return 0;
}
/* Dequeue <port, q> from interrupt ring and enqueue received
diff --git a/lib/vhost/socket.c b/lib/vhost/socket.c
index 2d3fe1fd53..dd32bb69e2 100644
--- a/lib/vhost/socket.c
+++ b/lib/vhost/socket.c
@@ -446,7 +446,7 @@ vhost_user_connect_nonblock(char *path, int fd, struct sockaddr *un, size_t sz)
return 0;
}
-static uint32_t
+static __rte_noreturn uint32_t
vhost_user_client_reconnect(void *arg __rte_unused)
{
int ret;
@@ -486,8 +486,6 @@ vhost_user_client_reconnect(void *arg __rte_unused)
pthread_mutex_unlock(&reconn_list.mutex);
sleep(1);
}
-
- return 0;
}
static int
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 33/38] lib: remove unreachable statements
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (31 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 32/38] lib: mark never returning thread functions Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 34/38] app: " Stephen Hemminger
` (4 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Clang with -Wunreachable-code-aggressive reports break statements
after a return and returns after a switch where every case
returns.
Remove them. Extra defensive code does not help: with the trailing
return gone, adding a case that forgets to return becomes a
compiler error instead of silently returning zero.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/cmdline/cmdline_parse_num.c | 2 --
lib/efd/rte_efd.c | 6 ------
lib/fib/rte_fib.c | 1 -
lib/fib/rte_fib6.c | 1 -
lib/sched/rte_sched.c | 1 -
lib/vhost/vhost_crypto.c | 1 -
6 files changed, 12 deletions(-)
diff --git a/lib/cmdline/cmdline_parse_num.c b/lib/cmdline/cmdline_parse_num.c
index 4cfc900391..ab2a55eb82 100644
--- a/lib/cmdline/cmdline_parse_num.c
+++ b/lib/cmdline/cmdline_parse_num.c
@@ -285,7 +285,6 @@ cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res,
} else {
return -1;
}
- break;
case DEC_NEG_OK:
if (nd.type == RTE_INT8 &&
@@ -307,7 +306,6 @@ cmdline_parse_num(cmdline_parse_token_hdr_t *tk, const char *srcbuf, void *res,
} else {
return -1;
}
- break;
default:
debug_printf("error\n");
return -1;
diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c
index 4dfc0ec9a4..9d5969e151 100644
--- a/lib/efd/rte_efd.c
+++ b/lib/efd/rte_efd.c
@@ -1286,8 +1286,6 @@ efd_lookup_internal(const struct efd_online_group_entry * const group,
const uint32_t hash_val_a, const uint32_t hash_val_b,
enum efd_lookup_internal_function lookup_fn)
{
- efd_value_t value = 0;
-
switch (lookup_fn) {
#if defined(RTE_ARCH_X86)
@@ -1296,7 +1294,6 @@ efd_lookup_internal(const struct efd_online_group_entry * const group,
group->lookup_table,
hash_val_a,
hash_val_b);
- break;
#endif
#if defined(RTE_ARCH_ARM64)
case EFD_LOOKUP_NEON:
@@ -1304,7 +1301,6 @@ efd_lookup_internal(const struct efd_online_group_entry * const group,
group->lookup_table,
hash_val_a,
hash_val_b);
- break;
#endif
case EFD_LOOKUP_SCALAR:
/* Fall-through */
@@ -1314,8 +1310,6 @@ efd_lookup_internal(const struct efd_online_group_entry * const group,
hash_val_a,
hash_val_b);
}
-
- return value;
}
RTE_EXPORT_SYMBOL(rte_efd_lookup)
diff --git a/lib/fib/rte_fib.c b/lib/fib/rte_fib.c
index 184210f380..17909f0759 100644
--- a/lib/fib/rte_fib.c
+++ b/lib/fib/rte_fib.c
@@ -115,7 +115,6 @@ init_dataplane(struct rte_fib *fib, __rte_unused int socket_id,
default:
return -EINVAL;
}
- return 0;
}
RTE_EXPORT_SYMBOL(rte_fib_add)
diff --git a/lib/fib/rte_fib6.c b/lib/fib/rte_fib6.c
index 770becdb61..e2cbf0db25 100644
--- a/lib/fib/rte_fib6.c
+++ b/lib/fib/rte_fib6.c
@@ -113,7 +113,6 @@ init_dataplane(struct rte_fib6 *fib, __rte_unused int socket_id,
default:
return -EINVAL;
}
- return 0;
}
RTE_EXPORT_SYMBOL(rte_fib6_add)
diff --git a/lib/sched/rte_sched.c b/lib/sched/rte_sched.c
index daa31e8b99..1f0d99d40b 100644
--- a/lib/sched/rte_sched.c
+++ b/lib/sched/rte_sched.c
@@ -2920,7 +2920,6 @@ grinder_handle(struct rte_sched_port *port,
default:
rte_panic("Algorithmic error (invalid state)\n");
- return 0;
}
}
diff --git a/lib/vhost/vhost_crypto.c b/lib/vhost/vhost_crypto.c
index 38a7bd75d6..da59d84126 100644
--- a/lib/vhost/vhost_crypto.c
+++ b/lib/vhost/vhost_crypto.c
@@ -107,7 +107,6 @@ cipher_algo_transform(uint32_t virtio_cipher_algo,
break;
default:
return -VIRTIO_CRYPTO_BADMSG;
- break;
}
return 0;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 34/38] app: remove unreachable statements
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (32 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 33/38] lib: remove unreachable statements Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 35/38] examples: " Stephen Hemminger
` (3 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
Clang with -Wunreachable-code-aggressive reports break statements
after a return or rte_exit(), and returns after a switch where
every case returns.
Remove them. Extra defensive code does not help: with the trailing
return gone, adding a case that forgets to return becomes a
compiler error instead of silently returning zero.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
app/dumpcap/main.c | 1 -
app/pdump/main.c | 1 -
app/test-compress-perf/comp_perf_options_parse.c | 1 -
app/test-crypto-perf/cperf_ops.c | 1 -
app/test-crypto-perf/cperf_options_parsing.c | 1 -
app/test-flow-perf/main.c | 1 -
app/test-gpudev/main.c | 1 -
app/test-pmd/parameters.c | 2 --
app/test-regex/main.c | 2 --
app/test-security-perf/test_security_perf.c | 1 -
app/test/test_cryptodev.c | 9 ---------
app/test/test_cryptodev_crosscheck.c | 6 ------
app/test/test_eal_flags.c | 1 -
13 files changed, 28 deletions(-)
diff --git a/app/dumpcap/main.c b/app/dumpcap/main.c
index 47483535fc..32bb65a97a 100644
--- a/app/dumpcap/main.c
+++ b/app/dumpcap/main.c
@@ -401,7 +401,6 @@ static void parse_opts(int argc, char **argv)
case 'b':
rte_exit(EXIT_FAILURE,
"multiple files not implemented\n");
- break;
case 'c':
stop.packets = get_uint(optarg, "packet_count", 0);
break;
diff --git a/app/pdump/main.c b/app/pdump/main.c
index 1f6135b20e..6f33b777d9 100644
--- a/app/pdump/main.c
+++ b/app/pdump/main.c
@@ -617,7 +617,6 @@ configure_vdev(uint16_t port_id)
rte_exit(EXIT_FAILURE,
"promiscuous mode enable failed: %s\n",
rte_strerror(-ret));
- return ret;
}
return 0;
diff --git a/app/test-compress-perf/comp_perf_options_parse.c b/app/test-compress-perf/comp_perf_options_parse.c
index 16d31c7e90..3cb8dbdd7f 100644
--- a/app/test-compress-perf/comp_perf_options_parse.c
+++ b/app/test-compress-perf/comp_perf_options_parse.c
@@ -709,7 +709,6 @@ comp_perf_options_parse(struct comp_test_data *test_data, int argc, char **argv)
case 'h':
usage(argv[0]);
exit(EXIT_SUCCESS);
- break;
/* long options */
case 0:
retval = comp_perf_opts_parse_long(opt_idx, test_data);
diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 1c8d1e263a..68432755f5 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -122,7 +122,6 @@ cperf_set_ops_asym_ecdsa(struct rte_crypto_op **ops,
default:
rte_panic("Unsupported ECDSA operation type %d\n",
options->op_type);
- break;
}
asym_op->ecdsa.message.data = ecdsa_curve_data->message.data;
diff --git a/app/test-crypto-perf/cperf_options_parsing.c b/app/test-crypto-perf/cperf_options_parsing.c
index b1b0abbcbc..61ce3af7e4 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -1258,7 +1258,6 @@ cperf_options_parse(struct cperf_options *options, int argc, char **argv)
case 'h':
usage(argv[0]);
exit(EXIT_SUCCESS);
- break;
/* long options */
case 0:
retval = cperf_opts_parse_long(opt_idx, options);
diff --git a/app/test-flow-perf/main.c b/app/test-flow-perf/main.c
index 6636d1517f..c529f55c73 100644
--- a/app/test-flow-perf/main.c
+++ b/app/test-flow-perf/main.c
@@ -986,7 +986,6 @@ args_parse(int argc, char **argv)
usage(argv[0]);
rte_exit(EXIT_FAILURE, "Invalid option: %s\n",
argv[optind - 1]);
- break;
}
}
if (rules_count % rules_batch != 0) {
diff --git a/app/test-gpudev/main.c b/app/test-gpudev/main.c
index f065e6cd81..4bf0c1a09d 100644
--- a/app/test-gpudev/main.c
+++ b/app/test-gpudev/main.c
@@ -57,7 +57,6 @@ args_parse(int argc, char **argv)
default:
usage(argv[0]);
rte_exit(EXIT_FAILURE, "Invalid option: %s\n", argv[optind]);
- break;
}
}
}
diff --git a/app/test-pmd/parameters.c b/app/test-pmd/parameters.c
index 9967e49881..0668c7d240 100644
--- a/app/test-pmd/parameters.c
+++ b/app/test-pmd/parameters.c
@@ -975,7 +975,6 @@ launch_args_parse(int argc, char** argv)
case 'h':
usage(argv[0]);
exit(EXIT_SUCCESS);
- break;
case TESTPMD_OPT_CMDLINE_FILE_NUM:
case TESTPMD_OPT_CMDLINE_FILE_NOECHO_NUM:
if (cmdline_file_count >= RTE_DIM(cmdline_files)) {
@@ -1797,7 +1796,6 @@ launch_args_parse(int argc, char** argv)
fprintf(stderr, "Invalid option: %s\n", argv[optind - 1]);
rte_exit(EXIT_FAILURE,
"Command line is incomplete or incorrect\n");
- break;
}
}
diff --git a/app/test-regex/main.c b/app/test-regex/main.c
index 81719f2e04..a27a9b73b7 100644
--- a/app/test-regex/main.c
+++ b/app/test-regex/main.c
@@ -173,7 +173,6 @@ args_parse(int argc, char **argv, char *rules_file, char *data_file,
default:
usage(argv[0]);
rte_exit(EXIT_FAILURE, "Invalid option: %s\n", argv[optind]);
- break;
}
}
@@ -530,7 +529,6 @@ run_regex(void *args)
default:
rte_exit(EXIT_FAILURE,
"Invalid match mode value\n");
- break;
}
pos += act_job_len;
actual_jobs++;
diff --git a/app/test-security-perf/test_security_perf.c b/app/test-security-perf/test_security_perf.c
index dd377a6027..4dc3c117eb 100644
--- a/app/test-security-perf/test_security_perf.c
+++ b/app/test-security-perf/test_security_perf.c
@@ -464,7 +464,6 @@ args_parse(int argc, char **argv)
usage(argv[0]);
rte_exit(EXIT_FAILURE, "Invalid option: %s\n",
argv[opt_idx - 1]);
- break;
}
}
diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c
index eb955766bc..8086377f19 100644
--- a/app/test/test_cryptodev.c
+++ b/app/test/test_cryptodev.c
@@ -3759,8 +3759,6 @@ test_snow3g_authentication_verify(const struct snow3g_hash_test_data *tdata)
return 0;
else
return -1;
-
- return 0;
}
static int
@@ -3939,8 +3937,6 @@ test_kasumi_authentication_verify(const struct kasumi_hash_test_data *tdata)
return 0;
else
return -1;
-
- return 0;
}
static int
@@ -3983,7 +3979,6 @@ static int
test_snow3g_hash_verify_test_case_1(void)
{
return test_snow3g_authentication_verify(&snow3g_hash_test_case_1);
-
}
static int
@@ -6879,8 +6874,6 @@ test_zuc_authentication(const struct wireless_test_data *tdata,
return 0;
else
return -1;
-
- return 0;
}
static int
@@ -20097,8 +20090,6 @@ test_NIA_helper(const void *td)
return 0;
else
return -1;
-
- return 0;
}
static int
diff --git a/app/test/test_cryptodev_crosscheck.c b/app/test/test_cryptodev_crosscheck.c
index bb21c3bc50..e3cb15737a 100644
--- a/app/test/test_cryptodev_crosscheck.c
+++ b/app/test/test_cryptodev_crosscheck.c
@@ -152,7 +152,6 @@ profile_create(const struct rte_cryptodev_symmetric_capability *capa,
break;
default:
rte_panic("Wrong capability profile type: %i\n", capability_type);
- break;
}
break;
case RTE_CRYPTO_SYM_XFORM_CIPHER:
@@ -171,7 +170,6 @@ profile_create(const struct rte_cryptodev_symmetric_capability *capa,
break;
default:
rte_panic("Wrong capability profile type: %i\n", capability_type);
- break;
}
break;
case RTE_CRYPTO_SYM_XFORM_AEAD:
@@ -193,12 +191,10 @@ profile_create(const struct rte_cryptodev_symmetric_capability *capa,
break;
default:
rte_panic("Wrong capability profile type: %i\n", capability_type);
- break;
}
break;
default:
rte_panic("Wrong xform profile type: %i\n", capa->xform_type);
- break;
}
profile.input_buf_len = RTE_ALIGN_CEIL(input_len, profile.block_size);
@@ -254,7 +250,6 @@ sym_capability_to_idx(const struct rte_cryptodev_symmetric_capability *cap)
break;
default:
rte_panic("Wrong capability profile type: %i\n", cap_idx.type);
- break;
}
return cap_idx;
@@ -457,7 +452,6 @@ crosscheck_init(void)
break;
default:
rte_panic("Wrong capability profile type: %i\n", cap->xform_type);
- break;
}
}
diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c
index dcfdc42eca..b059f5d929 100644
--- a/app/test/test_eal_flags.c
+++ b/app/test/test_eal_flags.c
@@ -214,7 +214,6 @@ process_hugefiles(const char *prefix, enum hugepage_action action)
result = 1;
goto end;
}
- break;
case HUGEPAGE_DELETE:
{
char file_path[PATH_MAX];
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 35/38] examples: remove unreachable statements
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (33 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 34/38] app: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 36/38] drivers: " Stephen Hemminger
` (2 subsequent siblings)
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Bruce Richardson
Clang with -Wunreachable-code-aggressive reports break and return
statements after rte_exit(), which does not return.
Remove them.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/bond/main.c | 1 -
examples/l2fwd-jobstats/main.c | 2 --
examples/l3fwd/main.c | 4 ----
examples/ntb/ntb_fwd.c | 1 -
examples/vhost/main.c | 4 +---
5 files changed, 1 insertion(+), 11 deletions(-)
diff --git a/examples/bond/main.c b/examples/bond/main.c
index 99359cd6fb..1d11a6687d 100644
--- a/examples/bond/main.c
+++ b/examples/bond/main.c
@@ -292,7 +292,6 @@ bond_port_init(void)
rte_exit(EXIT_FAILURE,
"port %u: promiscuous mode enable failed: %s\n",
BOND_PORT, rte_strerror(-retval));
- return;
}
struct rte_ether_addr addr;
diff --git a/examples/l2fwd-jobstats/main.c b/examples/l2fwd-jobstats/main.c
index f654831897..e6c0cfddc9 100644
--- a/examples/l2fwd-jobstats/main.c
+++ b/examples/l2fwd-jobstats/main.c
@@ -949,8 +949,6 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE,
"rte_eth_promiscuous_enable:err=%s, port=%u\n",
rte_strerror(-ret), portid);
- return ret;
-
}
printf("Port %u, MAC address: " RTE_ETHER_ADDR_PRT_FMT "\n\n",
diff --git a/examples/l3fwd/main.c b/examples/l3fwd/main.c
index 5d061a1cf7..f7e6ac7eec 100644
--- a/examples/l3fwd/main.c
+++ b/examples/l3fwd/main.c
@@ -619,8 +619,6 @@ parse_queue_size(const char *queue_size_arg, uint16_t *queue_size, int rx)
rte_exit(EXIT_FAILURE, "Invalid rx-queue-size\n");
else
rte_exit(EXIT_FAILURE, "Invalid tx-queue-size\n");
-
- return;
}
if (value > UINT16_MAX) {
@@ -630,8 +628,6 @@ parse_queue_size(const char *queue_size_arg, uint16_t *queue_size, int rx)
else
rte_exit(EXIT_FAILURE, "tx-queue-size %lu > %d\n",
value, UINT16_MAX);
-
- return;
}
*queue_size = value;
diff --git a/examples/ntb/ntb_fwd.c b/examples/ntb/ntb_fwd.c
index a53e8aae24..075ad355f0 100644
--- a/examples/ntb/ntb_fwd.c
+++ b/examples/ntb/ntb_fwd.c
@@ -1081,7 +1081,6 @@ ntb_parse_args(int argc, char **argv)
ntb_usage(prgname);
rte_exit(EXIT_FAILURE,
"Command line is incomplete or incorrect.\n");
- break;
}
}
}
diff --git a/examples/vhost/main.c b/examples/vhost/main.c
index e7434fd189..b1ad7ac676 100644
--- a/examples/vhost/main.c
+++ b/examples/vhost/main.c
@@ -1431,7 +1431,7 @@ static const struct rte_vhost_device_ops virtio_net_device_ops =
* This is a thread will wake up after a period to print stats if the user has
* enabled them.
*/
-static uint32_t
+static __rte_noreturn uint32_t
print_stats(__rte_unused void *arg)
{
struct vhost_dev *vdev;
@@ -1475,8 +1475,6 @@ print_stats(__rte_unused void *arg)
fflush(stdout);
}
-
- return 0;
}
static void
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 36/38] drivers: remove unreachable statements
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (34 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 35/38] examples: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 37/38] efd: mark configuration dependent vector selection Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 38/38] config: enable unreachable code detection Stephen Hemminger
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger, Dariusz Sosnowski
Clang with -Wunreachable-code-aggressive reports break statements
after a return or rte_panic(), and returns after a switch where
every case returns.
Remove them. Extra defensive code does not help: with the trailing
return gone, adding a case that forgets to return becomes a
compiler error instead of silently returning zero.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/common/cnxk/roc_nix_fc.c | 2 --
drivers/common/mlx5/linux/mlx5_nl.c | 1 -
drivers/crypto/caam_jr/caam_jr.c | 1 -
drivers/crypto/openssl/rte_openssl_pmd.c | 1 -
drivers/dma/dpaa/dpaa_qdma.c | 2 --
drivers/event/dsw/dsw_xstats.c | 1 -
drivers/ml/cnxk/cnxk_ml_ops.c | 10 ----------
drivers/net/bnx2x/bnx2x.c | 2 --
drivers/net/cnxk/cnxk_ethdev_mtr.c | 3 ---
drivers/net/intel/ipn3ke/ipn3ke_representor.c | 3 ---
drivers/net/intel/ipn3ke/ipn3ke_tm.c | 1 -
drivers/net/mlx5/linux/mlx5_mp_os.c | 1 -
drivers/net/mlx5/mlx5_flow_dv.c | 1 -
drivers/net/mlx5/mlx5_flow_flex.c | 1 -
drivers/net/mlx5/mlx5_flow_hw.c | 1 -
drivers/net/sfc/sfc_mae.c | 2 --
drivers/vdpa/ifc/ifcvf_vdpa.c | 4 ----
drivers/vdpa/mlx5/mlx5_vdpa_cthread.c | 1 -
drivers/vdpa/mlx5/mlx5_vdpa_event.c | 2 --
drivers/vdpa/nfp/nfp_vdpa.c | 5 -----
20 files changed, 45 deletions(-)
diff --git a/drivers/common/cnxk/roc_nix_fc.c b/drivers/common/cnxk/roc_nix_fc.c
index 8164a2ba0e..c0ba4c39ed 100644
--- a/drivers/common/cnxk/roc_nix_fc.c
+++ b/drivers/common/cnxk/roc_nix_fc.c
@@ -550,8 +550,6 @@ nix_rx_chan_multi_bpid_cfg(struct roc_nix *roc_nix, uint8_t chan, uint16_t bpid,
} else {
return roc_nix_chan_bpid_set(roc_nix, chan, bpid, 1, false);
}
-
- return 0;
}
#define NIX_BPID_INVALID 0xFFFF
diff --git a/drivers/common/mlx5/linux/mlx5_nl.c b/drivers/common/mlx5/linux/mlx5_nl.c
index cc33a9231f..a169bd8387 100644
--- a/drivers/common/mlx5/linux/mlx5_nl.c
+++ b/drivers/common/mlx5/linux/mlx5_nl.c
@@ -2061,7 +2061,6 @@ mlx5_nl_read_events(int nlsk_fd, mlx5_nl_event_cb *cb, void *cb_arg)
size -= aligned_len;
}
}
- return 0;
}
static int
diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c
index 01a9bed1ff..a77f1fed31 100644
--- a/drivers/crypto/caam_jr/caam_jr.c
+++ b/drivers/crypto/caam_jr/caam_jr.c
@@ -593,7 +593,6 @@ hw_poll_job_ring(struct sec_job_ring_t *job_ring,
false_alarm, real_poll,
sec_error_code, job_ring->cidx);
rte_panic("CAAM JR descriptor NULL");
- return notified_descs_no;
}
current_desc = (struct job_descriptor *)
caam_jr_dma_ptov(current_desc_addr);
diff --git a/drivers/crypto/openssl/rte_openssl_pmd.c b/drivers/crypto/openssl/rte_openssl_pmd.c
index 8791186fec..3ae8ecf6ac 100644
--- a/drivers/crypto/openssl/rte_openssl_pmd.c
+++ b/drivers/crypto/openssl/rte_openssl_pmd.c
@@ -670,7 +670,6 @@ openssl_set_session_auth_parameters(struct openssl_session *sess,
xform->auth.digest_length,
xform->auth.key.data,
&sess->cipher.ctx);
- break;
case RTE_CRYPTO_AUTH_MD5:
case RTE_CRYPTO_AUTH_SHA1:
diff --git a/drivers/dma/dpaa/dpaa_qdma.c b/drivers/dma/dpaa/dpaa_qdma.c
index d8bece700a..47e925afab 100644
--- a/drivers/dma/dpaa/dpaa_qdma.c
+++ b/drivers/dma/dpaa/dpaa_qdma.c
@@ -708,8 +708,6 @@ fsl_qdma_enqueue_overflow(struct fsl_qdma_queue *fsl_queue)
check_num = 0;
}
goto overflow_check;
-
- return 0;
}
static int
diff --git a/drivers/event/dsw/dsw_xstats.c b/drivers/event/dsw/dsw_xstats.c
index f61dfd80a8..71c3aa6670 100644
--- a/drivers/event/dsw/dsw_xstats.c
+++ b/drivers/event/dsw/dsw_xstats.c
@@ -326,7 +326,6 @@ dsw_xstats_get(const struct rte_eventdev *dev,
RTE_ASSERT(false);
return -1;
}
- return 0;
}
struct find_ctx {
diff --git a/drivers/ml/cnxk/cnxk_ml_ops.c b/drivers/ml/cnxk/cnxk_ml_ops.c
index dc05764306..e249fc0ed9 100644
--- a/drivers/ml/cnxk/cnxk_ml_ops.c
+++ b/drivers/ml/cnxk/cnxk_ml_ops.c
@@ -281,8 +281,6 @@ cnxk_ml_dev_xstat_get(struct cnxk_ml_dev *cnxk_mldev, uint16_t obj_idx __rte_unu
default:
return -1;
}
-
- return 0;
}
static uint64_t
@@ -485,8 +483,6 @@ cnxk_ml_dev_info_get(struct rte_ml_dev *dev, struct rte_ml_dev_info *dev_info)
return cn10k_ml_dev_info_get(cnxk_mldev, dev_info);
else
return mvtvm_ml_dev_info_get(cnxk_mldev, dev_info);
-
- return 0;
}
static int
@@ -815,8 +811,6 @@ cnxk_ml_dev_dump(struct rte_ml_dev *dev, FILE *fp)
return cn10k_ml_dev_dump(cnxk_mldev, fp);
else
return mvtvm_ml_dev_dump(cnxk_mldev, fp);
-
- return 0;
}
static int
@@ -1344,8 +1338,6 @@ cnxk_ml_model_start(struct rte_ml_dev *dev, uint16_t model_id)
return cn10k_ml_model_start(cnxk_mldev, model);
else
return tvmrt_ml_model_start(cnxk_mldev, model);
-
- return 0;
}
int
@@ -1369,8 +1361,6 @@ cnxk_ml_model_stop(struct rte_ml_dev *dev, uint16_t model_id)
return cn10k_ml_model_stop(cnxk_mldev, model);
else
return tvmrt_ml_model_stop(cnxk_mldev, model);
-
- return 0;
}
static int
diff --git a/drivers/net/bnx2x/bnx2x.c b/drivers/net/bnx2x/bnx2x.c
index 2924fed66b..8024d921fe 100644
--- a/drivers/net/bnx2x/bnx2x.c
+++ b/drivers/net/bnx2x/bnx2x.c
@@ -1397,7 +1397,6 @@ static void bnx2x_drain_tx_queues(struct bnx2x_softc *sc)
"Timeout waiting for fp[%d] "
"transmits to complete!", i);
rte_panic("tx drain failure");
- return;
}
count--;
@@ -10938,7 +10937,6 @@ bnx2x_send_final_clnup(struct bnx2x_softc *sc, uint8_t clnup_func,
PMD_DRV_LOG(DEBUG, sc, "At timeout completion address contained %x",
(REG_RD(sc, comp_addr)));
rte_panic("FLR cleanup failed");
- return -1;
}
/* Zero completion for nxt FLR */
diff --git a/drivers/net/cnxk/cnxk_ethdev_mtr.c b/drivers/net/cnxk/cnxk_ethdev_mtr.c
index 992e2d446e..e20196da1d 100644
--- a/drivers/net/cnxk/cnxk_ethdev_mtr.c
+++ b/drivers/net/cnxk/cnxk_ethdev_mtr.c
@@ -302,7 +302,6 @@ update_mtr_err(uint32_t act_color, struct rte_mtr_error *error, bool action)
str = "Green action is null";
goto notvalid;
}
- break;
case RTE_COLOR_YELLOW:
if (action) {
str = "Yellow action is not valid";
@@ -311,7 +310,6 @@ update_mtr_err(uint32_t act_color, struct rte_mtr_error *error, bool action)
str = "Yellow action is null";
goto notvalid;
}
- break;
case RTE_COLOR_RED:
if (action) {
str = "Red action is not valid";
@@ -320,7 +318,6 @@ update_mtr_err(uint32_t act_color, struct rte_mtr_error *error, bool action)
str = "Red action is null";
goto notvalid;
}
- break;
}
notsup:
return -rte_mtr_error_set(error, ENOTSUP,
diff --git a/drivers/net/intel/ipn3ke/ipn3ke_representor.c b/drivers/net/intel/ipn3ke/ipn3ke_representor.c
index 05aad6cd15..ee9a3844e3 100644
--- a/drivers/net/intel/ipn3ke/ipn3ke_representor.c
+++ b/drivers/net/intel/ipn3ke/ipn3ke_representor.c
@@ -672,7 +672,6 @@ uint32_t addr_hi, struct ipn3ke_hw *hw, uint16_t port_id)
statistics = statistics << IPN3KE_REGISTER_WIDTH;
statistics += statistics_lo;
return statistics;
-
}
static int
@@ -2587,8 +2586,6 @@ ipn3ke_rpst_scan_handle_request(__rte_unused void *param)
if (num == 0 || num == 0xffffff)
return 0;
}
-
- return 0;
}
static int
diff --git a/drivers/net/intel/ipn3ke/ipn3ke_tm.c b/drivers/net/intel/ipn3ke/ipn3ke_tm.c
index 47b7734d4f..166ada60b9 100644
--- a/drivers/net/intel/ipn3ke/ipn3ke_tm.c
+++ b/drivers/net/intel/ipn3ke/ipn3ke_tm.c
@@ -600,7 +600,6 @@ ipn3ke_tm_level_capabilities_get(struct rte_eth_dev *dev,
RTE_TM_ERROR_TYPE_LEVEL_ID,
NULL,
rte_strerror(EINVAL));
- break;
}
return 0;
diff --git a/drivers/net/mlx5/linux/mlx5_mp_os.c b/drivers/net/mlx5/linux/mlx5_mp_os.c
index ca7b1cfa97..9db9b61feb 100644
--- a/drivers/net/mlx5/linux/mlx5_mp_os.c
+++ b/drivers/net/mlx5/linux/mlx5_mp_os.c
@@ -59,7 +59,6 @@ mlx5_mp_os_handle_port_agnostic(const struct rte_mp_msg *mp_msg,
default:
return 1;
}
- return -1;
}
int
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 9cb7c59b83..9fdb0279ff 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -5015,7 +5015,6 @@ mlx5_flow_dv_convert_encap_data(const struct rte_flow_item *items, uint8_t *buf,
RTE_FLOW_ERROR_TYPE_ACTION,
(void *)items->type,
"unsupported item type");
- break;
}
temp_size += len;
}
diff --git a/drivers/net/mlx5/mlx5_flow_flex.c b/drivers/net/mlx5/mlx5_flow_flex.c
index baa5ddd977..f7f9ebb833 100644
--- a/drivers/net/mlx5/mlx5_flow_flex.c
+++ b/drivers/net/mlx5/mlx5_flow_flex.c
@@ -634,7 +634,6 @@ mlx5_flex_translate_next(struct mlx5_hca_flex_attr *attr,
return rte_flow_error_set
(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL,
"unsupported next protocol field mode (OFFSET)");
- break;
case FIELD_MODE_BITMASK:
return rte_flow_error_set
(error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, NULL,
diff --git a/drivers/net/mlx5/mlx5_flow_hw.c b/drivers/net/mlx5/mlx5_flow_hw.c
index 62482c911d..e2ed9c89fa 100644
--- a/drivers/net/mlx5/mlx5_flow_hw.c
+++ b/drivers/net/mlx5/mlx5_flow_hw.c
@@ -723,7 +723,6 @@ mlx5_flow_hw_action_flags_get(const struct rte_flow_action actions[],
default:
goto error;
}
- break;
case RTE_FLOW_ACTION_TYPE_DROP:
action_flags |= MLX5_FLOW_ACTION_DROP;
break;
diff --git a/drivers/net/sfc/sfc_mae.c b/drivers/net/sfc/sfc_mae.c
index b0e8b02b41..363bf45f42 100644
--- a/drivers/net/sfc/sfc_mae.c
+++ b/drivers/net/sfc/sfc_mae.c
@@ -4448,8 +4448,6 @@ sfc_mae_rule_parse_action_count(struct sfc_adapter *sa,
return sfc_mae_counter_add(sa, &counter_tmp, counterp);
- return 0;
-
fail_populate_count:
fail_more_than_one:
fail_no_service_core:
diff --git a/drivers/vdpa/ifc/ifcvf_vdpa.c b/drivers/vdpa/ifc/ifcvf_vdpa.c
index 508174ad39..835a1668d7 100644
--- a/drivers/vdpa/ifc/ifcvf_vdpa.c
+++ b/drivers/vdpa/ifc/ifcvf_vdpa.c
@@ -553,8 +553,6 @@ notify_relay(void *arg)
ifcvf_notify_queue(hw, qid);
}
}
-
- return 0;
}
static int
@@ -998,8 +996,6 @@ vring_relay(void *arg)
ifcvf_notify_queue(&internal->hw, qid);
}
}
-
- return 0;
}
static int
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_cthread.c b/drivers/vdpa/mlx5/mlx5_vdpa_cthread.c
index 84f611c1ab..978b1dce2a 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_cthread.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_cthread.c
@@ -225,7 +225,6 @@ mlx5_vdpa_c_thread_handle(void *arg)
rte_atomic_fetch_sub_explicit(task.remaining_cnt,
1, rte_memory_order_relaxed);
}
- return 0;
}
static void
diff --git a/drivers/vdpa/mlx5/mlx5_vdpa_event.c b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
index d18cf7d7e5..7deb429f2c 100644
--- a/drivers/vdpa/mlx5/mlx5_vdpa_event.c
+++ b/drivers/vdpa/mlx5/mlx5_vdpa_event.c
@@ -332,7 +332,6 @@ mlx5_vdpa_event_handle(void *arg)
}
mlx5_vdpa_timer_sleep(priv, max);
}
- return 0;
case MLX5_VDPA_EVENT_MODE_ONLY_INTERRUPT:
do {
virtq = mlx5_vdpa_event_wait(priv);
@@ -344,7 +343,6 @@ mlx5_vdpa_event_handle(void *arg)
pthread_mutex_unlock(&virtq->virtq_lock);
}
} while (1);
- return 0;
default:
return 0;
}
diff --git a/drivers/vdpa/nfp/nfp_vdpa.c b/drivers/vdpa/nfp/nfp_vdpa.c
index 76d7d616a6..8730398b7d 100644
--- a/drivers/vdpa/nfp/nfp_vdpa.c
+++ b/drivers/vdpa/nfp/nfp_vdpa.c
@@ -483,7 +483,6 @@ nfp_vdpa_stop(struct nfp_vdpa_dev *device,
rte_vhost_set_vring_base(vid, i,
vdpa_hw->vring[i].last_avail_idx,
vdpa_hw->vring[i].last_used_idx);
-
}
static int
@@ -635,8 +634,6 @@ nfp_vdpa_notify_epoll_wait(uint32_t queue_num,
nfp_vdpa_notify_queue(&device->hw, qid);
}
}
-
- return 0;
}
static uint32_t
@@ -841,8 +838,6 @@ nfp_vdpa_vring_epoll_wait(uint32_t queue_num,
}
}
}
-
- return 0;
}
static uint32_t
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 37/38] efd: mark configuration dependent vector selection
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (35 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 36/38] drivers: " Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 38/38] config: enable unreachable code detection Stephen Hemminger
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
The AVX2 and NEON lookup functions are only selected when
RTE_EFD_VALUE_NUM_BITS is large enough to make the vectorised
version worthwhile. That value is a user settable knob documented
in rte_efd.h as being between 1 and 32, and defaults to 8.
At the default the NEON comparison is false, so clang on Arm
reports the assignment as unreachable. The AVX2 comparison is true
at the default but would report the same on a build with
RTE_EFD_VALUE_NUM_BITS of 3 or less.
Parenthesizing the constant tells clang the comparison is
configuration dependent. A preprocessor guard would stop compiling
the selection in the default build, and the generated code is
unchanged either way.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
lib/efd/rte_efd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/efd/rte_efd.c b/lib/efd/rte_efd.c
index 9d5969e151..6c89d3dade 100644
--- a/lib/efd/rte_efd.c
+++ b/lib/efd/rte_efd.c
@@ -659,7 +659,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
* For less than 4 bits, scalar function performs better
* than vectorised version
*/
- if (RTE_EFD_VALUE_NUM_BITS > 3
+ if (RTE_EFD_VALUE_NUM_BITS > (3)
&& rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2)
&& rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_256)
table->lookup_fn = EFD_LOOKUP_AVX2;
@@ -670,7 +670,7 @@ rte_efd_create(const char *name, uint32_t max_num_rules, uint32_t key_len,
* For less than or equal to 16 bits, scalar function performs better
* than vectorised version
*/
- if (RTE_EFD_VALUE_NUM_BITS > 16 &&
+ if (RTE_EFD_VALUE_NUM_BITS > (16) &&
rte_cpu_get_flag_enabled(RTE_CPUFLAG_NEON) &&
rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128)
table->lookup_fn = EFD_LOOKUP_NEON;
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* [PATCH v2 38/38] config: enable unreachable code detection
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
` (36 preceding siblings ...)
2026-11-30 21:49 ` [PATCH v2 37/38] efd: mark configuration dependent vector selection Stephen Hemminger
@ 2026-11-30 21:49 ` Stephen Hemminger
37 siblings, 0 replies; 90+ messages in thread
From: Stephen Hemminger @ 2026-11-30 21:49 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
All the unreachable code reported by clang has been fixed, or
excluded in the drivers where it is in imported base code, so turn
the check on for the whole tree.
Use -Wunreachable-code-aggressive, which adds
-Wunreachable-code-break and -Wunreachable-code-return to the plain
check. Those two find the dead break after a return and the return
after a switch where every case returns.
Note that only clang implements these warnings. GCC rejects
-Wunreachable-code-aggressive and documents -Wunreachable-code as
doing nothing.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
config/meson.build | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/config/meson.build b/config/meson.build
index 9f501589b7..14c50b501f 100644
--- a/config/meson.build
+++ b/config/meson.build
@@ -338,6 +338,7 @@ global_cflags = [
'-Wsign-compare',
'-Wstrict-prototypes',
'-Wundef',
+ '-Wunreachable-code-aggressive',
'-Wwrite-strings',
# globally disabled warnings
@@ -372,8 +373,11 @@ if cc.has_argument('-Wno-shadow')
no_shadow_cflag = '-Wno-shadow'
endif
+# test the positive flag, GCC accepts any unknown -Wno-* option
no_unreachable_cflag = []
-if cc.has_argument('-Wunreachable-code')
+if cc.has_argument('-Wunreachable-code-aggressive')
+ no_unreachable_cflag = '-Wno-unreachable-code-aggressive'
+elif cc.has_argument('-Wunreachable-code')
no_unreachable_cflag = '-Wno-unreachable-code'
endif
--
2.53.0
^ permalink raw reply related [flat|nested] 90+ messages in thread
* Re: [PATCH v2 05/38] test/eal: skip filesystem test on FreeBSD
2026-11-30 21:49 ` [PATCH v2 05/38] test/eal: skip filesystem test on FreeBSD Stephen Hemminger
@ 2026-12-01 8:58 ` Bruce Richardson
0 siblings, 0 replies; 90+ messages in thread
From: Bruce Richardson @ 2026-12-01 8:58 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Mon, Nov 30, 2026 at 01:49:11PM -0800, Stephen Hemminger wrote:
> The eal_fs test needs /proc/self/fd to find the name of the
> temporary file it creates. FreeBSD does not have it, so the test
> returned early from inside test_parse_sysfs_value(), which clang
> reports as unreachable code for the rest of the function.
>
> Worse, returning zero reported the test as passing when it had not
> run at all.
>
> Build the skip stub on FreeBSD as well as Windows and return
> TEST_SKIPPED, which is what the rest of the file already does.
> This also removes the unreachable body rather than hiding it.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> app/test/test_eal_fs.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 90+ messages in thread
* Re: [PATCH v2 10/38] examples/skeleton: handle SIGINT and SIGTERM
2026-11-30 21:49 ` [PATCH v2 10/38] examples/skeleton: handle SIGINT and SIGTERM Stephen Hemminger
@ 2026-12-01 8:59 ` Bruce Richardson
0 siblings, 0 replies; 90+ messages in thread
From: Bruce Richardson @ 2026-12-01 8:59 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: dev
On Mon, Nov 30, 2026 at 01:49:16PM -0800, Stephen Hemminger wrote:
> The forwarding loop in lcore_main() never terminates, so the
> rte_eal_cleanup() and return in main() are unreachable. Clang
> reports this with -Wunreachable-code.
>
> Add a signal handler setting force_quit, as done by l2fwd and
> others, and test it in the loop. The function is no longer
> __rte_noreturn, so the existing cleanup now runs on exit.
>
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
> examples/skeleton/basicfwd.c | 18 ++++++++++++++++--
> 1 file changed, 16 insertions(+), 2 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
^ permalink raw reply [flat|nested] 90+ messages in thread
end of thread, other threads:[~2026-12-01 8:59 UTC | newest]
Thread overview: 90+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-29 20:48 [PATCH 00/45] remove unused internal symbols and dead code Stephen Hemminger
2026-11-29 20:48 ` [PATCH 01/45] bus/vmbus: do not export unused internal symbol Stephen Hemminger
2026-11-29 20:48 ` [PATCH 02/45] bus/dpaa: remove exports for nonexistent symbols Stephen Hemminger
2026-11-29 20:48 ` [PATCH 03/45] ethdev: do not export internal dummy ops Stephen Hemminger
2026-11-29 20:48 ` [PATCH 04/45] hash: do not export internal toeplitz helper Stephen Hemminger
2026-11-29 20:48 ` [PATCH 05/45] cryptodev: do not export internal device name helper Stephen Hemminger
2026-11-29 20:48 ` [PATCH 06/45] mldev: do not export internal PMD device helpers Stephen Hemminger
2026-11-29 20:48 ` [PATCH 07/45] gpudev: do not export unused internal functions Stephen Hemminger
2026-11-29 20:48 ` [PATCH 08/45] eal/linux: do not export internal VFIO helpers Stephen Hemminger
2026-11-29 20:48 ` [PATCH 09/45] eal/linux: remove unused VFIO device number helper Stephen Hemminger
2026-11-29 20:48 ` [PATCH 10/45] eal: make per-thread epoll instance getter static Stephen Hemminger
2026-11-29 20:48 ` [PATCH 11/45] bus: do not export unused driver unregister functions Stephen Hemminger
2026-11-29 20:48 ` [PATCH 12/45] bus/fslmc: do not export internal symbols used only in the bus Stephen Hemminger
2026-11-29 20:48 ` [PATCH 13/45] bus/dpaa: " Stephen Hemminger
2026-11-29 20:48 ` [PATCH 14/45] common/dpaax: do not export IOVA table dump helper Stephen Hemminger
2026-11-29 20:49 ` [PATCH 15/45] net/nfb: do not export MDIO speed capability helper Stephen Hemminger
2026-11-30 9:56 ` Martin Spinler
2026-11-29 20:49 ` [PATCH 16/45] common/sxe2: do not export internal ioctl channel helpers Stephen Hemminger
2026-11-29 20:49 ` [PATCH 17/45] common/mlx5: do not export internal symbols used only in common code Stephen Hemminger
2026-11-30 10:50 ` Dariusz Sosnowski
2026-11-29 20:49 ` [PATCH 18/45] net/idpf: do not export internal symbols used only in the driver Stephen Hemminger
2026-11-29 20:49 ` [PATCH 19/45] net/iavf: do not export VF reset function Stephen Hemminger
2026-11-29 20:49 ` [PATCH 20/45] eal: do not export unused Windows interrupt handle accessors Stephen Hemminger
2026-11-29 20:49 ` [PATCH 21/45] common/cnxk: do not export internal symbols used only in roc Stephen Hemminger
2026-11-29 20:49 ` [PATCH 22/45] common/sfc_efx: do not export internal symbols unused outside base Stephen Hemminger
2026-11-29 20:49 ` [PATCH 23/45] crypto/cnxk: do not export internal Rx inject helpers Stephen Hemminger
2026-11-29 20:49 ` [PATCH 24/45] net/cnxk: do not export inline inbound mode setter Stephen Hemminger
2026-11-29 20:49 ` [PATCH 25/45] common/sfc_efx: remove unused libefx functions Stephen Hemminger
2026-11-29 20:49 ` [PATCH 26/45] common/cnxk: remove unused roc functions Stephen Hemminger
2026-11-29 20:49 ` [PATCH 27/45] common/mlx5: remove unused internal functions Stephen Hemminger
2026-11-30 10:51 ` Dariusz Sosnowski
2026-11-29 20:49 ` [PATCH 28/45] bus/fslmc: remove unused VFIO helpers Stephen Hemminger
2026-11-29 20:49 ` [PATCH 29/45] bus/dpaa: remove unused FMan and netcfg helpers Stephen Hemminger
2026-11-29 20:49 ` [PATCH 30/45] common/dpaax: remove unused IOVA table dump Stephen Hemminger
2026-11-29 20:49 ` [PATCH 31/45] net/idpf: remove unused queue enable helper Stephen Hemminger
2026-11-29 20:49 ` [PATCH 32/45] gpudev: remove unused attach function Stephen Hemminger
2026-11-29 20:49 ` [PATCH 33/45] cryptodev: remove unused device name helper Stephen Hemminger
2026-11-29 20:49 ` [PATCH 34/45] common/cnxk: remove unused MCS port recovery Stephen Hemminger
2026-11-29 20:49 ` [PATCH 35/45] bus/dpaa: remove unused QMan and BMan functions Stephen Hemminger
2026-11-29 20:49 ` [PATCH 36/45] bus/fslmc: remove unused MC object functions Stephen Hemminger
2026-11-29 20:49 ` [PATCH 37/45] eal: remove unused Windows interrupt handle accessors Stephen Hemminger
2026-11-29 20:49 ` [PATCH 38/45] common/sfc_efx: make efx_family static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 39/45] gpudev: make event notify helper static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 40/45] mldev: make device lookup " Stephen Hemminger
2026-11-29 20:49 ` [PATCH 41/45] bus/fslmc: make internal helpers static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 42/45] net/cnxk: make inline inbound mode setter static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 43/45] common/sxe2: make memory event callback static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 44/45] net/idpf: make internal burst functions static Stephen Hemminger
2026-11-29 20:49 ` [PATCH 45/45] common/cnxk: make internal roc " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 00/38] enable unreachable code detection Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 01/38] net/mlx4: fix unreachable code warnings Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 02/38] net/mlx5: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 03/38] examples/ipsec-secgw: remove dead code Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 04/38] eventdev: fix vector adapter instance allocation Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 05/38] test/eal: skip filesystem test on FreeBSD Stephen Hemminger
2026-12-01 8:58 ` Bruce Richardson
2026-11-30 21:49 ` [PATCH v2 06/38] eal: silence unreachable code in version string Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 07/38] net/dpaa2: remove debug abort in flow destroy Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 08/38] app/testpmd: fix unreachable VF traffic error message Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 09/38] examples/eventdev_pipeline: remove dead continue Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 10/38] examples/skeleton: handle SIGINT and SIGTERM Stephen Hemminger
2026-12-01 8:59 ` Bruce Richardson
2026-11-30 21:49 ` [PATCH v2 11/38] examples/rxtx_callbacks: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 12/38] examples/service_cores: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 13/38] examples/timer: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 14/38] examples/multi_process: handle SIGINT and SIGTERM in client Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 15/38] examples/server_node_efd: handle SIGINT and SIGTERM in node Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 16/38] examples/pipeline: handle SIGINT and SIGTERM Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 17/38] ethdev: fix unreachable warnings from switch declarations Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 18/38] config: add per-directory option for -Wunreachable-code Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 19/38] bus/dpaa: exempt this driver from unreachable code detection Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 20/38] net/qede: disable unreachable code checks Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 21/38] net/txgbe: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 22/38] net/ixgbe: disable unreachable code check Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 23/38] net/ngbe: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 24/38] net/octeontx: replace unreachable code Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 25/38] common/sfc_efx: disable unreachable code check for base code Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 26/38] net/dpaa2: check port state before changing TM hierarchy Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 27/38] net/e1000: disable unreachable code check for base code Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 28/38] net/ice: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 29/38] raw/ifpga: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 30/38] net/bnxt: disable unreachable code check Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 31/38] net/ntnic: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 32/38] lib: mark never returning thread functions Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 33/38] lib: remove unreachable statements Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 34/38] app: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 35/38] examples: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 36/38] drivers: " Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 37/38] efd: mark configuration dependent vector selection Stephen Hemminger
2026-11-30 21:49 ` [PATCH v2 38/38] config: enable unreachable code detection Stephen Hemminger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox