cn10k-ipsec: Fix compilation error when CONFIG_XFRM_OFFLOAD disabled
authorBharat Bhushan <bbhushan2@marvell.com>
Wed, 11 Dec 2024 06:24:19 +0000 (11:54 +0530)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Dec 2024 04:11:53 +0000 (20:11 -0800)
Define static branch variable "cn10k_ipsec_sa_enabled"
in "otx2_txrx.c". This fixes below compilation error
when CONFIG_XFRM_OFFLOAD is disabled.

 drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.o:(__jump_table+0x8): undefined reference to `cn10k_ipsec_sa_enabled'
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.o:(__jump_table+0x18): undefined reference to `cn10k_ipsec_sa_enabled'
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.o:(__jump_table+0x28): undefined reference to `cn10k_ipsec_sa_enabled'

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202412110505.ZKDzGRMv-lkp@intel.com/
Fixes: 6a77a158848a ("cn10k-ipsec: Process outbound ipsec crypto offload")
Signed-off-by: Bharat Bhushan <bbhushan2@marvell.com>
Link: https://patch.msgid.link/20241211062419.2587111-1-bbhushan2@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c

index c333e04daad38670bb396753ca9a5d5bd99274a5..09a5b52682055fd8f10ff04de96d583f3876f079 100644 (file)
@@ -14,8 +14,6 @@
 #include "otx2_struct.h"
 #include "cn10k_ipsec.h"
 
-DEFINE_STATIC_KEY_FALSE(cn10k_ipsec_sa_enabled);
-
 static bool is_dev_support_ipsec_offload(struct pci_dev *pdev)
 {
        return is_dev_cn10ka_b0(pdev) || is_dev_cn10kb(pdev);
index 4e0133d1d8921925aa0d7be10c45afb467d3da08..224cef9389274d7b286ed122e6f79713d5a9a229 100644 (file)
@@ -27,6 +27,8 @@
  */
 #define PTP_SYNC_SEC_OFFSET    34
 
+DEFINE_STATIC_KEY_FALSE(cn10k_ipsec_sa_enabled);
+
 static bool otx2_xdp_rcv_pkt_handler(struct otx2_nic *pfvf,
                                     struct bpf_prog *prog,
                                     struct nix_cqe_rx_s *cqe,