netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Shinas Rasheed <srasheed@marvell.com>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<hgani@marvell.com>, <sedara@marvell.com>, <vimleshk@marvell.com>,
	<thaller@redhat.com>, <wizhao@redhat.com>, <kheib@redhat.com>,
	<egallen@redhat.com>, <konguyen@redhat.com>, <horms@kernel.org>,
	<einstein.xue@synaxg.com>,
	Veerasenareddy Burru <vburru@marvell.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH net-next v3 RESEND] octeon_ep: add ndo ops for VFs in PF driver
Date: Tue, 3 Dec 2024 18:33:18 -0800	[thread overview]
Message-ID: <20241203183318.16f378d1@kernel.org> (raw)
In-Reply-To: <20241202183219.2312114-1-srasheed@marvell.com>

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);

  reply	other threads:[~2024-12-04  2:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-02 18:32 [PATCH net-next v3 RESEND] octeon_ep: add ndo ops for VFs in PF driver Shinas Rasheed
2024-12-04  2:33 ` Jakub Kicinski [this message]
2024-12-05 15:47   ` [EXTERNAL] " Shinas Rasheed
2024-12-06  0:51     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241203183318.16f378d1@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=egallen@redhat.com \
    --cc=einstein.xue@synaxg.com \
    --cc=hgani@marvell.com \
    --cc=horms@kernel.org \
    --cc=kheib@redhat.com \
    --cc=konguyen@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sedara@marvell.com \
    --cc=srasheed@marvell.com \
    --cc=thaller@redhat.com \
    --cc=vburru@marvell.com \
    --cc=vimleshk@marvell.com \
    --cc=wizhao@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).