mbox series

[v4,0/5] Logging related patchs

Message ID 20230626184223.155390-1-stephen@networkplumber.org (mailing list archive)
Headers
Series Logging related patchs |

Message

Stephen Hemminger June 26, 2023, 6:42 p.m. UTC
  This patch set rebases and extends some earlier work on logging.

Stephen Hemminger (5):
  eal: unify logging code for FreeBsd and Linux
  eal: turn off getopt_long error message during eal_log_level
  eal: skip stdio on console logging
  eal: move logging initialization earlier
  eal: add option to put timestamp on console output

 .../freebsd_gsg/freebsd_eal_parameters.rst    | 32 +++++++
 doc/guides/linux_gsg/linux_eal_parameters.rst |  5 +
 lib/eal/common/eal_common_options.c           |  6 ++
 lib/eal/common/eal_internal_cfg.h             |  3 +
 lib/eal/common/eal_options.h                  |  2 +
 lib/eal/freebsd/eal.c                         | 39 +++++---
 lib/eal/linux/eal.c                           | 48 +++++-----
 lib/eal/linux/eal_log.c                       | 61 ------------
 lib/eal/linux/meson.build                     |  1 -
 lib/eal/unix/eal_log.c                        | 93 +++++++++++++++++++
 lib/eal/unix/meson.build                      |  1 +
 lib/eal/windows/eal.c                         |  3 +
 12 files changed, 194 insertions(+), 100 deletions(-)
 delete mode 100644 lib/eal/linux/eal_log.c
 create mode 100644 lib/eal/unix/eal_log.c
  

Comments

Morten Brørup June 27, 2023, 7:40 a.m. UTC | #1
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Monday, 26 June 2023 20.42
> To: dev@dpdk.org
> Cc: Stephen Hemminger
> Subject: [PATCH v4 0/5] Logging related patchs
> 
> This patch set rebases and extends some earlier work on logging.
> 
> Stephen Hemminger (5):
>   eal: unify logging code for FreeBsd and Linux
>   eal: turn off getopt_long error message during eal_log_level
>   eal: skip stdio on console logging
>   eal: move logging initialization earlier
>   eal: add option to put timestamp on console output

Series-acked-by: Morten Brørup <mb@smartsharesystems.com>
  
Stephen Hemminger June 27, 2023, 2:49 p.m. UTC | #2
On Tue, 27 Jun 2023 09:40:01 +0200
Morten Brørup <mb@smartsharesystems.com> wrote:

> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Monday, 26 June 2023 20.42
> > To: dev@dpdk.org
> > Cc: Stephen Hemminger
> > Subject: [PATCH v4 0/5] Logging related patchs
> > 
> > This patch set rebases and extends some earlier work on logging.
> > 
> > Stephen Hemminger (5):
> >   eal: unify logging code for FreeBsd and Linux
> >   eal: turn off getopt_long error message during eal_log_level
> >   eal: skip stdio on console logging
> >   eal: move logging initialization earlier
> >   eal: add option to put timestamp on console output  
> 
> Series-acked-by: Morten Brørup <mb@smartsharesystems.com>
> 

There are a few bugs, still working them out.
In initial review feedback there was desire for timestamp feature
to be global. I.e secondary process would show time since start
of primary. But this would hard to implement due to chicken/egg
issues during argument parsing during startup; so made a decision
that it wasn't worth doing.
  
Bruce Richardson June 27, 2023, 3:02 p.m. UTC | #3
On Tue, Jun 27, 2023 at 09:40:01AM +0200, Morten Brørup wrote:
> > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > Sent: Monday, 26 June 2023 20.42
> > To: dev@dpdk.org
> > Cc: Stephen Hemminger
> > Subject: [PATCH v4 0/5] Logging related patchs
> > 
> > This patch set rebases and extends some earlier work on logging.
> > 
> > Stephen Hemminger (5):
> >   eal: unify logging code for FreeBsd and Linux
> >   eal: turn off getopt_long error message during eal_log_level
> >   eal: skip stdio on console logging
> >   eal: move logging initialization earlier
> >   eal: add option to put timestamp on console output
> 
> Series-acked-by: Morten Brørup <mb@smartsharesystems.com>
> 
Gave it a quick sanity-test run on FreeBSD and all looks ok to me.

Tested-by: Bruce Richardson <bruce.richardson@intel.com>
  
Morten Brørup June 27, 2023, 3:04 p.m. UTC | #4
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Tuesday, 27 June 2023 16.49
> 
> On Tue, 27 Jun 2023 09:40:01 +0200
> Morten Brørup <mb@smartsharesystems.com> wrote:
> 
> > > From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> > > Sent: Monday, 26 June 2023 20.42
> > > To: dev@dpdk.org
> > > Cc: Stephen Hemminger
> > > Subject: [PATCH v4 0/5] Logging related patchs
> > >
> > > This patch set rebases and extends some earlier work on logging.
> > >
> > > Stephen Hemminger (5):
> > >   eal: unify logging code for FreeBsd and Linux
> > >   eal: turn off getopt_long error message during eal_log_level
> > >   eal: skip stdio on console logging
> > >   eal: move logging initialization earlier
> > >   eal: add option to put timestamp on console output
> >
> > Series-acked-by: Morten Brørup <mb@smartsharesystems.com>
> >
> 
> There are a few bugs, still working them out.
> In initial review feedback there was desire for timestamp feature
> to be global. I.e secondary process would show time since start
> of primary. But this would hard to implement due to chicken/egg
> issues during argument parsing during startup; so made a decision
> that it wasn't worth doing.

I suppose it could be implemented with a piece of shared memory set by the primary process and read by secondary processes, holding the start time offset from a system global timer (e.g. CLOCK_MONOTONIC) and a tristate variable telling if timestamps are configured - which, if true or false, overrides any timestamp parameter given to the secondary process.

Anyway, secondary process support is far from perfect, so I wouldn't worry too much about getting timestamp parameters from the primary process to the secondary process either. In short: I agree with your decision.