octeontx2: remove unneeded symbol exports
Subsystems (4)
Jakub Kicinski
maintainerPATCH 1/1 octeontx2: remove unneeded symbol exports
octeontx2 has a bunch of symbols not used outside the module which defines them. Worse, still the macro which defines otx2_mbox_up_handler_* adds exports for all the functions. Remove all the explicit exports and the auto-export from that macro.
otx2_mbox_up_handler_cgx_link_event was exported by the macro and is genuienly called from the VF driver, so add an export.
---
cc: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
--- drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c | 1 - drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 8 +------- drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 5 ----- drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c | 3 --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 1 - 6 files changed, 2 insertions(+), 18 deletions(-)
drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c +0 -1
@@ -18,4 +18,3 @@ int rvu_mbox_handler_npa_cn20k_aq_enq(struct rvu *rvu,return rvu_npa_aq_enq_inst (rvu, (struct npa_aq_enq_req *)req, (struct npa_aq_enq_rsp *)rsp); } -EXPORT_SYMBOL (rvu_mbox_handler_npa_cn20k_aq_enq);
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +1 -7
@@ -732,7 +732,6 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, int prio, bool txschq_forreturn otx2_sync_mbox_msg (&pfvf->mbox); } -EXPORT_SYMBOL (otx2_txschq_config);int otx2_smq_flush (struct otx2_nic *pfvf,int smq) {
@@ -756,7 +755,6 @@ int otx2_smq_flush(struct otx2_nic *pfvf, int smq)mutex_unlock (&pfvf->mbox.lock);return rc; } -EXPORT_SYMBOL (otx2_smq_flush);int otx2_txsch_alloc (struct otx2_nic *pfvf) {
@@ -828,7 +826,6 @@ void otx2_txschq_free_one(struct otx2_nic *pfvf, u16 lvl, u16 schq)mutex_unlock (&pfvf->mbox.lock); } -EXPORT_SYMBOL (otx2_txschq_free_one);void otx2_txschq_stop (struct otx2_nic *pfvf) {
@@ -1838,7 +1835,6 @@ int otx2_nix_config_bp(struct otx2_nic *pfvf, bool enable)return otx2_sync_mbox_msg (&pfvf->mbox); } -EXPORT_SYMBOL (otx2_nix_config_bp);int otx2_nix_cpt_config_bp (struct otx2_nic *pfvf,bool enable) {
@@ -1863,7 +1859,6 @@ int otx2_nix_cpt_config_bp(struct otx2_nic *pfvf, bool enable)return otx2_sync_mbox_msg (&pfvf->mbox); } -EXPORT_SYMBOL (otx2_nix_cpt_config_bp);/* Mbox message handlers */ void mbox_handler_cgx_stats(struct otx2_nic *pfvf,
@@ -2110,8 +2105,7 @@ otx2_mbox_up_handler_ ## _fn_name(struct otx2_nic *pfvf, \ { \/* Nothing to do here */ \return 0 ; \ -} \ -EXPORT_SYMBOL(otx2_mbox_up_handler_ ## _fn_name); +}MBOX_UP_CGX_MESSAGES MBOX_UP_MCS_MESSAGES#undef M
drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c +0 -5
@@ -54,7 +54,6 @@ int otx2_pfc_txschq_config(struct otx2_nic *pfvf)return 0 ; } -EXPORT_SYMBOL (otx2_pfc_txschq_config);static int otx2_pfc_txschq_alloc_one (struct otx2_nic *pfvf,u8 prio) {
@@ -123,7 +122,6 @@ int otx2_pfc_txschq_alloc(struct otx2_nic *pfvf)return 0 ; } -EXPORT_SYMBOL (otx2_pfc_txschq_alloc);static int otx2_pfc_txschq_stop_one (struct otx2_nic *pfvf,u8 prio) {
@@ -262,7 +260,6 @@ int otx2_pfc_txschq_update(struct otx2_nic *pfvf)return 0 ; } -EXPORT_SYMBOL (otx2_pfc_txschq_update);int otx2_pfc_txschq_stop (struct otx2_nic *pfvf) {
@@ -285,7 +282,6 @@ int otx2_pfc_txschq_stop(struct otx2_nic *pfvf)return 0 ; } -EXPORT_SYMBOL (otx2_pfc_txschq_stop);int otx2_config_priority_flow_ctrl (struct otx2_nic *pfvf) {
@@ -395,7 +391,6 @@ void otx2_update_bpid_in_rqctx(struct otx2_nic *pfvf, int vlan_prio, int qidx,"Updating BPIDs in CQ and Aura contexts of RQ%d failed with err %d\n" , qidx, err); } -EXPORT_SYMBOL (otx2_update_bpid_in_rqctx);static int otx2_dcbnl_ieee_getpfc (struct net_device *dev,struct ieee_pfc *pfc) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +0 -3
@@ -281,7 +281,6 @@ int otx2_alloc_mcam_entries(struct otx2_nic *pfvf, u16 count) count, allocated);return allocated; } -EXPORT_SYMBOL (otx2_alloc_mcam_entries);int otx2_mcam_entry_init (struct otx2_nic *pfvf) {
@@ -420,7 +419,6 @@ int otx2_mcam_entry_init(struct otx2_nic *pfvf)refcount_set (&flow_cfg->mark_flows,1 );return 0 ; } -EXPORT_SYMBOL (otx2_mcam_entry_init);/* TODO : revisit on size */ #define OTX2_DMAC_FLTR_BITMAP_SZ (4 * 2048 + 32)
@@ -654,7 +652,6 @@ int otx2_get_maxflows(struct otx2_flow_config *flow_cfg)else return flow_cfg->max_flows; } -EXPORT_SYMBOL (otx2_get_maxflows);int otx2_get_flow (struct otx2_nic *pfvf,struct ethtool_rxnfc *nfc,u32 location)
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +1 -1
@@ -959,6 +959,7 @@ int otx2_mbox_up_handler_cgx_link_event(struct otx2_nic *pf,otx2_handle_link_event (pf);return 0 ; } +EXPORT_SYMBOL (otx2_mbox_up_handler_cgx_link_event);static int otx2_process_mbox_msg_up (struct otx2_nic *pf,struct mbox_msghdr *req)
@@ -3102,7 +3103,6 @@ int otx2_realloc_msix_vectors(struct otx2_nic *pf)return otx2_register_mbox_intr (pf, false); } -EXPORT_SYMBOL (otx2_realloc_msix_vectors);static int otx2_sriov_vfcfg_init (struct otx2_nic *pf) {
drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c +0 -1
@@ -1675,4 +1675,3 @@ void otx2_tc_apply_ingress_police_rules(struct otx2_nic *nic)otx2_tc_config_ingress_rule (nic, node); } } -EXPORT_SYMBOL (otx2_tc_apply_ingress_police_rules);
Signature · 1 line
2.55.0
Quoted 7 lines · Jakub Kicinski
octeontx2 has a bunch of symbols not used outside the module which defines them. Worse, still the macro which defines otx2_mbox_up_handler_* adds exports for all the functions. Remove all the explicit exports and the auto-export from that macro.
otx2_mbox_up_handler_cgx_link_eventwas exported by the macro and is genuienly called from the VF driver, so add an export.
Looks good:
Sunil Kovvuri Goutham
maintainerQuoted 32 lines
-----Original Message-----
From: Christoph Hellwig <[email protected]>
Sent: Monday, September 28, 2026 10:46 AM
To: Jakub Kicinski <[email protected]>
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Sunil Kovvuri Goutham <[email protected]>; Ratheesh Kannoth <[email protected]>; Geethasowjanya Akula <[email protected]>; Subbaraya Sundeep Bhatta <[email protected]>; Bharat Bhushan <[email protected]>; Linu Cherian <[email protected]>
Subject: [EXTERNAL] Re: [PATCH net-next] octeontx2: remove unneeded symbol exportsOn Fri, Sep 25, 2026 at 01: 10: 42PM -0700, Jakub Kicinski wrote: > octeontx2 has a bunch of symbols not used outside the module which > defines them. Worse, still the macro which defines otx2_mbox_up_handler_* > adds exports for all ZjQcmQRYFpfptBannerStart Prioritize security for external emails:
Confirm sender and content safety before clicking links or opening attachments
<https://us-phishalarm-
ewt.proofpoint.com/EWT/v1/CRVmXkqW!tC3TvbSULN8QXI82c3J5woPk8U9GSgX _IImdOsjuS-wLTQVkWHRJomLR0GEOtLTcAXAidS3rNNjN$>
Report SuspiciousZjQcmQRYFpfptBannerEnd
Quoted 5 lines · Jakub Kicinski
octeontx2 has a bunch of symbols not used outside the module which defines them. Worse, still the macro which defines otx2_mbox_up_handler_* adds exports for all the functions. Remove all the explicit exports and the auto-export from that macro.
Quoted 6 lines
Quoted 2 lines
otx2_mbox_up_handler_cgx_link_eventwas exported by the macro and is genuienly called from the VF driver, so add an export.Looks good:
Reviewed-by Christoph Hellwig <[email protected]>
Thanks for the patch.
We will verify this on our side and respond by tomorrow.
Regards,
Sunil.
Quoted 207 lines
-----Original Message-----
From: Jakub Kicinski <[email protected]>
Sent: Saturday, September 26, 2026 1:41 AM
To: [email protected]
Cc: [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; Jakub Kicinski <[email protected]>; [email protected]; Sunil Kovvuri Goutham <[email protected]>; Ratheesh Kannoth <[email protected]>; Geethasowjanya Akula <[email protected]>; Subbaraya Sundeep Bhatta <[email protected]>; Bharat Bhushan <[email protected]>; Linu Cherian <[email protected]>
Subject: [EXTERNAL] [PATCH net-next] octeontx2: remove unneeded symbol exportsocteontx2 has a bunch of symbols not used outside the module which defines them. Worse, still the macro which defines otx2_mbox_up_handler_* adds exports for all the functions. Remove all the explicit exports and the auto- export from that macro.
otx2_mbox_up_handler_cgx_link_eventwas exported by the macro and is genuienly called from the VF driver, so add an export.Link:
https://urldefense.com/v3/__https://lore.kernel.org/arYYTw8l90VNnKal@infra
dead.org__;!!CRVmXkqW!QDWaHkW3mCorD0r3DGd7L13uExouH8Qz06AT- 2bs1bko5FfLO4eqdtgiJKQR1x1i5BQEsZtpqMQ$Signed-off-by Jakub Kicinski <[email protected]>---
cc: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
CC: [email protected]
---drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c | 1 - drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 8 +------- drivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c | 5 ----- drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c | 3 --- drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c | 2 +- drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c | 1 - 6 files changed, 2 insertions(+), 18 deletions(-)drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c +0
-0@@ -18,4 +18,3 @@ int rvu_mbox_handler_npa_cn20k_aq_enq(struct rvu *rvu, return rvu_npa_aq_enq_inst(rvu, (struct npa_aq_enq_req *)req, (struct npa_aq_enq_rsp *)rsp);}
drivers/net/ethernet/marvell/octeontx2/af/cn20k/npa.c +0
-1-EXPORT_SYMBOL (rvu_mbox_handler_npa_cn20k_aq_enq);drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +0
-0@@ -732,7 +732,6 @@ int otx2_txschq_config(struct otx2_nic *pfvf, int lvl, intprio, bool
txschq_forreturn otx2_sync_mbox_msg(&pfvf->mbox); } -
EXPORT_SYMBOL(otx2_txschq_config);int
otx2_smq_flush(struct otx2_nic *pfvf, int smq){ @@ -756,7 +755,6 @@ intotx2_smq_flush(struct otx2_nic *pfvf, int smq)mutex_unlock(&pfvf->mbox.lock); return rc; }-EXPORT_SYMBOL(otx2_smq_flush);
int
otx2_txsch_alloc(struct otx2_nic *pfvf){ @@ -828,7 +826,6 @@ voidotx2_txschq_free_one(struct otx2_nic *pfvf, u16 lvl, u16 schq)mutex_unlock(&pfvf->mbox.lock); }-EXPORT_SYMBOL(otx2_txschq_free_one);
void
otx2_txschq_stop(struct otx2_nic *pfvf){ @@ -1838,7 +1835,6 @@ intotx2_nix_config_bp(struct otx2_nic *pfvf, bool enable)return otx2_sync_mbox_msg(&pfvf->mbox); } -
EXPORT_SYMBOL(otx2_nix_config_bp);int
otx2_nix_cpt_config_bp(struct otx2_nic *pfvf, bool enable){ @@ -1863,7 +1859,6 @@ intotx2_nix_cpt_config_bp(struct otx2_nic *pfvf, bool enable)return otx2_sync_mbox_msg(&pfvf->mbox); } -
EXPORT_SYMBOL(otx2_nix_cpt_config_bp);/* Mbox message handlers */
void mbox_handler_cgx_stats(structotx2_nic*pfvf,drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +1
-2@@ -2110,8 +2105,7 @@ otx2_mbox_up_handler_ ## _fn_name(struct otx2_nic *pfvf, \ { \/* Nothing to do here */ \return 0 ; \ -} \ -EXPORT_SYMBOL(otx2_mbox_up_handler_ ## _fn_name); +}
MBOX_UP_CGX_MESSAGESMBOX_UP_MCS_MESSAGES
#undef Mdrivers/net/ethernet/marvell/octeontx2/nic/otx2_dcbnl.c +0
-1@@ -54,7 +54,6 @@ int otx2_pfc_txschq_config(struct otx2_nic *pfvf)return 0 ; } -EXPORT_SYMBOL (otx2_pfc_txschq_config);static int
otx2_pfc_txschq_alloc_one(struct otx2_nic *pfvf, u8 prio){ @@ - 123,7 +122,6 @@ intotx2_pfc_txschq_alloc(struct otx2_nic *pfvf)return 0; }-EXPORT_SYMBOL(otx2_pfc_txschq_alloc);
static int
otx2_pfc_txschq_stop_one(struct otx2_nic *pfvf, u8 prio){ @@ - 262,7 +260,6 @@ intotx2_pfc_txschq_update(struct otx2_nic *pfvf)return 0; }-EXPORT_SYMBOL(otx2_pfc_txschq_update);
int
otx2_pfc_txschq_stop(struct otx2_nic *pfvf){ @@ -285,7 +282,6 @@ intotx2_pfc_txschq_stop(struct otx2_nic *pfvf)return 0; }-EXPORT_SYMBOL(otx2_pfc_txschq_stop);
int
otx2_config_priority_flow_ctrl(struct otx2_nic *pfvf){ @@ -395,7 +391,6 @@ void otx2_update_bpid_in_rqctx(structotx2_nic*pfvf, intvlan_prio, int qidx,
"Updating BPIDs in CQ and Aura contexts of RQ%d
failed with err %d\n",qidx, err); }-EXPORT_SYMBOL(otx2_update_bpid_in_rqctx);
static int
otx2_dcbnl_ieee_getpfc(struct net_device *dev, struct ieee_pfc *pfc){drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c +0
-1@@ -281,7 +281,6 @@ int otx2_alloc_mcam_entries(struct otx2_nic *pfvf, u16 count) count, allocated);return allocated; } -EXPORT_SYMBOL (otx2_alloc_mcam_entries);int
otx2_mcam_entry_init(struct otx2_nic *pfvf){ @@ -420,7 +419,6 @@ intotx2_mcam_entry_init(struct otx2_nic *pfvf)refcount_set(&flow_cfg->mark_flows, 1); return 0; }-EXPORT_SYMBOL(otx2_mcam_entry_init);
/* TODO : revisit on size */
#defineOTX2_DMAC_FLTR_BITMAP_SZ(4 * 2048 + 32) @@ -654,7 +652,6 @@ intotx2_get_maxflows(struct otx2_flow_config *flow_cfg)else return flow_cfg->max_flows; }-EXPORT_SYMBOL(otx2_get_maxflows);
int otx2_get_flow(struct
otx2_nic*pfvf, structethtool_rxnfc*nfc,
u32 location)drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +1
-0@@ -959,6 +959,7 @@ int otx2_mbox_up_handler_cgx_link_event(structotx2_nic *pf,otx2_handle_link_event (pf );return 0 ; } +EXPORT_SYMBOL (otx2_mbox_up_handler_cgx_link_event); static int otx2_process_mbox_msg_up(struct otx2_nic *pf,struct
mbox_msghdr*req)drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +0
-0@@ -3102,7 +3103,6 @@ int otx2_realloc_msix_vectors(struct otx2_nic *pf)return otx2_register_mbox_intr (pf, false); } -EXPORT_SYMBOL (otx2_realloc_msix_vectors);static int
otx2_sriov_vfcfg_init(struct otx2_nic *pf){ diff --gita/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.cb/drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.cindex039fd47ebf52..dee38d5c7f65100644drivers/net/ethernet/marvell/octeontx2/nic/otx2_tc.c +0
-0@@ -1675,4 +1675,3 @@ void otx2_tc_apply_ingress_police_rules(struct otx2_nic *nic)otx2_tc_config_ingress_rule (nic ,node ); }
Quoted 4 lines
} -EXPORT_SYMBOL(otx2_tc_apply_ingress_police_rules); --
2.55.0
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 9 lines · On Fri, 25 Sep 2026 13:10:42 -0700 you wrote:
octeontx2 has a bunch of symbols not used outside the module which defines them. Worse, still the macro which defines otx2_mbox_up_handler_* adds exports for all the functions. Remove all the explicit exports and the auto-export from that macro.
otx2_mbox_up_handler_cgx_link_eventwas exported by the macro and is genuienly called from the VF driver, so add an export.[...]
Here is the summary with links:
- [net-next] octeontx2: remove unneeded symbol exports
https://git.kernel.org/netdev/net-next/c/3e6a0e83c913
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html