lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <cff2b9b064c22e185bad42010ded7e1559fe672f.camel@gmail.com>
Date: Sat, 21 Sep 2024 23:38:32 +0200
From: Alexander Sverdlin <alexander.sverdlin@...il.com>
To: Anshumali Gaur <agaur@...vell.com>, conor.dooley@...rochip.com, 
	ulf.hansson@...aro.org, arnd@...db.de, linus.walleij@...aro.org, 
	nikita.shubin@...uefel.me, vkoul@...nel.org, cyy@...self.name, 
	krzysztof.kozlowski@...aro.org, linux-kernel@...r.kernel.org, 
	sgoutham@...vell.com
Subject: Re: [PATCH 1/4] soc: marvell: Add a general purpose RVU PF driver

Hi Anshumali!

On Fri, 2024-09-20 at 16:53 +0530, Anshumali Gaur wrote:
> 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.
> 
> This patch adds basic stub PF driver with PCI device init logic and
> SRIOV enable/disable support.
> 
> Signed-off-by: Anshumali Gaur <agaur@...vell.com>
> ---
> 

[]

> diff --git a/drivers/soc/marvell/rvu_gen_pf/gen_pf.h b/drivers/soc/marvell/rvu_gen_pf/gen_pf.h
> new file mode 100644
> index 000000000000..4cf12e65a526
> --- /dev/null
> +++ b/drivers/soc/marvell/rvu_gen_pf/gen_pf.h
> @@ -0,0 +1,19 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* Marvell Octeon RVU Generic Physical Function driver
> + *
> + * Copyright (C) 2024 Marvell.
> + */
> +#include <linux/device.h>
> +#include <linux/pci.h>
> +
> +#define RVU_PFFUNC(pf, func)    \
> +	((((pf) & RVU_PFVF_PF_MASK) << RVU_PFVF_PF_SHIFT) | \
> +	(((func) & RVU_PFVF_FUNC_MASK) << RVU_PFVF_FUNC_SHIFT))
> +
> +struct gen_pf_dev {
> +	struct pci_dev          *pdev;
> +	struct device           *dev;
> +	void __iomem		*reg_base;
> +	int                     pf;
> +	u8                      total_vfs;
> +};

The above struct has strange indentation with tabs and spaces.

-- 
Alexander Sverdlin.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ