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]
Date:   Fri, 20 Jan 2023 09:34:59 +0000
From:   "Lucero Palau, Alejandro" <alejandro.lucero-palau@....com>
To:     Jacob Keller <jacob.e.keller@...el.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@...il.com" <habetsm@...il.com>,
        "ecree.xilinx@...il.com" <ecree.xilinx@...il.com>
Subject: Re: [PATCH net-next 3/7] sfc: add mport lookup based on driver's
 mport data


On 1/19/23 23:57, Jacob Keller wrote:
>
> On 1/19/2023 3:31 AM, alejandro.lucero-palau@....com wrote:
>> +int efx_mae_lookup_mport(struct efx_nic *efx, u32 vf_idx, u32 *id)
>> +{
>> +	struct ef100_nic_data *nic_data = efx->nic_data;
>> +	struct efx_mae *mae = efx->mae;
>> +	struct rhashtable_iter walk;
>> +	struct mae_mport_desc *m;
>> +	int rc = -ENOENT;
>> +
>> +	rhashtable_walk_enter(&mae->mports_ht, &walk);
>> +	rhashtable_walk_start(&walk);
>> +	while ((m = rhashtable_walk_next(&walk)) != NULL) {
>> +		if (m->mport_type == MAE_MPORT_DESC_MPORT_TYPE_VNIC &&
>> +		    m->interface_idx == nic_data->local_mae_intf &&
>> +		    m->pf_idx == 0 &&
>> +		    m->vf_idx == vf_idx) {
>> +			*id = m->mport_id;
>> +			rc = 0;
>> +			break;
>> +		}
>> +	}
>> +	rhashtable_walk_stop(&walk);
>> +	rhashtable_walk_exit(&walk);
> Curious if you have any reasoning for why you chose rhashtable vs
> another structure (such as a simpler hash table of linked lists or xarray).


The mports can appear and disappear (although it is not supported by the 
code yet nor by current firmware/hardware) so something resizable was 
needed for supporting this in the near future.


> At any rate,
>
> Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ