Skip to content

soc: marvell: Add a general purpose RVU physical

Anshumali Gaur lkml 5 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 0 repliesNew
  2. v44 patches 0 repliesSuperseded
  3. v34 patches 0 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches2 repliesSuperseded
v14 patches9 repliesSuperseded

v2 from the cover letter

- Patch-1: Fixed indentation issues pointed out by Alexander Sverdlin
- Patch-4: In function rvu_gen_pf_flr_handler, added ~RVU_PFVF_FUNC_MASK pointed out by Alexander Sverdlin

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4soc: marvell: Add a general purpose RVU PF driverdrivers/soc/Kconfig drivers/soc/Makefile drivers/soc/marvell/Kconfig +4 more+207 -00 replies
2/4soc: marvell: rvu-pf: Add PF to AF mailbox communication support.drivers/soc/marvell/rvu_gen_pf/gen_pf.c drivers/soc/marvell/rvu_gen_pf/gen_pf.h+388 -10 replies
3/4soc: marvell: rvu-pf: Add mailbox communication btw RVU VFs and PF.drivers/soc/marvell/rvu_gen_pf/gen_pf.c drivers/soc/marvell/rvu_gen_pf/gen_pf.h+444 -00 replies
4/4soc: marvell: rvu-pf: Handle function level reset (FLR) IRQs for VFsdrivers/soc/marvell/rvu_gen_pf/gen_pf.c drivers/soc/marvell/rvu_gen_pf/gen_pf.h+238 -10 replies

Reviews trailers per patch

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

Read the v5 thread

Cover letter [PATCH v5 0/4] soc: marvell: Add a general purpose RVU physical

Resource virtualization unit (RVU) on Marvell's Octeon series of silicons 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). And RVU admin function (AF) is the one which manages all the resources (local functions etc) in the system.

Functionality of these PFs and VFs depends on which block LFs are attached to them. Depending on usecase some PFs might support IO (ie LFs attached) and some may not. For the usecases where PF doesn't (need to) support IO, PF's driver will be limited to below functionality.

1. Creating and destroying of PCIe SRIOV VFs
2. Support mailbox communication between VFs and admin function (RVU AF)
3. PCIe Function level reset (FLR) for VFs

For such PFs, this patch series adds a general purpose driver which supports above functionality. This will avoid duplicating same functionality for different RVU PFs.

Next generation of Octeon silicon will have many new RVU blocks added.
Eg: ML, Octeon (connected as an EP card) to host network packet path etc For such functionality there could be only userspace VF drivers hence a generic PF driver in Kernel is needed to support these VF drivers.

For reference
RVU AF driver is at drivers/net/ethernet/marvell/octeontx2/af/

Example RVU PF drivers drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c

Example RVU VF drivers drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c

Patch-1: This patch adds a generic PF driver with probe() and sriov() capabilities.
Patch-2: This patch adds PF-AF mailbox support to the generic PF driver.
Patch-3: This patch adds PF-VF mailbox support to the generic PF driver.
Patch-4: This patch adds FLR handler to the generic PF driver.

Changes:
v2:
- Patch-1: Fixed indentation issues pointed out by Alexander Sverdlin
- Patch-4: In function rvu_gen_pf_flr_handler, added ~RVU_PFVF_FUNC_MASK pointed out by Alexander Sverdlin
v3:
- Patches-1-4: added multiline comments as per coding style, pointed out by Krzysztof Kozlowski
v4:
- Just a reminder to review patches, no change from v3 to v4 v5:
- Adding Arnd Bergmann to the mailing list

Anshumali Gaur (4):
soc: marvell: Add a general purpose RVU PF driver
soc: marvell: rvu-pf: Add PF to AF mailbox communication support.
soc: marvell: rvu-pf: Add mailbox communication btw RVU VFs and PF.
soc: marvell: rvu-pf: Handle function level reset (FLR) IRQs for VFs

 drivers/soc/Kconfig                     |    1 +
 drivers/soc/Makefile                    |    1 +
 drivers/soc/marvell/Kconfig             |   19 +
 drivers/soc/marvell/Makefile            |    2 +
 drivers/soc/marvell/rvu_gen_pf/Makefile |    5 +
 drivers/soc/marvell/rvu_gen_pf/gen_pf.c | 1095 +++++++++++++++++++++++
 drivers/soc/marvell/rvu_gen_pf/gen_pf.h |  152 ++++
 7 files changed, 1275 insertions(+)
 create mode 100644 drivers/soc/marvell/Kconfig
 create mode 100644 drivers/soc/marvell/Makefile
 create mode 100644 drivers/soc/marvell/rvu_gen_pf/Makefile
 create mode 100644 drivers/soc/marvell/rvu_gen_pf/gen_pf.c
 create mode 100644 drivers/soc/marvell/rvu_gen_pf/gen_pf.h
Signature · 1 line
2.25.1