DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Van Haaren, Harry" <harry.van.haaren@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] service: print errors to rte log
Date: Wed, 21 Aug 2019 08:58:42 +0000	[thread overview]
Message-ID: <E923DB57A917B54B9182A2E928D00FA6758D3E12@IRSMSX102.ger.corp.intel.com> (raw)
In-Reply-To: <20190820233256.27405-1-stephen@networkplumber.org>

> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Wednesday, August 21, 2019 12:33 AM
> To: Van Haaren, Harry <harry.van.haaren@intel.com>
> Cc: dev@dpdk.org; Stephen Hemminger <stephen@networkplumber.org>
> Subject: [PATCH] service: print errors to rte log
> 
> EAL should always use rte_log instead of putting errors to
> stderr (which maybe redirected to /dev/null in a daemon).
> 
> Also checks for null before rte_free are unnecessary.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Thanks - good improvements.

A few nit-picks, I'll send a v2 based on your changes here with
the below notes implemented.

I'll add my Sign-off for code changes, and Acked-by for the whole,
hope that's OK, if you'd prefer two different patches just let me know.

-H

> ---
>  lib/librte_eal/common/rte_service.c | 23 +++++++++++------------
>  1 file changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/lib/librte_eal/common/rte_service.c
> b/lib/librte_eal/common/rte_service.c
> index c3653ebae46c..aa2f8f3ef4b1 100644
> --- a/lib/librte_eal/common/rte_service.c
> +++ b/lib/librte_eal/common/rte_service.c
> @@ -70,10 +70,12 @@ static struct rte_service_spec_impl *rte_services;
>  static struct core_state *lcore_states;
>  static uint32_t rte_service_library_initialized;
> 
> +
>  int32_t rte_service_init(void)
>  {

Added line here should really split return-value and function into
two lines. Found another instance of this, splitting that too to make
the whole file consistent.

Rest of file uses 1 line to split variable declarations and functions,
so one line will do.

<snip>

>  	if (!rte_services) {
> -		printf("error allocating rte services array\n");
> +		RTE_LOG(ERR, EAL,
> +			"error allocating rte services array\n");
>  		goto fail_mem;

Some of these "strings" can be on the same line as RTE_LOG and stay
inside the 80 char limit, moving them up a line for consistency.

  reply	other threads:[~2019-08-21  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-20 23:32 Stephen Hemminger
2019-08-21  8:58 ` Van Haaren, Harry [this message]
2019-08-21  9:12 ` [dpdk-dev] [PATCH v2] " Harry van Haaren
2019-10-15 18:40   ` David Marchand

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=E923DB57A917B54B9182A2E928D00FA6758D3E12@IRSMSX102.ger.corp.intel.com \
    --to=harry.van.haaren@intel.com \
    --cc=dev@dpdk.org \
    --cc=stephen@networkplumber.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).