Skip to content

Enable Inbound IPsec offload on Marvell CN10K SoC

Tanmay Jagdale linux-crypto netdev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest15 patches 8 repliesIn review
  2. v414 patches 0 repliesSuperseded
  3. v314 patches 2 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v214 patches8 repliesSuperseded
v115 patches23 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15crypto: octeontx2: Share engine group info with AF driverdrivers/crypto/marvell/octeontx2/otx2_cpt_common.h drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c +5 more+160 -182 replies
2/15octeontx2-af: Configure crypto hardware for inline ipsecdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h +4 more+700 -40 replies
3/15octeontx2-af: Setup Large Memory Transaction for cryptodrivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c +1 more+63 -00 replies
4/15octeontx2-af: Handle inbound inline ipsec config in AFdrivers/crypto/marvell/octeontx2/otx2_cpt_common.h drivers/crypto/marvell/octeontx2/otx2_cptpf.h drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c +5 more+34 -3900 replies
5/15octeontx2-af: Add support for CPT second passdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/rvu.h drivers/net/ethernet/marvell/octeontx2/af/rvu_cn10k.c +3 more+184 -12 replies
6/15octeontx2-af: Add support for SPI to SA index translationdrivers/net/ethernet/marvell/octeontx2/af/Makefile drivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/rvu.c +4 more+270 -10 replies
7/15octeontx2-af: Add mbox to alloc/free BPIDsdrivers/net/ethernet/marvell/octeontx2/af/common.h drivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c+127 -00 replies
8/15octeontx2-pf: ipsec: Setup NIX HW resources for inbound flowsdrivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.h drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +2 more+259 -342 replies
9/15octeontx2-pf: ipsec: Allocate Ingress SA tabledrivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.h+113 -20 replies
10/15octeontx2-pf: ipsec: Handle NPA threshold interruptdrivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.h drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c +2 more+126 -10 replies
11/15octeontx2-pf: ipsec: Initialize ingress IPsecdrivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c+130 -00 replies
12/15octeontx2-pf: ipsec: Configure backpressuredrivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.h +1 more+185 -30 replies
13/15octeontx2-pf: ipsec: Process CPT metapacketsdrivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.h drivers/net/ethernet/marvell/octeontx2/nic/otx2_struct.h +1 more+119 -10 replies
14/15octeontx2-pf: ipsec: Manage NPC rules and SPI-to-SA table entriesdrivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.h drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c+262 -50 replies
15/15octeontx2-pf: ipsec: Add XFRM state and policy hooks for inbound flowsdrivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.c drivers/net/ethernet/marvell/octeontx2/nic/cn10k_ipsec.h+379 -232 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

Cover letter [PATCH net-next v5 00/15] Enable Inbound IPsec offload on Marvell CN10K SoC

This patch series adds support for IPsec packet offload for the Marvell CN10K SoC.

The packet flow
---------------
An encrypted IPSec packet goes through two passes in the RVU hardware before reaching the CPU.
First Pass:
The first pass involves identifying the packet as IPSec, assigning an RQ, allocating a buffer from the Aura pool and then send it to CPT for decryption.

Second Pass:
After CPT decrypts the packet, it sends a metapacket to NIXRX via the X2P bus. The metapacket contains CPT_PARSE_HDR_S structure and some initial bytes of the decrypted packet which would help NIXRX in classification. CPT also sets BIT(11) of channel number to further help in identification. NIXRX allocates a new buffer for this packet and submits it to the CPU.

Once the decrypted metapacket packet is delivered to the CPU, get the WQE pointer from CPT_PARSE_HDR_S in the packet buffer. This WQE points to the complete decrypted packet. We create an skb using this, set the relevant XFRM packet mode flags to indicate successful decryption, and submit it to the network stack.

Bharat Bhushan (4):
crypto: octeontx2: Share engine group info with AF driver
octeontx2-af: Configure crypto hardware for inline ipsec
octeontx2-af: Setup Large Memory Transaction for crypto
octeontx2-af: Handle inbound inline ipsec config in AF

Geetha sowjanya (1):
octeontx2-af: Add mbox to alloc/free BPIDs

Kiran Kumar K (1):
octeontx2-af: Add support for SPI to SA index translation

Rakesh Kudurumalla (1):
octeontx2-af: Add support for CPT second pass

Tanmay Jagdale (8):
octeontx2-pf: ipsec: Setup NIX HW resources for inbound flows
octeontx2-pf: ipsec: Allocate Ingress SA table
octeontx2-pf: ipsec: Handle NPA threshold interrupt
octeontx2-pf: ipsec: Initialize ingress IPsec
octeontx2-pf: ipsec: Configure backpressure
octeontx2-pf: ipsec: Process CPT metapackets
octeontx2-pf: ipsec: Manage NPC rules and SPI-to-SA table entries
octeontx2-pf: ipsec: Add XFRM state and policy hooks for inbound flows

 .../marvell/octeontx2/otx2_cpt_common.h       |    8 -
 drivers/crypto/marvell/octeontx2/otx2_cptpf.h |   10 -
 .../marvell/octeontx2/otx2_cptpf_main.c       |   50 +-
 .../marvell/octeontx2/otx2_cptpf_mbox.c       |  282 +---
 .../marvell/octeontx2/otx2_cptpf_ucode.c      |  116 +-
 .../marvell/octeontx2/otx2_cptpf_ucode.h      |    3 +-
 .../ethernet/marvell/octeontx2/af/Makefile    |    2 +-
 .../ethernet/marvell/octeontx2/af/common.h    |    1 +
 .../net/ethernet/marvell/octeontx2/af/mbox.c  |    3 -
 .../net/ethernet/marvell/octeontx2/af/mbox.h  |  119 +-
 .../net/ethernet/marvell/octeontx2/af/rvu.c   |    8 +-
 .../net/ethernet/marvell/octeontx2/af/rvu.h   |   71 +
 .../ethernet/marvell/octeontx2/af/rvu_cn10k.c |   11 +
 .../ethernet/marvell/octeontx2/af/rvu_cpt.c   |  708 ++++++++-
 .../ethernet/marvell/octeontx2/af/rvu_cpt.h   |   71 +
 .../ethernet/marvell/octeontx2/af/rvu_nix.c   |  235 ++-
 .../marvell/octeontx2/af/rvu_nix_spi.c        |  211 +++
 .../ethernet/marvell/octeontx2/af/rvu_reg.h   |   40 +
 .../marvell/octeontx2/af/rvu_struct.h         |    4 +-
 .../marvell/octeontx2/nic/cn10k_ipsec.c       | 1357 ++++++++++++++++-
 .../marvell/octeontx2/nic/cn10k_ipsec.h       |  140 ++
 .../marvell/octeontx2/nic/otx2_common.c       |   26 +-
 .../marvell/octeontx2/nic/otx2_common.h       |   16 +
 .../ethernet/marvell/octeontx2/nic/otx2_pf.c  |   21 +
 .../ethernet/marvell/octeontx2/nic/otx2_reg.h |   18 +
 .../marvell/octeontx2/nic/otx2_struct.h       |   16 +
 .../marvell/octeontx2/nic/otx2_txrx.c         |   31 +-
 .../ethernet/marvell/octeontx2/nic/otx2_vf.c  |    4 +
 28 files changed, 3105 insertions(+), 477 deletions(-)
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_nix_spi.c
Signature · 1 line
2.43.0