public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Simon Horman <simon.horman@corigine.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
	pabeni@redhat.com, edumazet@google.com, tariqt@nvidia.com,
	saeedm@nvidia.com, jacob.e.keller@intel.com, gal@nvidia.com,
	kim.phillips@amd.com, moshe@nvidia.com
Subject: Re: [patch net-next 5/7] devlink: convert param list to xarray
Date: Fri, 10 Feb 2023 08:53:16 +0100	[thread overview]
Message-ID: <Y+X37DzDakgVVAZL@nanopsycho> (raw)
In-Reply-To: <Y+UjMZre+qzqO4Th@corigine.com>

Thu, Feb 09, 2023 at 05:45:37PM CET, simon.horman@corigine.com wrote:
>On Thu, Feb 09, 2023 at 04:43:06PM +0100, Jiri Pirko wrote:
>> From: Jiri Pirko <jiri@nvidia.com>
>> 
>> Loose the linked list for params and use xarray instead.
>
>I gather this is related to:
>
>[patch net-next 6/7] devlink: allow to call
>        devl_param_driverinit_value_get() without holding instance lock
>
>Perhaps it is worth mentioning that here.

Well I do that in the cover letter. But I will make a note here and in
the other patch too.

Thanks!

>
>> Signed-off-by: Jiri Pirko <jiri@nvidia.com>
>
>Irregardless, this looks good to me.
>
>Reviewed-by: Simon Horman <simon.horman@corigine.com>
>
>...
>
>> diff --git a/net/devlink/leftover.c b/net/devlink/leftover.c
>> index bbace07ff063..805c2b7ff468 100644
>> --- a/net/devlink/leftover.c
>> +++ b/net/devlink/leftover.c
>> @@ -3954,26 +3954,22 @@ static int devlink_param_driver_verify(const struct devlink_param *param)
>
>...
>
>>  static struct devlink_param_item *
>> -devlink_param_find_by_id(struct list_head *param_list, u32 param_id)
>> +devlink_param_find_by_id(struct xarray *params, u32 param_id)
>>  {
>> -	struct devlink_param_item *param_item;
>> -
>> -	list_for_each_entry(param_item, param_list, list)
>> -		if (param_item->param->id == param_id)
>> -			return param_item;
>> -	return NULL;
>> +	return xa_load(params, param_id);
>>  }
>
>This change is particularly pleasing :)
>
>...

  reply	other threads:[~2023-02-10  7:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-09 15:43 [patch net-next 0/7] devlink: params cleanups and devl_param_driverinit_value_get() fix Jiri Pirko
2023-02-09 15:43 ` [patch net-next 1/7] devlink: don't use strcpy() to copy param value Jiri Pirko
2023-02-09 16:39   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 2/7] devlink: make sure driver does not read updated driverinit param before reload Jiri Pirko
2023-02-09 16:42   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 3/7] devlink: fix the name of value arg of devl_param_driverinit_value_get() Jiri Pirko
2023-02-09 16:43   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 4/7] devlink: use xa_for_each_start() helper in devlink_nl_cmd_port_get_dump_one() Jiri Pirko
2023-02-09 16:43   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 5/7] devlink: convert param list to xarray Jiri Pirko
2023-02-09 16:45   ` Simon Horman
2023-02-10  7:53     ` Jiri Pirko [this message]
2023-02-10  8:51       ` Simon Horman
2023-02-09 15:43 ` [patch net-next 6/7] devlink: allow to call devl_param_driverinit_value_get() without holding instance lock Jiri Pirko
2023-02-09 16:46   ` Simon Horman
2023-02-09 15:43 ` [patch net-next 7/7] devlink: add forgotten devlink instance lock assertion to devl_param_driverinit_value_set() Jiri Pirko
2023-02-09 16:47   ` Simon Horman
2023-02-09 21:05 ` [patch net-next 0/7] devlink: params cleanups and devl_param_driverinit_value_get() fix Kim Phillips
2023-02-09 21:31   ` Jakub Kicinski
2023-02-09 22:37     ` Kim Phillips
2023-02-10  0:16       ` Jakub Kicinski
2023-02-10  7:55       ` Jiri Pirko
2023-02-10  4:53 ` Jakub Kicinski
2023-02-10  7:56   ` Jiri Pirko

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=Y+X37DzDakgVVAZL@nanopsycho \
    --to=jiri@resnulli.us \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=jacob.e.keller@intel.com \
    --cc=kim.phillips@amd.com \
    --cc=kuba@kernel.org \
    --cc=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=simon.horman@corigine.com \
    --cc=tariqt@nvidia.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