linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Lucero Palau, Alejandro" <alejandro.lucero-palau@amd.com>
To: Edward Cree <ecree.xilinx@gmail.com>,
	"Lucero Palau, Alejandro" <alejandro.lucero-palau@amd.com>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-net-drivers (AMD-Xilinx)" <linux-net-drivers@amd.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>,
	"pabeni@redhat.com" <pabeni@redhat.com>,
	"edumazet@google.com" <edumazet@google.com>,
	"habetsm.xilinx@gmail.com" <habetsm.xilinx@gmail.com>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"corbet@lwn.net" <corbet@lwn.net>,
	"jiri@nvidia.com" <jiri@nvidia.com>
Subject: Re: [PATCH v5 net-next 5/8] sfc: add devlink port support for ef100
Date: Tue, 7 Feb 2023 15:20:53 +0000	[thread overview]
Message-ID: <DM6PR12MB42026BE9300CE1EFFC424EA9C1DB9@DM6PR12MB4202.namprd12.prod.outlook.com> (raw)
In-Reply-To: <a2be6feb-609a-5af4-123a-750a24104e47@gmail.com>


On 2/6/23 14:02, Edward Cree wrote:
> On 02/02/2023 11:14, alejandro.lucero-palau@amd.com wrote:
>> From: Alejandro Lucero <alejandro.lucero-palau@amd.com>
>>
>> Using the data when enumerating mports, create devlink ports just before
>> netdevs are registered and remove those devlink ports after netdev has
>> been unregistered.
>>
>> Signed-off-by: Alejandro Lucero <alejandro.lucero-palau@amd.com>
> ...
>> @@ -297,6 +298,7 @@ int efx_ef100_vfrep_create(struct efx_nic *efx, unsigned int i)
>>   			i, rc);
>>   		goto fail1;
>>   	}
>> +	ef100_rep_set_devlink_port(efv);
>>   	rc = register_netdev(efv->net_dev);
>>   	if (rc) {
>>   		pci_err(efx->pci_dev,
>> @@ -308,6 +310,7 @@ int efx_ef100_vfrep_create(struct efx_nic *efx, unsigned int i)
>>   		efv->net_dev->name);
>>   	return 0;
>>   fail2:
>> +	ef100_rep_unset_devlink_port(efv);
>>   	efx_ef100_deconfigure_rep(efv);
>>   fail1:
>>   	efx_ef100_rep_destroy_netdev(efv);
>> @@ -323,6 +326,7 @@ void efx_ef100_vfrep_destroy(struct efx_nic *efx, struct efx_rep *efv)
>>   		return;
>>   	netif_dbg(efx, drv, rep_dev, "Removing VF representor\n");
>>   	unregister_netdev(rep_dev);
>> +	ef100_rep_unset_devlink_port(efv);
>>   	efx_ef100_deconfigure_rep(efv);
>>   	efx_ef100_rep_destroy_netdev(efv);
>>   }
> Would it make sense to move these calls into
>   efx_ef100_[de]configure_rep()?  It's responsible for other
>   MAE/m-port related stuff (and is also common with remote reps
>   when they arrive).


Uhmm, not sure about this.

I would say configure/deconfigure reps is more driver's internal and 
those devlink related calls are about the driver using an external API. 
Indeed due to this relationship with register/unregister_netdev, I think 
it is more visible where they are at the moment.


  reply	other threads:[~2023-02-07 15:20 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-02 11:14 [PATCH v5 net-next 0/8] sfc: devlink support for ef100 alejandro.lucero-palau
2023-02-02 11:14 ` [PATCH v5 net-next 1/8] sfc: add " alejandro.lucero-palau
2023-02-02 11:50   ` Jiri Pirko
2023-02-06 12:00   ` Edward Cree
2023-02-07 14:21     ` Lucero Palau, Alejandro
2023-02-02 11:14 ` [PATCH v5 net-next 2/8] sfc: add devlink info " alejandro.lucero-palau
2023-02-02 11:58   ` Jiri Pirko
2023-02-07 14:42     ` Lucero Palau, Alejandro
2023-02-07 14:58       ` Jiri Pirko
2023-02-07 15:10         ` Lucero Palau, Alejandro
2023-02-07 17:24           ` Lucero Palau, Alejandro
2023-02-08  7:35             ` Jiri Pirko
2023-02-08  8:53               ` Lucero Palau, Alejandro
2023-02-03  2:37   ` kernel test robot
2023-02-03 11:38   ` kernel test robot
2023-02-02 11:14 ` [PATCH v5 net-next 3/8] sfc: enumerate mports in ef100 alejandro.lucero-palau
2023-02-06 12:38   ` Edward Cree
2023-02-07 15:14     ` Lucero Palau, Alejandro
2023-02-02 11:14 ` [PATCH v5 net-next 4/8] sfc: add mport lookup based on driver's mport data alejandro.lucero-palau
2023-02-02 11:14 ` [PATCH v5 net-next 5/8] sfc: add devlink port support for ef100 alejandro.lucero-palau
2023-02-02 12:01   ` Jiri Pirko
2023-02-06 14:02   ` Edward Cree
2023-02-07 15:20     ` Lucero Palau, Alejandro [this message]
2023-02-02 11:14 ` [PATCH v5 net-next 6/8] sfc: obtain device mac address based on firmware handle " alejandro.lucero-palau
2023-02-02 11:14 ` [PATCH v5 net-next 7/8] sfc: add support for devlink port_function_hw_addr_get in ef100 alejandro.lucero-palau
2023-02-02 12:09   ` Jiri Pirko
2023-02-07 15:01     ` Lucero Palau, Alejandro
2023-02-08  8:50       ` Lucero Palau, Alejandro
2023-02-02 11:14 ` [PATCH v5 net-next 8/8] sfc: add support for devlink port_function_hw_addr_set " alejandro.lucero-palau
2023-02-02 12:13   ` Jiri Pirko
2023-02-07 15:06     ` Lucero Palau, Alejandro

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=DM6PR12MB42026BE9300CE1EFFC424EA9C1DB9@DM6PR12MB4202.namprd12.prod.outlook.com \
    --to=alejandro.lucero-palau@amd.com \
    --cc=corbet@lwn.net \
    --cc=davem@davemloft.net \
    --cc=ecree.xilinx@gmail.com \
    --cc=edumazet@google.com \
    --cc=habetsm.xilinx@gmail.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-net-drivers@amd.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@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).