Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1371249rwb; Mon, 7 Nov 2022 00:29:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf6pI/L8zHZVe9Wpz4g7bohMzsrG0VE0ZT8ijVNvaZh9W8V0ZiyhEmLWu749vObfYmOOreIw X-Received: by 2002:a17:907:1395:b0:7ae:667e:36e3 with SMTP id vs21-20020a170907139500b007ae667e36e3mr4662810ejb.243.1667809745131; Mon, 07 Nov 2022 00:29:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1667809745; cv=none; d=google.com; s=arc-20160816; b=hXIlXgIndYsRG3JaMCfSR7gZTPVXl89PTdjXeQls2oiE5pPYhCp1bjKx1RKCJIp352 QgJ955lJs9QrgAGH5nTbeKgi7ptyuC02mLlPNn9b/8ofbkOb4ccQhf71CKQBaDDW6eg5 dqVpHJzZCNmVF3ER7LXjOzmPOPUVcM9YXTV4rh8OyLQpqspBMdn9Va6C/qCgaZBIQAv5 wZph1yGJ1oZk6O8tBRsCHQJ4uPs44P8CCz1IvWFrWaU0yCTLZYoHbLvQl81X6hiZrarg eGSLh8YGYwHxyBtUlPeENnhvnjzleJvRjVDvYw/nPvpsAFtDNTKP9O8VQ7N9tvQp4SkI qwTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ktgt1tIMgkyw/wsHmdvFqjvH89UYjHjdpOdEaK49dPo=; b=jqX2e/aKgh7jGzVcqNO1GdzYC6P4YnGDrr7oBLJjWTCiP0Ld8e5o6L89hy3IbUnZBR jXwUUUSvWByRwGlPL8LV+5rgpNbWwGW3HXHccjSJI/yTT1A/TtNu/WwOjFU8mfD+QLiE HNYX89896FMfCC8aimA0fq1B24E1v5/3QSkn2hB6xingHyXkJdssDhCyJb8H2AnRfCmh gfyCuAvncI2pMY3bT3igwiFcJ5x3Wk97iBakyi77dpe/4THjvHVG5lqmh1wydi675RIN ZyU23jtI+2c5N0ilZI/iunFWUZb3JT2zw4sPBsiA/wn3BB93OvN/LL7KM1GENlldzEdE I0aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UO0hUPED; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h3-20020a1709060f4300b0077a19529760si5108973ejj.65.2022.11.07.00.28.42; Mon, 07 Nov 2022 00:29:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=UO0hUPED; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231168AbiKGINV (ORCPT + 95 others); Mon, 7 Nov 2022 03:13:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229659AbiKGINT (ORCPT ); Mon, 7 Nov 2022 03:13:19 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E5EE613F6C; Mon, 7 Nov 2022 00:13:18 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 560A260F21; Mon, 7 Nov 2022 08:13:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DDE83C433D6; Mon, 7 Nov 2022 08:13:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667808797; bh=PgkJbB0Q2L004m5Eq4WQ/HjRyqRrRI5aNjpGlRwfFPo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=UO0hUPED2IJjsi58QdQxsI+BSoPrMWWRz357N4uhPHkZG0/sO99MGzhE15O4CkFEE YpLAB+7/gicgEAU25bAFidFVSS/WmcSyQjU3yhoRCKDgUctvAsm1Vk2SB1mv2SZJkQ 5m7WYpe1lc1H00N7/bLs/DxkJk1CbltA4gBPzf51ZW4eBq7YtXX0u5FPjFpw4n8gnP 6ocS9pRckeAC62WoIX3bvx9CYJ9x4xSKQbxDqMkeQgkjdKcIR2CeTlsxPuc+zgItRq G3TBwddEgoYBxJaVJKytW67mziwLVY/20H8QKtWGNrvGBR+6IGRrveTMDILRx4o+O2 Wq37xmvTYb4/Q== Date: Mon, 7 Nov 2022 10:13:13 +0200 From: Leon Romanovsky To: Veerasenareddy Burru Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, lironh@marvell.com, aayarekar@marvell.com, sedara@marvell.com, sburla@marvell.com, linux-doc@vger.kernel.org, "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Subject: Re: [PATCH net-next 7/9] octeon_ep: add SRIOV VF creation Message-ID: References: <20221107072524.9485-1-vburru@marvell.com> <20221107072524.9485-8-vburru@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221107072524.9485-8-vburru@marvell.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Nov 06, 2022 at 11:25:21PM -0800, Veerasenareddy Burru wrote: > Add support to create SRIOV VFs. > > Signed-off-by: Veerasenareddy Burru > Signed-off-by: Sathesh Edara > --- > .../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