[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241203183318.16f378d1@kernel.org>
Date: Tue, 3 Dec 2024 18:33:18 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Shinas Rasheed <srasheed@...vell.com>
Cc: <netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<hgani@...vell.com>, <sedara@...vell.com>, <vimleshk@...vell.com>,
<thaller@...hat.com>, <wizhao@...hat.com>, <kheib@...hat.com>,
<egallen@...hat.com>, <konguyen@...hat.com>, <horms@...nel.org>,
<einstein.xue@...axg.com>, Veerasenareddy Burru <vburru@...vell.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, "Eric Dumazet" <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>
Subject: Re: [PATCH net-next v3 RESEND] octeon_ep: add ndo ops for VFs in PF
driver
On Mon, 2 Dec 2024 10:32:18 -0800 Shinas Rasheed wrote:
> These APIs are needed to support applications that use netlink to get VF
> information from a PF driver.
> + ivi->vf = vf;
> + ether_addr_copy(ivi->mac, oct->vf_info[vf].mac_addr);
> + ivi->spoofchk = true;
> + ivi->linkstate = IFLA_VF_LINK_STATE_ENABLE;
> + ivi->trusted = oct->vf_info[vf].trusted;
> + ivi->max_tx_rate = 10000;
I still feel like this is using the rate limiting API to report fixed
link speed, which is tangential to rate limiting..
Unless the user can set the max_tx_rate why would they want to know
what the limit is at? Ideally reporting rate limit would be done
in a patch set which supports setting it.
> + ivi->min_tx_rate = 0;
No need to set this to 0, AFAIR core initializes to 0.
> /**
> @@ -1560,9 +1601,12 @@ static void octep_remove(struct pci_dev *pdev)
> static int octep_sriov_enable(struct octep_device *oct, int num_vfs)
> {
> struct pci_dev *pdev = oct->pdev;
> - int err;
> + int i, err;
>
> CFG_GET_ACTIVE_VFS(oct->conf) = num_vfs;
> + for (i = 0; i < num_vfs; i++)
> + oct->vf_info[i].trusted = false;
I don't see it ever getting set to true, why track it if it's always
false?
> err = pci_enable_sriov(pdev, num_vfs);
> if (err) {
> dev_warn(&pdev->dev, "Failed to enable SRIOV err=%d\n", err);
Powered by blists - more mailing lists