Skip to content

Commit

Permalink
cn10k-ipsec: Fix compilation error when CONFIG_XFRM_OFFLOAD disabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
Fixes: 6a77a15 ("cn10k-ipsec: Process outbound ipsec crypto offload")
Signed-off-by: Bharat Bhushan <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
Bharat Bhushan authored and kuba-moo committed Dec 12, 2024
1 parent 6757103 commit b82ca90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b82ca90

Please sign in to comment.