All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Laatz, Kevin" <kevin.laatz@intel.com>
To: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
Cc: dev@dpdk.org, harry.van.haaren@intel.com,
	stephen@networkplumber.org, shreyansh.jain@nxp.com,
	thomas@monjalon.net, mattias.ronnblom@ericsson.com,
	bruce.richardson@intel.com
Subject: Re: [PATCH v5 01/13] eal: add param register infrastructure
Date: Thu, 18 Oct 2018 16:58:28 +0100	[thread overview]
Message-ID: <c1e81ddd-0f02-6f19-dfb5-e0970de3469c@intel.com> (raw)
In-Reply-To: <20181017155602.kz2kpxx76cwutnbg@bidouze.vm.6wind.com>

Hi Gaetan,

Thanks for reviewing and providing suggestions.


On 17/10/2018 16:56, Gaëtan Rivet wrote:

>> +
>> +int
>> +rte_param_parse(char *option)
>> +{
>> +	/* Check if the option is in the registered inits */
>> +	TAILQ_FOREACH(param, &rte_param_list, next) {
>> +		if (strcmp(option, param->eal_option) == 0) {
>> +			param->enabled = 1;
>> +			return 0;
>> +		}
>> +	}
>> +
>> +	return -1;
>> +}
>> +
>> +void __rte_experimental
>> +rte_param_register(struct rte_param *reg_param)
>> +{
>> +	TAILQ_INSERT_HEAD(&rte_param_list, reg_param, next);
> What happens when an option already exists in the list?
Will add a check to avoid option duplication, good spot. Thanks
>> @@ -1071,6 +1080,13 @@ rte_eal_init(int argc, char **argv)
>>   
>>   	rte_eal_mcfg_complete();
>>   
>> +	/* Call each registered callback, if enabled */
>> +	ret = rte_param_init();
>> +	if (ret < 0) {
>> +		rte_eal_init_alert("Callback failed\n");
> It would be better to be able to know which function failed
> and why. "Callback failed" is not helpful to the user.
> Maybe rte_option_init() return value should be expanded to allow
> for error string, error value to be passed, that could come from the
> library itself, or simply printing the option name that is the source of
> the error.
I agree that the error message is not helpful. Expanding the return 
value to pass the option name or more would be difficult however as we 
would need to check for success/fail of the execution of the callback in 
rte_option_init(). Since the we don't know what the return type of a 
given registered callback is, it is difficult to do the error checking here.
With that in mind, I think it might be best to leave the library's 
function do the error checking itself, and changing the return type of 
rte_option_init() to void. This way we could get library specific errors 
using RTE_LOG, for example. Thoughts?

Best regards,
Kevin

  reply	other threads:[~2018-10-18 15:58 UTC|newest]

Thread overview: 220+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 12:08 [PATCH 00/11] introduce telemetry library Ciara Power
2018-08-23 12:08 ` [PATCH 01/11] telemetry: initial telemetry infrastructure Ciara Power
2018-08-23 23:17   ` Stephen Hemminger
2018-08-23 23:17   ` Stephen Hemminger
2018-08-23 23:18   ` Stephen Hemminger
2018-08-23 23:19   ` Stephen Hemminger
2018-08-23 23:22   ` Stephen Hemminger
2018-08-28 17:12     ` Van Haaren, Harry
2018-08-24 13:03   ` Shreyansh Jain
2018-08-28 16:50     ` Van Haaren, Harry
2018-08-28 11:46   ` Gaëtan Rivet
2018-08-28 16:54     ` Van Haaren, Harry
2018-08-29  8:23       ` Gaëtan Rivet
2018-08-23 12:08 ` [PATCH 02/11] telemetry: add initial connection socket Ciara Power
2018-08-28 16:40   ` Gaëtan Rivet
2018-08-28 17:03     ` Van Haaren, Harry
2018-09-07  9:48   ` Burakov, Anatoly
2018-08-23 12:08 ` [PATCH 03/11] telemetry: add client feature and sockets Ciara Power
2018-08-23 23:27   ` Stephen Hemminger
2018-08-28 15:26     ` Hunt, David
2018-08-28 17:09       ` Van Haaren, Harry
2018-08-23 12:08 ` [PATCH 04/11] telemetry: add parser for client socket messages Ciara Power
2018-08-30 23:57   ` Gaëtan Rivet
2018-08-23 12:08 ` [PATCH 05/11] telemetry: update metrics before sending stats Ciara Power
2018-08-23 12:08 ` [PATCH 06/11] telemetry: format json response when " Ciara Power
2018-08-23 12:08 ` [PATCH 07/11] telemetry: add tests for telemetry api Ciara Power
2018-08-23 23:15   ` Stephen Hemminger
2018-08-23 12:08 ` [PATCH 08/11] telemetry: add vdev kvargs for selftest Ciara Power
2018-08-23 12:08 ` [PATCH 09/11] doc: add telemetry documentation Ciara Power
2018-09-25  8:53   ` Kovacevic, Marko
2018-08-23 12:08 ` [PATCH 10/11] usertools: add client python script for telemetry Ciara Power
2018-08-23 12:08 ` [PATCH 11/11] telemetry: add collectd plugin patch Ciara Power
2018-09-18  9:52   ` Thomas Monjalon
2018-09-19 11:09     ` Laatz, Kevin
2018-10-03 17:36 ` [PATCH v2 00/10] introduce telemetry library Kevin Laatz
2018-10-03 17:36   ` [PATCH v2 01/10] telemetry: initial telemetry infrastructure Kevin Laatz
2018-10-04 14:13     ` Gaëtan Rivet
2018-10-03 17:36   ` [PATCH v2 02/10] telemetry: add initial connection socket Kevin Laatz
2018-10-03 18:40     ` Mattias Rönnblom
2018-10-03 19:36       ` Thomas Monjalon
2018-10-03 19:49         ` Mattias Rönnblom
2018-10-03 17:36   ` [PATCH v2 03/10] telemetry: add client feature and sockets Kevin Laatz
2018-10-03 19:06     ` Mattias Rönnblom
2018-10-03 17:36   ` [PATCH v2 04/10] telemetry: add parser for client socket messages Kevin Laatz
2018-10-03 17:36   ` [PATCH v2 05/10] telemetry: update metrics before sending stats Kevin Laatz
2018-10-03 17:36   ` [PATCH v2 06/10] telemetry: format json response when " Kevin Laatz
2018-10-03 17:36   ` [PATCH v2 07/10] telemetry: add tests for telemetry api Kevin Laatz
2018-10-03 17:36   ` [PATCH v2 08/10] telemetry: add ability to disable selftest Kevin Laatz
2018-10-03 17:36   ` [PATCH v2 09/10] doc: add telemetry documentation Kevin Laatz
2018-10-03 17:36   ` [PATCH v2 10/10] usertools: add client python script for telemetry Kevin Laatz
2018-10-04 13:00   ` [PATCH v2 00/10] introduce telemetry library Van Haaren, Harry
2018-10-04 13:25   ` Van Haaren, Harry
2018-10-04 15:16     ` Gaëtan Rivet
2018-10-04 15:53     ` Thomas Monjalon
2018-10-05 22:05       ` Gaëtan Rivet
2018-10-09 10:33       ` Van Haaren, Harry
2018-10-09 11:41         ` Thomas Monjalon
2018-10-09 14:56           ` Bruce Richardson
2018-10-09 17:07             ` Thomas Monjalon
2018-10-10 10:51   ` [PATCH v3 00/12] " Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 01/12] eal: add param register infrastructure Kevin Laatz
2018-10-10 12:28       ` Thomas Monjalon
2018-10-10 10:51     ` [PATCH v3 02/12] telemetry: initial telemetry infrastructure Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 03/12] telemetry: add initial connection socket Kevin Laatz
2018-10-10 12:24       ` Thomas Monjalon
2018-10-10 10:51     ` [PATCH v3 04/12] telemetry: add client feature and sockets Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 05/12] telemetry: add parser for client socket messages Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 06/12] telemetry: update metrics before sending stats Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 07/12] telemetry: format json response when " Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 08/12] telemetry: add tests for telemetry api Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 09/12] telemetry: add ability to disable selftest Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 10/12] doc: add telemetry documentation Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 11/12] usertools: add client python script for telemetry Kevin Laatz
2018-10-10 10:51     ` [PATCH v3 12/12] build: add dependency on telemetry to apps in meson Kevin Laatz
2018-10-11 16:58     ` [PATCH v4 00/13] introduce telemetry library Kevin Laatz
2018-10-11 16:58       ` [PATCH v4 01/13] eal: add param register infrastructure Kevin Laatz
2018-10-16  0:45         ` Van Haaren, Harry
2018-10-16 13:42         ` Thomas Monjalon
2018-10-16 14:20           ` Laatz, Kevin
2018-10-16 15:13             ` Thomas Monjalon
2018-10-11 16:58       ` [PATCH v4 02/13] eal: make get runtime dir function public Kevin Laatz
2018-10-16  0:45         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 03/13] telemetry: initial telemetry infrastructure Kevin Laatz
2018-10-16  0:45         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 04/13] telemetry: add initial connection socket Kevin Laatz
2018-10-16  0:45         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 05/13] telemetry: add client feature and sockets Kevin Laatz
2018-10-16  0:45         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 06/13] telemetry: add parser for client socket messages Kevin Laatz
2018-10-16  0:45         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 07/13] telemetry: update metrics before sending stats Kevin Laatz
2018-10-16  0:45         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 08/13] telemetry: format json response when " Kevin Laatz
2018-10-16  0:46         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 09/13] telemetry: add tests for telemetry api Kevin Laatz
2018-10-16  0:46         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 10/13] telemetry: add ability to disable selftest Kevin Laatz
2018-10-16  0:47         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 11/13] doc: add telemetry documentation Kevin Laatz
2018-10-16  0:47         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 12/13] usertools: add client python script for telemetry Kevin Laatz
2018-10-16  0:47         ` Van Haaren, Harry
2018-10-11 16:58       ` [PATCH v4 13/13] build: add dependency on telemetry to apps in meson Kevin Laatz
2018-10-16  0:47         ` Van Haaren, Harry
2018-10-16 15:57       ` [PATCH v5 00/13] introduce telemetry library Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 01/13] eal: add param register infrastructure Kevin Laatz
2018-10-17  9:41           ` Thomas Monjalon
2018-10-17 11:45             ` Gaëtan Rivet
2018-10-17 13:46               ` Thomas Monjalon
2018-10-17 14:09                 ` Laatz, Kevin
2018-10-17 14:20                   ` Thomas Monjalon
2018-10-17 13:55               ` Laatz, Kevin
2018-10-17 15:56           ` Gaëtan Rivet
2018-10-18 15:58             ` Laatz, Kevin [this message]
2018-10-16 15:57         ` [PATCH v5 02/13] eal: make get runtime dir function public Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 03/13] telemetry: initial telemetry infrastructure Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 04/13] telemetry: add initial connection socket Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 05/13] telemetry: add client feature and sockets Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 06/13] telemetry: add parser for client socket messages Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 07/13] telemetry: update metrics before sending stats Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 08/13] telemetry: format json response when " Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 09/13] telemetry: add tests for telemetry api Kevin Laatz
2018-10-16 15:57         ` [PATCH v5 10/13] telemetry: add ability to disable selftest Kevin Laatz
2018-10-16 15:58         ` [PATCH v5 11/13] doc: add telemetry documentation Kevin Laatz
2018-10-16 15:58         ` [PATCH v5 12/13] usertools: add client python script for telemetry Kevin Laatz
2018-10-16 15:58         ` [PATCH v5 13/13] build: add dependency on telemetry to apps in meson Kevin Laatz
2018-10-18  8:07         ` [PATCH v5 00/13] introduce telemetry library Mattias Rönnblom
2018-10-19 10:16           ` Laatz, Kevin
2018-10-22  7:11             ` Mattias Rönnblom
2018-10-22  9:03               ` Laatz, Kevin
2018-10-22 11:00         ` [PATCH v6 " Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 01/13] eal: add option register infrastructure Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 02/13] eal: make get runtime dir function public Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 03/13] telemetry: initial telemetry infrastructure Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 04/13] telemetry: add initial connection socket Kevin Laatz
2018-10-22 13:50             ` Mattias Rönnblom
2018-10-22 11:00           ` [PATCH v6 05/13] telemetry: add client feature and sockets Kevin Laatz
2018-10-22 14:05             ` Mattias Rönnblom
2018-10-23  8:42               ` Laatz, Kevin
2018-10-22 11:00           ` [PATCH v6 06/13] telemetry: add parser for client socket messages Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 07/13] telemetry: update metrics before sending stats Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 08/13] telemetry: format json response when " Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 09/13] telemetry: add tests for telemetry api Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 10/13] telemetry: add ability to disable selftest Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 11/13] doc: add telemetry documentation Kevin Laatz
2018-10-22 12:25             ` Kovacevic, Marko
2018-10-22 11:00           ` [PATCH v6 12/13] usertools: add client python script for telemetry Kevin Laatz
2018-10-22 11:00           ` [PATCH v6 13/13] build: add dependency on telemetry to apps in meson Kevin Laatz
2018-10-24 13:27           ` [PATCH v7 00/13] introduce telemetry library Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 01/13] eal: add option register infrastructure Kevin Laatz
2018-10-24 14:01               ` Gaëtan Rivet
2018-10-24 14:33                 ` Thomas Monjalon
2018-10-24 14:52                   ` Laatz, Kevin
2018-10-24 15:05                     ` Laatz, Kevin
2018-10-24 13:27             ` [PATCH v7 02/13] eal: make get runtime dir function public Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 03/13] telemetry: initial telemetry infrastructure Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 04/13] telemetry: add initial connection socket Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 05/13] telemetry: add client feature and sockets Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 06/13] telemetry: add parser for client socket messages Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 07/13] telemetry: update metrics before sending stats Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 08/13] telemetry: format json response when " Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 09/13] telemetry: add tests for telemetry api Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 10/13] telemetry: add ability to disable selftest Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 11/13] doc: add telemetry documentation Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 12/13] usertools: add client python script for telemetry Kevin Laatz
2018-10-24 13:27             ` [PATCH v7 13/13] build: add dependency on telemetry to apps in meson Kevin Laatz
2018-10-24 14:13             ` [PATCH v7 00/13] introduce telemetry library Thomas Monjalon
2018-10-24 14:49               ` Laatz, Kevin
2018-10-24 16:02             ` [PATCH v8 " Kevin Laatz
2018-10-24 16:02               ` [PATCH v8 01/13] eal: add option register infrastructure Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 02/13] eal: make get runtime dir function public Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 03/13] telemetry: initial telemetry infrastructure Kevin Laatz
2018-10-25 20:33                 ` Thomas Monjalon
2018-10-24 16:03               ` [PATCH v8 04/13] telemetry: add initial connection socket Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 05/13] telemetry: add client feature and sockets Kevin Laatz
2018-10-25 20:29                 ` Thomas Monjalon
2018-10-25 20:41                   ` Thomas Monjalon
2018-10-25 20:44                     ` Bruce Richardson
2018-10-25 20:49                       ` Thomas Monjalon
2018-10-25 21:16                         ` Richardson, Bruce
2018-10-25 23:58                           ` Thomas Monjalon
2018-10-24 16:03               ` [PATCH v8 06/13] telemetry: add parser for client socket messages Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 07/13] telemetry: update metrics before sending stats Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 08/13] telemetry: format json response when " Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 09/13] telemetry: add tests for telemetry api Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 10/13] telemetry: add ability to disable selftest Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 11/13] doc: add telemetry documentation Kevin Laatz
2018-10-25 20:31                 ` Thomas Monjalon
2018-10-24 16:03               ` [PATCH v8 12/13] usertools: add client python script for telemetry Kevin Laatz
2018-10-24 16:03               ` [PATCH v8 13/13] build: add dependency on telemetry to apps in meson Kevin Laatz
2018-10-26 23:59               ` [PATCH v9 00/12] Introduce Telemetry Library Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 01/12] eal: add option register infrastructure Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 02/12] eal: make get runtime dir function public Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 03/12] telemetry: initial telemetry infrastructure Harry van Haaren
2018-10-27  1:56                   ` Thomas Monjalon
2018-10-27  2:19                     ` Van Haaren, Harry
2018-10-27  2:33                       ` Thomas Monjalon
2018-10-26 23:59                 ` [PATCH v9 04/12] telemetry: add initial connection socket Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 05/12] telemetry: add client feature and sockets Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 06/12] telemetry: add parser for client socket messages Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 07/12] telemetry: update metrics before sending stats Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 08/12] telemetry: format json response when " Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 09/12] telemetry: add ability to disable selftest Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 10/12] doc: add telemetry documentation Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 11/12] usertools: add client python script for telemetry Harry van Haaren
2018-10-26 23:59                 ` [PATCH v9 12/12] build: add dependency on telemetry to apps in meson Harry van Haaren
2018-10-27  9:17                 ` [PATCH v10 00/12] Introduce Telemetry Library Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 01/12] eal: add option register infrastructure Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 02/12] eal: make get runtime dir function public Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 03/12] telemetry: initial telemetry infrastructure Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 04/12] telemetry: add initial connection socket Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 05/12] telemetry: add client feature and sockets Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 06/12] telemetry: add parser for client socket messages Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 07/12] telemetry: update metrics before sending stats Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 08/12] telemetry: format json response when " Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 09/12] telemetry: add ability to disable selftest Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 10/12] doc: add telemetry documentation Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 11/12] usertools: add client python script for telemetry Harry van Haaren
2018-10-27  9:17                   ` [PATCH v10 12/12] build: add dependency on telemetry to apps in meson Harry van Haaren
2018-10-27 13:24                   ` [PATCH v10 00/12] Introduce Telemetry Library Thomas Monjalon

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=c1e81ddd-0f02-6f19-dfb5-e0970de3469c@intel.com \
    --to=kevin.laatz@intel.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=gaetan.rivet@6wind.com \
    --cc=harry.van.haaren@intel.com \
    --cc=mattias.ronnblom@ericsson.com \
    --cc=shreyansh.jain@nxp.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.