netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli.us>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>
Subject: Re: [net-next v2 09/11] devlink: implement DEVLINK_CMD_REGION_NEW
Date: Thu, 26 Mar 2020 22:10:54 +0100	[thread overview]
Message-ID: <20200326211054.GA11304@nanopsycho.orion> (raw)
In-Reply-To: <5fe502ca-8b67-673c-150a-86a28938faad@intel.com>

Thu, Mar 26, 2020 at 05:19:30PM CET, jacob.e.keller@intel.com wrote:
>
>
>On 3/26/2020 1:52 AM, Jiri Pirko wrote:
>> Thu, Mar 26, 2020 at 04:51:55AM CET, jacob.e.keller@intel.com wrote:
>> 
>> [...]
>> 
>>> +	err = __devlink_snapshot_id_insert(devlink, snapshot_id);
>>> +	if (err) {
>>> +		return err;
>>> +	}
>>> +
>>> +	err = region->ops->snapshot(devlink, info->extack, &data);
>>> +	if (err)
>>> +		goto snapshot_capture_failure;
>>> +
>>> +	err = __devlink_region_snapshot_create(region, data, snapshot_id);
>>> +	if (err)
>>> +		goto snapshot_create_failure;
>>> +
>>> +	return 0;
>>> +
>>> +snapshot_create_failure:
>>> +	region->ops->destructor(data);
>>> +snapshot_capture_failure:
>> 
>> Eh, this actually should be "err_snapshot_capture" and
>> "err_snapshot_create"
>> 
>
>Sure. It seems a lot of functions use "out" or "nla_put_failure", or

yeah, "nla_put_failure" is a special kind that is used through the net
code.


>other styles.
>
>$grep "^[A-Za-z0-9_]*:" net/core/devlink.c | sort | uniq -c | less
>      1 dump_err:
>      1 err_action_value_put:
>      1 err_action_values_put:
>      1 err_cancel_msg:
>      1 err_group_init:
>      1 err_group_link:
>      1 err_match_value_put:
>      1 err_match_values_put:
>      1 err_resource_put:
>      2 err_stats_alloc:
>      2 err_table_put:
>      1 err_trap_fill:
>      1 err_trap_group_fill:
>      1 err_trap_group_register:
>      1 err_trap_group_verify:
>      1 err_trap_init:
>      1 err_trap_register:
>      1 err_trap_verify:
>      1 free_msg:
>      2 genlmsg_cancel:
>      1 id_increment_failure:
>     34 nla_put_failure:
>      1 nla_put_failure_type_locked:
>     27 out:
>      1 out_cancel_msg:
>      1 out_dev:
>      2 out_free_msg:
>      1 out_unlock:
>      1 param_nest_cancel:
>      1 reporter_nest_cancel:
>      1 resource_put_failure:
>      1 rollback:
>      4 send_done:
>      1 snapshot_capture_failure:
>      1 snapshot_create_failure:
>      3 start_again:
>      9 unlock:
>      1 value_nest_cancel:
>      1 values_list_nest_cancel:
>
>But I'll change these.

  reply	other threads:[~2020-03-26 21:11 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  3:51 [net-next v2 00/11] implement DEVLINK_CMD_REGION_NEW Jacob Keller
2020-03-26  3:51 ` [net-next v2 01/11] devlink: prepare to support region operations Jacob Keller
2020-03-26  3:51 ` [net-next v2 02/11] devlink: convert snapshot destructor callback to region op Jacob Keller
2020-03-26  3:51 ` [net-next v2 03/11] devlink: trivial: fix tab in function documentation Jacob Keller
2020-03-26  3:51 ` [net-next v2 04/11] devlink: add function to take snapshot while locked Jacob Keller
2020-03-26  3:51 ` [net-next v2 05/11] devlink: use -ENOSPC to indicate no more room for snapshots Jacob Keller
2020-03-26  7:24   ` Jiri Pirko
2020-03-26  3:51 ` [net-next v2 06/11] devlink: extract snapshot id allocation to helper function Jacob Keller
2020-03-26  7:25   ` Jiri Pirko
2020-03-26  3:51 ` [net-next v2 07/11] devlink: report error once U32_MAX snapshot ids have been used Jacob Keller
2020-03-26  7:30   ` Jiri Pirko
2020-03-26 16:09     ` Keller, Jacob E
2020-03-26  3:51 ` [net-next v2 08/11] devlink: track snapshot id usage count using an xarray Jacob Keller
2020-03-26  8:35   ` Jiri Pirko
2020-03-26  3:51 ` [net-next v2 09/11] devlink: implement DEVLINK_CMD_REGION_NEW Jacob Keller
2020-03-26  8:51   ` Jiri Pirko
2020-03-26  8:52   ` Jiri Pirko
2020-03-26 16:19     ` Jacob Keller
2020-03-26 21:10       ` Jiri Pirko [this message]
2020-03-26  3:51 ` [net-next v2 10/11] netdevsim: support taking immediate snapshot via devlink Jacob Keller
2020-03-26  9:00   ` Jiri Pirko
2020-03-26  3:51 ` [net-next v2 11/11] ice: add a devlink region for dumping NVM contents Jacob Keller
2020-03-26  9:02   ` Jiri Pirko
2020-03-26 16:23     ` Jacob Keller
2020-03-26 21:11       ` Jiri Pirko
2020-03-26  7:23 ` [net-next v2 00/11] implement DEVLINK_CMD_REGION_NEW Jiri Pirko
2020-03-26  7:51 ` Jiri Pirko
2020-03-26 16:15   ` Jacob Keller
2020-03-26 21:12     ` Jiri Pirko
2020-03-26  8:36 ` Jiri Pirko
2020-03-26  8:54 ` Jiri Pirko
2020-03-26 18:27 ` David Miller
2020-03-26 18:29   ` Jacob Keller

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=20200326211054.GA11304@nanopsycho.orion \
    --to=jiri@resnulli.us \
    --cc=jacob.e.keller@intel.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).