Skip to content

Commit 5375482

Browse files
drivers: rework symbol visibility
Signed-off-by: David Marchand <[email protected]>
1 parent f08210f commit 5375482

18 files changed

+953
-924
lines changed

Diff for: config/rte_export.h

+6-3
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@
99
* For RTE_EXPORT_EXPERIMENTAL_SYMBOL, ver indicates the
1010
* version this symbol was introduced in.
1111
*/
12-
#define RTE_EXPORT_EXPERIMENTAL_SYMBOL(a, ver)
13-
#define RTE_EXPORT_INTERNAL_SYMBOL(a)
14-
#define RTE_EXPORT_SYMBOL(a)
12+
#ifndef RTE_VISIBLE_SYMBOL
13+
#define RTE_VISIBLE_SYMBOL
14+
#endif
15+
#define RTE_EXPORT_EXPERIMENTAL_SYMBOL(a, ver) RTE_VISIBLE_SYMBOL
16+
#define RTE_EXPORT_INTERNAL_SYMBOL(a) RTE_VISIBLE_SYMBOL
17+
#define RTE_EXPORT_SYMBOL(a) RTE_VISIBLE_SYMBOL
1518

1619
#endif /* RTE_EXPORT_H */

Diff for: drivers/bus/dpaa/dpaa_bus.c

-95
Original file line numberDiff line numberDiff line change
@@ -870,98 +870,3 @@ static struct rte_dpaa_bus rte_dpaa_bus = {
870870

871871
RTE_REGISTER_BUS(FSL_DPAA_BUS_NAME, rte_dpaa_bus.bus);
872872
RTE_LOG_REGISTER_DEFAULT(dpaa_logtype_bus, NOTICE);
873-
874-
/* Export all base symbols */
875-
RTE_EXPORT_INTERNAL_SYMBOL(fman_ip_rev)
876-
RTE_EXPORT_INTERNAL_SYMBOL(fman_dealloc_bufs_mask_hi)
877-
RTE_EXPORT_INTERNAL_SYMBOL(fman_dealloc_bufs_mask_lo)
878-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_mcast_filter_table)
879-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_reset_mcast_filter_table)
880-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_clear_mac_addr)
881-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_add_mac_addr)
882-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_stats_get)
883-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_stats_get_all)
884-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_stats_reset)
885-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_bmi_stats_enable)
886-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_bmi_stats_disable)
887-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_bmi_stats_get_all)
888-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_bmi_stats_reset)
889-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_promiscuous_enable)
890-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_promiscuous_disable)
891-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_enable_rx)
892-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_disable_rx)
893-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_rx_status)
894-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_loopback_enable)
895-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_loopback_disable)
896-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_bp)
897-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fc_threshold)
898-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fc_threshold)
899-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fc_quanta)
900-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fc_quanta)
901-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fdoff)
902-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_err_fqid)
903-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_ic_params)
904-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fdoff)
905-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_maxfrm)
906-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_maxfrm)
907-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_sg_enable)
908-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_sg)
909-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_discard_rx_errors)
910-
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_receive_rx_errors)
911-
RTE_EXPORT_INTERNAL_SYMBOL(netcfg_acquire)
912-
RTE_EXPORT_INTERNAL_SYMBOL(netcfg_release)
913-
RTE_EXPORT_INTERNAL_SYMBOL(bman_new_pool)
914-
RTE_EXPORT_INTERNAL_SYMBOL(bman_free_pool)
915-
RTE_EXPORT_INTERNAL_SYMBOL(bman_get_params)
916-
RTE_EXPORT_INTERNAL_SYMBOL(bman_release)
917-
RTE_EXPORT_INTERNAL_SYMBOL(bman_acquire)
918-
RTE_EXPORT_INTERNAL_SYMBOL(bman_query_free_buffers)
919-
RTE_EXPORT_INTERNAL_SYMBOL(bman_thread_irq)
920-
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_fqid_range)
921-
RTE_EXPORT_INTERNAL_SYMBOL(qman_reserve_fqid_range)
922-
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_pool_range)
923-
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_cgrid_range)
924-
RTE_EXPORT_INTERNAL_SYMBOL(qman_release_cgrid_range)
925-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_intr_enable)
926-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_intr_disable)
927-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_ioctl_version_number)
928-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_link_status)
929-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_update_link_status)
930-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_update_link_speed)
931-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_restart_link_autoneg)
932-
RTE_EXPORT_INTERNAL_SYMBOL(qman_set_fq_lookup_table)
933-
RTE_EXPORT_INTERNAL_SYMBOL(qman_ern_register_cb)
934-
RTE_EXPORT_INTERNAL_SYMBOL(qman_ern_poll_free)
935-
RTE_EXPORT_INTERNAL_SYMBOL(qman_irqsource_add)
936-
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_portal_irqsource_add)
937-
RTE_EXPORT_INTERNAL_SYMBOL(qman_irqsource_remove)
938-
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_portal_irqsource_remove)
939-
RTE_EXPORT_INTERNAL_SYMBOL(qman_portal_poll_rx)
940-
RTE_EXPORT_INTERNAL_SYMBOL(qman_clear_irq)
941-
RTE_EXPORT_INTERNAL_SYMBOL(qman_portal_dequeue)
942-
RTE_EXPORT_INTERNAL_SYMBOL(qman_dequeue)
943-
RTE_EXPORT_INTERNAL_SYMBOL(qman_dqrr_consume)
944-
RTE_EXPORT_INTERNAL_SYMBOL(qman_static_dequeue_add)
945-
RTE_EXPORT_INTERNAL_SYMBOL(qman_dca_index)
946-
RTE_EXPORT_INTERNAL_SYMBOL(qman_create_fq)
947-
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_fqid)
948-
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_state)
949-
RTE_EXPORT_INTERNAL_SYMBOL(qman_init_fq)
950-
RTE_EXPORT_INTERNAL_SYMBOL(qman_retire_fq)
951-
RTE_EXPORT_INTERNAL_SYMBOL(qman_oos_fq)
952-
RTE_EXPORT_INTERNAL_SYMBOL(qman_query_fq_np)
953-
RTE_EXPORT_INTERNAL_SYMBOL(qman_query_fq_frm_cnt)
954-
RTE_EXPORT_INTERNAL_SYMBOL(qman_set_vdq)
955-
RTE_EXPORT_INTERNAL_SYMBOL(qman_volatile_dequeue)
956-
RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue)
957-
RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue_multi)
958-
RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue_multi_fq)
959-
RTE_EXPORT_INTERNAL_SYMBOL(qman_modify_cgr)
960-
RTE_EXPORT_INTERNAL_SYMBOL(qman_create_cgr)
961-
RTE_EXPORT_INTERNAL_SYMBOL(qman_delete_cgr)
962-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_qm_channel_caam)
963-
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_qm_channel_pool)
964-
RTE_EXPORT_INTERNAL_SYMBOL(qman_thread_fd)
965-
RTE_EXPORT_INTERNAL_SYMBOL(qman_thread_irq)
966-
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_portal_thread_irq)
967-
RTE_EXPORT_INTERNAL_SYMBOL(fsl_qman_fq_portal_create)

Diff for: drivers/bus/dpaa/dpaa_bus_symbols.c

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
/* SPDX-License-Identifier: BSD-3-Clause
2+
* Copyright (c) 2025 Red Hat, Inc.
3+
*/
4+
RTE_EXPORT_INTERNAL_SYMBOL(fman_ip_rev)
5+
RTE_EXPORT_INTERNAL_SYMBOL(fman_dealloc_bufs_mask_hi)
6+
RTE_EXPORT_INTERNAL_SYMBOL(fman_dealloc_bufs_mask_lo)
7+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_mcast_filter_table)
8+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_reset_mcast_filter_table)
9+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_clear_mac_addr)
10+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_add_mac_addr)
11+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_stats_get)
12+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_stats_get_all)
13+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_stats_reset)
14+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_bmi_stats_enable)
15+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_bmi_stats_disable)
16+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_bmi_stats_get_all)
17+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_bmi_stats_reset)
18+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_promiscuous_enable)
19+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_promiscuous_disable)
20+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_enable_rx)
21+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_disable_rx)
22+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_rx_status)
23+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_loopback_enable)
24+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_loopback_disable)
25+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_bp)
26+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fc_threshold)
27+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fc_threshold)
28+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fc_quanta)
29+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fc_quanta)
30+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_fdoff)
31+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_err_fqid)
32+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_ic_params)
33+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_fdoff)
34+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_maxfrm)
35+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_maxfrm)
36+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_get_sg_enable)
37+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_set_sg)
38+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_discard_rx_errors)
39+
RTE_EXPORT_INTERNAL_SYMBOL(fman_if_receive_rx_errors)
40+
RTE_EXPORT_INTERNAL_SYMBOL(netcfg_acquire)
41+
RTE_EXPORT_INTERNAL_SYMBOL(netcfg_release)
42+
RTE_EXPORT_INTERNAL_SYMBOL(bman_new_pool)
43+
RTE_EXPORT_INTERNAL_SYMBOL(bman_free_pool)
44+
RTE_EXPORT_INTERNAL_SYMBOL(bman_get_params)
45+
RTE_EXPORT_INTERNAL_SYMBOL(bman_release)
46+
RTE_EXPORT_INTERNAL_SYMBOL(bman_acquire)
47+
RTE_EXPORT_INTERNAL_SYMBOL(bman_query_free_buffers)
48+
RTE_EXPORT_INTERNAL_SYMBOL(bman_thread_irq)
49+
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_fqid_range)
50+
RTE_EXPORT_INTERNAL_SYMBOL(qman_reserve_fqid_range)
51+
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_pool_range)
52+
RTE_EXPORT_INTERNAL_SYMBOL(qman_alloc_cgrid_range)
53+
RTE_EXPORT_INTERNAL_SYMBOL(qman_release_cgrid_range)
54+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_intr_enable)
55+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_intr_disable)
56+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_ioctl_version_number)
57+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_link_status)
58+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_update_link_status)
59+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_update_link_speed)
60+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_restart_link_autoneg)
61+
RTE_EXPORT_INTERNAL_SYMBOL(qman_set_fq_lookup_table)
62+
RTE_EXPORT_INTERNAL_SYMBOL(qman_ern_register_cb)
63+
RTE_EXPORT_INTERNAL_SYMBOL(qman_ern_poll_free)
64+
RTE_EXPORT_INTERNAL_SYMBOL(qman_irqsource_add)
65+
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_portal_irqsource_add)
66+
RTE_EXPORT_INTERNAL_SYMBOL(qman_irqsource_remove)
67+
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_portal_irqsource_remove)
68+
RTE_EXPORT_INTERNAL_SYMBOL(qman_portal_poll_rx)
69+
RTE_EXPORT_INTERNAL_SYMBOL(qman_clear_irq)
70+
RTE_EXPORT_INTERNAL_SYMBOL(qman_portal_dequeue)
71+
RTE_EXPORT_INTERNAL_SYMBOL(qman_dequeue)
72+
RTE_EXPORT_INTERNAL_SYMBOL(qman_dqrr_consume)
73+
RTE_EXPORT_INTERNAL_SYMBOL(qman_static_dequeue_add)
74+
RTE_EXPORT_INTERNAL_SYMBOL(qman_dca_index)
75+
RTE_EXPORT_INTERNAL_SYMBOL(qman_create_fq)
76+
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_fqid)
77+
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_state)
78+
RTE_EXPORT_INTERNAL_SYMBOL(qman_init_fq)
79+
RTE_EXPORT_INTERNAL_SYMBOL(qman_retire_fq)
80+
RTE_EXPORT_INTERNAL_SYMBOL(qman_oos_fq)
81+
RTE_EXPORT_INTERNAL_SYMBOL(qman_query_fq_np)
82+
RTE_EXPORT_INTERNAL_SYMBOL(qman_query_fq_frm_cnt)
83+
RTE_EXPORT_INTERNAL_SYMBOL(qman_set_vdq)
84+
RTE_EXPORT_INTERNAL_SYMBOL(qman_volatile_dequeue)
85+
RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue)
86+
RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue_multi)
87+
RTE_EXPORT_INTERNAL_SYMBOL(qman_enqueue_multi_fq)
88+
RTE_EXPORT_INTERNAL_SYMBOL(qman_modify_cgr)
89+
RTE_EXPORT_INTERNAL_SYMBOL(qman_create_cgr)
90+
RTE_EXPORT_INTERNAL_SYMBOL(qman_delete_cgr)
91+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_qm_channel_caam)
92+
RTE_EXPORT_INTERNAL_SYMBOL(dpaa_get_qm_channel_pool)
93+
RTE_EXPORT_INTERNAL_SYMBOL(qman_thread_fd)
94+
RTE_EXPORT_INTERNAL_SYMBOL(qman_thread_irq)
95+
RTE_EXPORT_INTERNAL_SYMBOL(qman_fq_portal_thread_irq)
96+
RTE_EXPORT_INTERNAL_SYMBOL(fsl_qman_fq_portal_create)

Diff for: drivers/bus/dpaa/meson.build

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ sources = files(
2121
'dpaa_bus.c',
2222
)
2323

24+
exported_symbol_source = files('dpaa_bus_symbols.c')
25+
2426
if cc.has_argument('-Wno-cast-qual')
2527
cflags += '-Wno-cast-qual'
2628
endif

Diff for: drivers/common/cnxk/meson.build

+2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ sources += files('cnxk_telemetry_bphy.c',
9595

9696
cflags += no_wvla_cflag
9797

98+
exported_symbol_source = files('roc_platform_symbols.c')
99+
98100
if meson.is_cross_build()
99101
soc_type = meson.get_external_property('platform', '')
100102
else

0 commit comments

Comments
 (0)