lkml.org 
[lkml]   [2022]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 7/9] octeon_ep: add SRIOV VF creation
On Sun, Nov 06, 2022 at 11:25:21PM -0800, Veerasenareddy Burru wrote:
> Add support to create SRIOV VFs.
>
> Signed-off-by: Veerasenareddy Burru <vburru@marvell.com>
> Signed-off-by: Sathesh Edara <sedara@marvell.com>
> ---
> .../ethernet/marvell/octeon_ep/octep_main.c | 50 +++++++++++++++++++
> 1 file changed, 50 insertions(+)
>
> diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> index ad5553854467..fa0f3d597eb1 100644
> --- a/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_main.c
> @@ -1236,11 +1236,61 @@ static void octep_remove(struct pci_dev *pdev)
> pci_disable_device(pdev);
> }
>
> +static int octep_sriov_disable(struct octep_device *oct)
> +{
> + struct pci_dev *pdev = oct->pdev;
> +
> + if (pci_vfs_assigned(oct->pdev)) {
> + dev_warn(&pdev->dev, "Can't disable SRIOV while VFs are assigned\n");
> + return -EPERM;
> + }

I think that PCI core should prevent this.

Thanks

\
 
 \ /
  Last update: 2022-11-07 09:14    [W:0.070 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site