public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Saeed Mahameed <saeed@kernel.org>,
	Saeed Mahameed <saeedm@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Paolo Abeni <pabeni@redhat.com>,
	Eric Dumazet <edumazet@google.com>,
	netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
	Shay Drory <shayd@nvidia.com>, Moshe Shemesh <moshe@nvidia.com>
Subject: Re: [net-next 14/15] net/mlx5: Light probe local SFs
Date: Tue, 27 Jun 2023 12:12:10 +0200	[thread overview]
Message-ID: <ZJq1+ok+WkwePYaq@nanopsycho> (raw)
In-Reply-To: <20230624134703.10ec915f@kernel.org>

Sat, Jun 24, 2023 at 10:47:03PM CEST, kuba@kernel.org wrote:
>On Sat, 24 Jun 2023 11:33:20 +0200 Jiri Pirko wrote:
>> >of the SF after all, right? Probably best to find another way...  
>> 
>> Well, yeah. The mac/hw_addr is quite convenient. It's there and
>> I believe that any device could work with that. Having some kind of
>> "extra cookie" would require to implement that in FW, which makes things
>> more complicated.
>
>"Let's piggyback on something else in the uAPI because I don't want 
>to extend FW" is not an argument which can be taken seriously.

It's not about what I want or not. It's about what can realistically
happen (not talking about mlx5 specifically).

But what is a difference between using hw_addr and some other uuid.
cmdline wise:

option 1 - JUST HW_ADDR:

$ sudo devlink port add pci/0000:08:00.0 flavour pcisf pfnum 0 sfnum 103
pci/0000:08:00.0/32770: type eth netdev eth10 flavour pcisf controller 0 pfnum 0 sfnum 103 splittable false
  function:
    hw_addr 00:00:00:00:00:00 state inactive opstate detached

$ sudo devlink port function set pci/0000:08:00.0/32770 hw_addr AA:22:33:44:55:66

$ sudo devlink port show pci/0000:08:00.0/32770
pci/0000:08:00.0/32770: type eth netdev eth10 flavour pcisf controller 0 pfnum 0 sfnum 103 splittable false
  function:
    hw_addr aa:22:33:44:55:66 state inactive opstate detached

$ sudo devlink port function set pci/0000:08:00.0/32770 state active
pci/0000:08:00.0/32770: type eth netdev eth10 flavour pcisf controller 0 pfnum 0 sfnum 103 splittable false
  function:
    hw_addr aa:22:33:44:55:66 state active opstate detached devlink_handle auxiliary/mlx5_core.eth.5
# This is new, currently activation does not give feedback,
# devlink_handle attr is new here

$ sudo devlink port show pci/0000:08:00.0/32770
pci/0000:08:00.0/32770: type eth netdev eth10 flavour pcisf controller 0 pfnum 0 sfnum 103 splittable false
  function:
    hw_addr aa:22:33:44:55:66 state active opstate attached devlink_handle auxiliary/mlx5_core.eth.5
# devlink_handle attr is new here

$ sudo devlink dev show auxiliary/mlx5_core.eth.5
auxiliary/mlx5_core.eth.5: hw_addr aa:22:33:44:55:66
# hw_addr attr is new here

hw_addr value is passed through FW here. This value is currently used
for netdevice mac. So it is just a matter of exposing for auxdev
devlink/devlink_port (not 100% sure which)


option 2 - ADDED UUID:

$ sudo devlink port add pci/0000:08:00.0 flavour pcisf pfnum 0 sfnum 103
pci/0000:08:00.0/32770: type eth netdev eth10 flavour pcisf controller 0 pfnum 0 sfnum 103 splittable false
  function:
    hw_addr 00:00:00:00:00:00 state inactive opstate detached

$ sudo devlink port function set pci/0000:08:00.0/32770 hw_addr AA:22:33:44:55:66 uuid SOMETHINGREALLYUNIQUE

$ sudo devlink port show pci/0000:08:00.0/32770
pci/0000:08:00.0/32770: type eth netdev eth10 flavour pcisf controller 0 pfnum 0 sfnum 103 splittable false
  function:
    hw_addr aa:22:33:44:55:66 uuid SOMETHINGREALLYUNIQUE state inactive opstate detached
# uuid attr is new here

$ sudo devlink port function set pci/0000:08:00.0/32770 state active
pci/0000:08:00.0/32770: type eth netdev eth10 flavour pcisf controller 0 pfnum 0 sfnum 103 splittable false
  function:
    hw_addr aa:22:33:44:55:66 uuid SOMETHINGREALLYUNIQUE state active opstate detached devlink_handle auxiliary/mlx5_core.eth.5
# This is new, currently activation does not give feedback,
# devlink_handle attr is new here, uuid attr is new here

$ sudo devlink port show pci/0000:08:00.0/32770
pci/0000:08:00.0/32770: type eth netdev eth10 flavour pcisf controller 0 pfnum 0 sfnum 103 splittable false
  function:
    hw_addr aa:22:33:44:55:66 uuid SOMETHINGREALLYUNIQUE state active opstate attached devlink_handle auxiliary/mlx5_core.eth.5
# devlink_handle attr is new here, uuid attr is new here

$ sudo devlink dev show auxiliary/mlx5_core.eth.5
auxiliary/mlx5_core.eth.5: uuid SOMETHINGREALLYUNIQUE
# uuid attr is new here

uuid value is passed through FW here.


The uuid kind of values is nothing new in netdev. We have:
IFLA_PHYS_PORT_ID
IFLA_PHYS_SWITCH_ID
In most of the cases (if not all), these are in drivers filled-up with
MAC. So I'm quite positive that the drivers would implement the auxdev
uuid as a MAC as well.

Do you like option 2 better than option 1? Is there option 3?

Thanks!


  reply	other threads:[~2023-06-27 10:12 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-10  1:42 [pull request][net-next 00/15] mlx5 updates 2023-06-09 Saeed Mahameed
2023-06-10  1:42 ` [net-next 01/15] net/mlx5: Simplify unload all rep code Saeed Mahameed
2023-06-12 11:00   ` patchwork-bot+netdevbpf
2023-06-10  1:42 ` [net-next 02/15] net/mlx5: mlx5_ifc updates for embedded CPU SRIOV Saeed Mahameed
2023-06-10  1:42 ` [net-next 03/15] net/mlx5: Enable devlink port for embedded cpu VF vports Saeed Mahameed
2023-06-10  1:42 ` [net-next 04/15] net/mlx5: Update vport caps query/set for EC VFs Saeed Mahameed
2023-06-10  1:42 ` [net-next 05/15] net/mlx5: Add management of EC VF vports Saeed Mahameed
2023-06-10  1:42 ` [net-next 06/15] net/mlx5: Add/remove peer miss rules for EC VFs Saeed Mahameed
2023-06-10  1:42 ` [net-next 07/15] net/mlx5: Add new page type for EC VF pages Saeed Mahameed
2023-06-10  1:42 ` [net-next 08/15] net/mlx5: Use correct vport when restoring GUIDs Saeed Mahameed
2023-06-10  1:42 ` [net-next 09/15] net/mlx5: Query correct caps for min msix vectors Saeed Mahameed
2023-06-10  1:42 ` [net-next 10/15] net/mlx5: Update SRIOV enable/disable to handle EC/VFs Saeed Mahameed
2023-06-10  1:42 ` [net-next 11/15] net/mlx5: Set max number of embedded CPU VFs Saeed Mahameed
2023-06-10  1:42 ` [net-next 12/15] net/mlx5: Split function_setup() to enable and open functions Saeed Mahameed
2023-06-10  1:42 ` [net-next 13/15] net/mlx5: Move esw multiport devlink param to eswitch code Saeed Mahameed
2023-06-10  1:42 ` [net-next 14/15] net/mlx5: Light probe local SFs Saeed Mahameed
2023-06-10  7:01   ` Jakub Kicinski
2023-06-11  4:15     ` Saeed Mahameed
2023-06-11  5:10       ` Samudrala, Sridhar
2023-06-13 23:41         ` Saeed Mahameed
2023-06-12 17:51       ` Jakub Kicinski
2023-06-13 23:32         ` Saeed Mahameed
2023-06-14  2:05           ` Jakub Kicinski
2023-06-15 10:51             ` Jiri Pirko
2023-06-15 16:37               ` Jakub Kicinski
2023-06-15 17:37                 ` Jiri Pirko
2023-06-15 19:33                   ` Jakub Kicinski
2023-06-21 13:14                     ` Jiri Pirko
2023-06-21 18:23                       ` Jakub Kicinski
2023-06-22  6:42                         ` Jiri Pirko
2023-06-22  6:38                       ` Jiri Pirko
2023-06-22 16:35                         ` Jakub Kicinski
2023-06-23  9:27                           ` Jiri Pirko
2023-06-23 15:21                             ` Jakub Kicinski
2023-06-24  9:33                               ` Jiri Pirko
2023-06-24 20:47                                 ` Jakub Kicinski
2023-06-27 10:12                                   ` Jiri Pirko [this message]
2023-06-27 15:24                                     ` Jakub Kicinski
2023-06-27 17:16                                       ` Jiri Pirko
2023-06-27 17:35                                         ` Jakub Kicinski
2023-06-10  1:42 ` [net-next 15/15] net/mlx5e: Remove a useless function call Saeed Mahameed

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=ZJq1+ok+WkwePYaq@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeed@kernel.org \
    --cc=saeedm@nvidia.com \
    --cc=shayd@nvidia.com \
    --cc=tariqt@nvidia.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