Skip to content

Introduce macsec hardware offload for cn10k platform

Subbaraya Sundeep netdev 3 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 0 repliesApplied 8/8
  2. v28 patches 1 replySuperseded
  3. v18 patches 1 replySuperseded

Changes in v3 from the cover letter

Fixed clang and sparse warnings

Patches in v3 All 8 applied

#Subject and filesSizeRepliesApplied
1/8octeontx2-af: cn10k: Introduce driver for macsec block.drivers/net/ethernet/marvell/octeontx2/af/Makefile drivers/net/ethernet/marvell/octeontx2/af/mcs.c drivers/net/ethernet/marvell/octeontx2/af/mcs.h +5 more+678 -10 repliesApplied
2/8octeontx2-af: cn10k: mcs: Add mailboxes for port related operationsdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/mcs.c drivers/net/ethernet/marvell/octeontx2/af/mcs.h +2 more+376 -40 repliesApplied
3/8octeontx2-af: cn10k: mcs: Manage the MCS block hardware resourcesdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/mcs.c drivers/net/ethernet/marvell/octeontx2/af/mcs.h +3 more+1530 -10 repliesApplied
4/8octeontx2-af: cn10k: mcs: Install a default TCAM for normal trafficdrivers/net/ethernet/marvell/octeontx2/af/mcs.c drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h+69 -00 repliesApplied
5/8octeontx2-af: cn10k: mcs: Support for stats collectiondrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/mcs.c drivers/net/ethernet/marvell/octeontx2/af/mcs.h +3 more+1048 -00 repliesApplied
6/8octeontx2-af: cn10k: mcs: Handle MCS block interruptsdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/mcs.c drivers/net/ethernet/marvell/octeontx2/af/mcs.h +5 more+865 -120 repliesApplied
7/8octeontx2-af: cn10k: mcs: Add debugfs supportdrivers/net/ethernet/marvell/octeontx2/af/rvu.h drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c+350 -00 repliesApplied
8/8octeontx2-pf: mcs: Introduce MACSEC hardware offloadingdrivers/net/ethernet/marvell/octeontx2/nic/Makefile drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +2 more+1776 -00 repliesApplied

Reviews trailers per patch

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

Read the v3 thread

Cover letter [net-next PATCH v3 0/8] Introduce macsec hardware offload for cn10k platform

CN10K-B and CNF10K-B variaints of CN10K silicon has macsec block(MCS) to encrypt and decrypt packets at MAC/hardware level. This block is a global resource with hardware resources like SecYs, SCs and SAs and is in between NIX block and RPM LMAC. CN10K-B silicon has only one MCS block which receives packets from all LMACS whereas CNF10K-B has seven MCS blocks for seven LMACs. Both MCS blocks are similar in operation except for few register offsets and some configurations require writing to different registers. This patchset introduces macsec hardware offloading support. AF driver manages hardware resources and PF driver consumes them when macsec hardware offloading is needed.

Patch 1 adds basic pci driver for both CN10K-B and CNF10K-B silicons and initializes hardware block.
Patches 2 and 3 adds mailboxes to init, reset and manage resources of the MCS block
Patch 4 adds a low priority rule in MCS TCAM so that the traffic which do not need macsec processing can be sent/received Patch 5 adds macsec stats collection support
Patch 6 adds interrupt handling support and any event in which AF consumer is interested can be notified via mbox notification Patch 7 adds debugfs support which helps in debugging packet path
Patch 8 introduces macsec hardware offload feature for PF netdev driver.

v3 changes:
Fixed clang and sparse warnings

v2 changes:
Fix build error by changing #ifdef CONFIG_MACSEC to #if IS_ENABLED(CONFIG_MACSEC)

Thanks,
Sundeep

Geetha sowjanya (7):
octeontx2-af: cn10k: Introduce driver for macsec block.
octeontx2-af: cn10k: mcs: Add mailboxes for port related operations
octeontx2-af: cn10k: mcs: Manage the MCS block hardware resources
octeontx2-af: cn10k: mcs: Install a default TCAM for normal traffic
octeontx2-af: cn10k: mcs: Support for stats collection
octeontx2-af: cn10k: mcs: Handle MCS block interrupts
octeontx2-af: cn10k: mcs: Add debugfs support

Subbaraya Sundeep (1):
octeontx2-pf: mcs: Introduce MACSEC hardware offloading

 drivers/net/ethernet/marvell/octeontx2/af/Makefile |    2 +-
 drivers/net/ethernet/marvell/octeontx2/af/mbox.h   |  471 +++++-
 drivers/net/ethernet/marvell/octeontx2/af/mcs.c    | 1601 +++++++++++++++++++
 drivers/net/ethernet/marvell/octeontx2/af/mcs.h    |  246 +++
 .../ethernet/marvell/octeontx2/af/mcs_cnf10kb.c    |  214 +++
 .../net/ethernet/marvell/octeontx2/af/mcs_reg.h    | 1102 +++++++++++++
 .../net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c |  889 +++++++++++
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c    |   20 +-
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h    |   21 +
 .../ethernet/marvell/octeontx2/af/rvu_debugfs.c    |  346 ++++
 .../net/ethernet/marvell/octeontx2/nic/Makefile    |    1 +
 .../ethernet/marvell/octeontx2/nic/cn10k_macsec.c  | 1668 ++++++++++++++++++++
 .../ethernet/marvell/octeontx2/nic/otx2_common.c   |    1 +
 .../ethernet/marvell/octeontx2/nic/otx2_common.h   |   90 ++
 .../net/ethernet/marvell/octeontx2/nic/otx2_pf.c   |   16 +
 15 files changed, 6681 insertions(+), 7 deletions(-)
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mcs.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mcs.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mcs_cnf10kb.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mcs_reg.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mcs_rvu_if.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/nic/cn10k_macsec.c
Signature · 1 line
2.7.4