From: Jacob Keller <jacob.e.keller@intel.com>
To: <alejandro.lucero-palau@amd.com>, <netdev@vger.kernel.org>,
<linux-net-drivers@amd.com>
Cc: <davem@davemloft.net>, <kuba@kernel.org>, <pabeni@redhat.com>,
<edumazet@google.com>, <habetsm@gmail.com>,
<ecree.xilinx@gmail.com>
Subject: Re: [PATCH net-next 3/7] sfc: add mport lookup based on driver's mport data
Date: Thu, 19 Jan 2023 15:57:54 -0800 [thread overview]
Message-ID: <1a3387e7-dbe3-905a-4b7a-ef2cd776cb33@intel.com> (raw)
In-Reply-To: <20230119113140.20208-4-alejandro.lucero-palau@amd.com>
On 1/19/2023 3:31 AM, alejandro.lucero-palau@amd.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).
At any rate,
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
next prev parent reply other threads:[~2023-01-19 23:58 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-19 11:31 [PATCH net-next 0/7] sfc: devlink support for ef100 alejandro.lucero-palau
2023-01-19 11:31 ` [PATCH net-next 1/7] sfc: add " alejandro.lucero-palau
2023-01-19 12:14 ` Jiri Pirko
2023-01-19 14:51 ` Lucero Palau, Alejandro
2023-01-19 16:29 ` Lucero Palau, Alejandro
2023-01-20 11:02 ` Jiri Pirko
2023-01-20 11:00 ` Jiri Pirko
2023-01-19 15:50 ` kernel test robot
2023-01-19 17:16 ` Jakub Kicinski
2023-01-19 17:52 ` Lucero Palau, Alejandro
2023-01-19 18:44 ` Jakub Kicinski
2023-01-19 19:08 ` Lucero Palau, Alejandro
2023-01-19 23:40 ` Jacob Keller
2023-01-20 14:11 ` Lucero Palau, Alejandro
2023-01-24 6:13 ` Edward Cree
2023-01-24 7:31 ` Lucero Palau, Alejandro
2023-01-24 11:05 ` Lucero Palau, Alejandro
2023-01-24 22:12 ` Jacob Keller
2023-01-20 13:59 ` kernel test robot
2023-01-19 11:31 ` [PATCH net-next 2/7] sfc: enumerate mports in ef100 alejandro.lucero-palau
2023-01-19 23:48 ` Jacob Keller
2023-01-20 14:13 ` Lucero Palau, Alejandro
2023-01-20 12:47 ` kernel test robot
2023-01-19 11:31 ` [PATCH net-next 3/7] sfc: add mport lookup based on driver's mport data alejandro.lucero-palau
2023-01-19 23:57 ` Jacob Keller [this message]
2023-01-20 9:34 ` Lucero Palau, Alejandro
2023-01-20 18:36 ` Keller, Jacob E
2023-01-19 11:31 ` [PATCH net-next 4/7] sfc: add devlink port support for ef100 alejandro.lucero-palau
2023-01-19 12:33 ` Jiri Pirko
2023-01-19 15:03 ` Lucero Palau, Alejandro
2023-01-19 13:37 ` kernel test robot
2023-01-20 21:21 ` kernel test robot
2023-01-19 11:31 ` [PATCH net-next 5/7] sfc: obtain device mac address based on firmware handle " alejandro.lucero-palau
2023-01-19 19:47 ` kernel test robot
2023-01-20 0:03 ` Jacob Keller
2023-01-19 11:31 ` [PATCH net-next 6/7] sfc: add support for port_function_hw_addr_get devlink in ef100 alejandro.lucero-palau
2023-01-19 12:25 ` Jiri Pirko
2023-01-19 14:59 ` Lucero Palau, Alejandro
2023-01-20 11:05 ` Jiri Pirko
2023-01-22 16:41 ` Lucero Palau, Alejandro
2023-01-19 12:37 ` Jiri Pirko
2023-01-19 15:09 ` Lucero Palau, Alejandro
2023-01-20 11:08 ` Jiri Pirko
2023-01-20 12:48 ` Lucero Palau, Alejandro
2023-01-22 16:36 ` Lucero Palau, Alejandro
2023-01-23 8:38 ` Jiri Pirko
2023-01-23 9:45 ` Lucero Palau, Alejandro
2023-01-23 10:18 ` Jiri Pirko
2023-01-19 11:31 ` [PATCH net-next 7/7] sfc: add support for devlink port_function_hw_addr_set " alejandro.lucero-palau
2023-01-19 12:27 ` Jiri Pirko
2023-01-19 15:10 ` Lucero Palau, Alejandro
2023-01-20 8:55 ` [PATCH net-next 0/7] sfc: devlink support for ef100 Martin Habets
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=1a3387e7-dbe3-905a-4b7a-ef2cd776cb33@intel.com \
--to=jacob.e.keller@intel.com \
--cc=alejandro.lucero-palau@amd.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=habetsm@gmail.com \
--cc=kuba@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).