lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DM6PR12MB42026BE9300CE1EFFC424EA9C1DB9@DM6PR12MB4202.namprd12.prod.outlook.com>
Date:   Tue, 7 Feb 2023 15:20:53 +0000
From:   "Lucero Palau, Alejandro" <alejandro.lucero-palau@....com>
To:     Edward Cree <ecree.xilinx@...il.com>,
        "Lucero Palau, Alejandro" <alejandro.lucero-palau@....com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-net-drivers (AMD-Xilinx)" <linux-net-drivers@....com>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "habetsm.xilinx@...il.com" <habetsm.xilinx@...il.com>,
        "linux-doc@...r.kernel.org" <linux-doc@...r.kernel.org>,
        "corbet@....net" <corbet@....net>,
        "jiri@...dia.com" <jiri@...dia.com>
Subject: Re: [PATCH v5 net-next 5/8] sfc: add devlink port support for ef100


On 2/6/23 14:02, Edward Cree wrote:
> 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).


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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ