Skip to content

octeontx2-af: Add RVU Admin Function driver

[email protected] netdev 8 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest15 patches 4 repliesIn review
  2. v815 patches 16 repliesSuperseded
  3. v715 patches 3 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v615 patches2 repliesSuperseded
v515 patches2 repliesSuperseded
v315 patches4 repliesSuperseded
v215 patches2 repliesSuperseded
v115 patches29 repliesSuperseded

Changes in v9 from the cover letter

1 Removed unnecessary typecasts in entire series
- Suggested by David Miller
2 Added COMPILE_TEST to AF driver
- Suggested by Arnd Bergmann
3 Changed udelay() to usleep_range() in rvu_poll_reg
- Suggested by Arnd Bergmann
4 MSIX vector base IOMMU mapping is done using dma_map_resource()
API instead of dma_map_single() as it accepts physical address.
- Issue pointed by Arnd Bergmann

Patches in v9 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15octeontx2-af: Add Marvell OcteonTX2 RVU AF driverdrivers/net/ethernet/marvell/Kconfig drivers/net/ethernet/marvell/Makefile drivers/net/ethernet/marvell/octeontx2/Kconfig +4 more+188 -00 replies
2/15octeontx2-af: Reset all RVU blocksdrivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h +1 more+260 -01 reply
3/15octeontx2-af: Gather RVU blocks HW infodrivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h+517 -40 replies
4/15octeontx2-af: Add mailbox support infradrivers/net/ethernet/marvell/octeontx2/Kconfig drivers/net/ethernet/marvell/octeontx2/af/Makefile drivers/net/ethernet/marvell/octeontx2/af/mbox.c +2 more+455 -00 replies
5/15octeontx2-af: Add mailbox IRQ and msg handlersdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 more+309 -30 replies
6/15octeontx2-af: Convert mbox msg id check to a macrodrivers/net/ethernet/marvell/octeontx2/af/rvu.c+38 -60 replies
7/15octeontx2-af: Scan blocks for LFs provisioned to PF/VFdrivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h drivers/net/ethernet/marvell/octeontx2/af/rvu_struct.h+178 -20 replies
8/15octeontx2-af: Add RVU block LF provisioning supportdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 more+523 -100 replies
9/15octeontx2-af: Configure block LF's MSIX vector offsetdrivers/net/ethernet/marvell/octeontx2/af/mbox.h drivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h +1 more+357 -30 replies
10/15octeontx2-af: Reconfig MSIX base with IOVAdrivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h+32 -31 reply
11/15octeontx2-af: Add Marvell OcteonTX2 CGX driverdrivers/net/ethernet/marvell/octeontx2/af/Makefile drivers/net/ethernet/marvell/octeontx2/af/cgx.c drivers/net/ethernet/marvell/octeontx2/af/cgx.h +1 more+133 -20 replies
12/15octeontx2-af: Set RVU PFs to CGX LMACs mappingdrivers/net/ethernet/marvell/octeontx2/af/Makefile drivers/net/ethernet/marvell/octeontx2/af/cgx.c drivers/net/ethernet/marvell/octeontx2/af/cgx.h +2 more+89 -30 replies
13/15octeontx2-af: Add support for CGX link managementdrivers/net/ethernet/marvell/octeontx2/af/cgx.c drivers/net/ethernet/marvell/octeontx2/af/cgx.h drivers/net/ethernet/marvell/octeontx2/af/cgx_fw_if.h +1 more+668 -40 replies
14/15octeontx2-af: Register for CGX lmac eventsdrivers/net/ethernet/marvell/octeontx2/af/rvu.c drivers/net/ethernet/marvell/octeontx2/af/rvu.h drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c+108 -40 replies
15/15MAINTAINERS: Add entry for Marvell OcteonTX2 Admin Function driverMAINTAINERS+9 -00 replies

Reviews trailers per patch

1 of 15 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchArnd Bergmann
SeriesR-b
1/15
2/15
3/15
4/15
5/15
6/15
7/15
8/15
9/15
10/15R-b
11/15
12/15
13/15
14/15
15/15

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [PATCH v9 00/15] octeontx2-af: Add RVU Admin Function driver

From: Sunil Goutham <[email protected]>

Resource virtualization unit (RVU) on Marvell's OcteonTX2 SOC maps HW resources from the network, crypto and other functional blocks into PCI-compatible physical and virtual functions. Each functional block again has multiple local functions (LFs) for provisioning to PCI devices. RVU supports multiple PCIe SRIOV physical functions (PFs) and virtual functions (VFs). PF0 is called the administrative / admin function (AF) and has privileges to provision RVU functional block's LFs to each of the PF/VF.

RVU managed networking functional blocks
- Network pool allocator (NPA)
- Network interface controller (NIX)
- Network parser CAM (NPC)
- Schedule/Synchronize/Order unit (SSO)

RVU managed non-networking functional blocks
- Crypto accelerator (CPT)
- Scheduled timers unit (TIM)
- Schedule/Synchronize/Order unit (SSO)
Used for both networking and non networking usecases
- Compression (upcoming in future variants of the silicons)

Resource provisioning examples
- A PF/VF with NIX-LF & NPA-LF resources works as a pure network device
- A PF/VF with CPT-LF resource works as a pure cyrpto offload device.

This admin function driver neither receives any data nor processes it i.e no I/O, a configuration only driver.

PF/VFs communicates with AF via a shared memory region (mailbox). Upon receiving requests from PF/VF, AF does resource provisioning and other HW configuration. AF is always attached to host, but PF/VFs may be used by host kernel itself, or attached to VMs or to userspace applications like DPDK etc. So AF has to handle provisioning/configuration requests sent by any device from any domain.

This patch series adds logic for the following
- RVU AF driver with functional blocks provisioning support.
- Mailbox infrastructure for communication between AF and PFs.
- CGX (MAC controller) driver which communicates with firmware for managing physical ethernet interfaces. AF collects info from this driver and forwards the same to the PF/VFs uaing these interfaces.

This is the first set of patches out of 80+ patches.

Changes from v8:
1 Removed unnecessary typecasts in entire series
- Suggested by David Miller
2 Added COMPILE_TEST to AF driver
- Suggested by Arnd Bergmann
3 Changed udelay() to usleep_range() in rvu_poll_reg
- Suggested by Arnd Bergmann
4 MSIX vector base IOMMU mapping is done using dma_map_resource()
API instead of dma_map_single() as it accepts physical address.
- Issue pointed by Arnd Bergmann

Changes from v7:
1 Removed unnecessary typecasts in mbox infra code.
- Suggested by David Miller
2 Fixed MAINTAINERS patch
- Suggested by Joe Perches

Changes from v6:
Fixed ordering of local variables from longest to shortest line.
- Suggested by David Miller

Changes from v5:
Modified bitfield based command structures to bitmasks for communication with firmware, to address endianness issues.
- Suggested by Arnd Bergmann

Changes from v4:
1 Removed module author/version/description from CGX driver as it's now
merged with AF driver module.
- Suggested by Arnd Bergmann
2 Added big-endian bitfields for CGX's kernel <=> firmware communication
command structures.
- Suggested by Arnd Bergmann

Changes from v3:
Moved driver from drivers/soc to drivers/net/ethernet
- Suggested by Arnd Bergmann
https://patchwork.kernel.org/cover/10587635/

Changes from v2:
No changes, submitted again with netdev mailing list in loop.
- Suggested by Arnd Bergmann and Andrew Lunn

Changes from v1:
1 Merged RVU admin function and CGX drivers into a single module
- Suggested by Arnd Bergmann
2 Pulled mbox communication APIs into a separate module to remove
admin function driver dependency in a VM where AF is not attached.
- Suggested by Arnd Bergmann

Aleksey Makarov (2):
octeontx2-af: Add mailbox support infra
octeontx2-af: Convert mbox msg id check to a macro

Geetha sowjanya (1):
octeontx2-af: Reconfig MSIX base with IOVA

Linu Cherian (3):
octeontx2-af: Set RVU PFs to CGX LMACs mapping
octeontx2-af: Add support for CGX link management
octeontx2-af: Register for CGX lmac events

Sunil Goutham (9):
octeontx2-af: Add Marvell OcteonTX2 RVU AF driver
octeontx2-af: Reset all RVU blocks
octeontx2-af: Gather RVU blocks HW info
octeontx2-af: Add mailbox IRQ and msg handlers
octeontx2-af: Scan blocks for LFs provisioned to PF/VF
octeontx2-af: Add RVU block LF provisioning support
octeontx2-af: Configure block LF's MSIX vector offset
octeontx2-af: Add Marvell OcteonTX2 CGX driver
MAINTAINERS: Add entry for Marvell OcteonTX2 Admin Function driver

 MAINTAINERS                                        |    9 +
 drivers/net/ethernet/marvell/Kconfig               |    3 +
 drivers/net/ethernet/marvell/Makefile              |    1 +
 drivers/net/ethernet/marvell/octeontx2/Kconfig     |   17 +
 drivers/net/ethernet/marvell/octeontx2/Makefile    |    6 +
 drivers/net/ethernet/marvell/octeontx2/af/Makefile |   10 +
 drivers/net/ethernet/marvell/octeontx2/af/cgx.c    |  505 ++++++
 drivers/net/ethernet/marvell/octeontx2/af/cgx.h    |   65 +
 .../net/ethernet/marvell/octeontx2/af/cgx_fw_if.h  |  186 +++
 drivers/net/ethernet/marvell/octeontx2/af/mbox.c   |  303 ++++
 drivers/net/ethernet/marvell/octeontx2/af/mbox.h   |  211 +++
 drivers/net/ethernet/marvell/octeontx2/af/rvu.c    | 1637 ++++++++++++++++++++
 drivers/net/ethernet/marvell/octeontx2/af/rvu.h    |  158 ++
 .../net/ethernet/marvell/octeontx2/af/rvu_cgx.c    |  194 +++
 .../net/ethernet/marvell/octeontx2/af/rvu_reg.h    |  441 ++++++
 .../net/ethernet/marvell/octeontx2/af/rvu_struct.h |   74 +
 16 files changed, 3820 insertions(+)
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/Kconfig
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/Makefile
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/Makefile
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cgx.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cgx.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/cgx_fw_if.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mbox.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/mbox.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_cgx.c
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_reg.h
 create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_struct.h
Signature · 1 line
2.7.4