[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PH0PR18MB47342ED76DCB583E62078808C7302@PH0PR18MB4734.namprd18.prod.outlook.com>
Date: Thu, 5 Dec 2024 15:47:29 +0000
From: Shinas Rasheed <srasheed@...vell.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Haseeb Gani
<hgani@...vell.com>, Sathesh B Edara <sedara@...vell.com>,
Vimlesh Kumar
<vimleshk@...vell.com>,
"thaller@...hat.com" <thaller@...hat.com>,
"wizhao@...hat.com" <wizhao@...hat.com>,
"kheib@...hat.com"
<kheib@...hat.com>,
"egallen@...hat.com" <egallen@...hat.com>,
"konguyen@...hat.com" <konguyen@...hat.com>,
"horms@...nel.org"
<horms@...nel.org>,
"einstein.xue@...axg.com" <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: [EXTERNAL] Re: [PATCH net-next v3 RESEND] octeon_ep: add ndo ops
for VFs in PF driver
Hi Jakub,
> 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.
>
Ack
> > + ivi->min_tx_rate = 0;
>
> No need to set this to 0, AFAIR core initializes to 0.
Ack
> > /**
> > @@ -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?
>
In case we need to support the api in the future, just added the corresponding data structure to track it. Perhaps if you think
that’s warranted only 'when' we support it then, maybe I can remove it. The data structure was used to check for 'trusted' when vf tries to set its mac.
> > 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