[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a2be6feb-609a-5af4-123a-750a24104e47@gmail.com>
Date: Mon, 6 Feb 2023 14:02:45 +0000
From: Edward Cree <ecree.xilinx@...il.com>
To: alejandro.lucero-palau@....com, netdev@...r.kernel.org,
linux-net-drivers@....com
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, habetsm.xilinx@...il.com,
linux-doc@...r.kernel.org, corbet@....net, jiri@...dia.com
Subject: Re: [PATCH v5 net-next 5/8] sfc: add devlink port support for ef100
On 02/02/2023 11:14, alejandro.lucero-palau@....com wrote:
> From: Alejandro Lucero <alejandro.lucero-palau@....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@....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).
Powered by blists - more mailing lists