From: Jay Rolette <rolette@infiniteio.com>
To: David Marchand <david.marchand@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 01/11] ixgbe: clean log messages
Date: Wed, 27 Aug 2014 08:53:46 -0500 [thread overview]
Message-ID: <CADNuJVqKAPqXtZziEfwGa0iLsEg0N9ujFC_6ZbA2z5D2GDat9g@mail.gmail.com> (raw)
In-Reply-To: <CALwxeUtqN+vZnHODvNgV7FvGGAKTtr7x2gxnoPosbcJx73sx9Q@mail.gmail.com>
Hi David,
The updated output is definitely an improvement, but if you'll go with the
first solution you described (adding \n in the log macro), it works much
better for products using DPDK. For developer use, I think it ends up being
a wash either way.
At least for my product (embedded network appliance), we want to capture
anything that is logging in syslog. The log macros in DPDK make that very
reasonable to do, but if there are embedded newlines, it ends up screwing
up log parsing when someone wants to process logs later.
We end up having to remove all of those newlines, which makes it harder to
merge as new releases coming out.
I'm assuming most products have similar requirements for logging. That's at
least been the case for the products I've been involved with over the years.
If the PMDs are using PMD_LOG as a replacement macro for debugging
printf's, I can see where this might be a little more pain, but having
PMD_LOG is a lot more useful it if easily integrates with central logging
facilities.
Thanks,
Jay
On Tue, Aug 26, 2014 at 9:55 AM, David Marchand <david.marchand@6wind.com>
wrote:
> Hello Jay,
>
> On Tue, Aug 26, 2014 at 4:23 PM, Jay Rolette <rolette@infiniteio.com>
> wrote:
>
>> Why are you adding newlines to log message strings? Shouldn't that be up
>> to whatever the messages end up getting routed to?
>>
>
> Actually, I wanted to have consistent log formats in the PMDs so that the
> log messages displayed at runtime are aligned (and not bouncing with \n
> before or after the log message).
> There was two solutions from my point of view :
> - either always add a \n in the log macro and remove all trailing \n
> - do the opposite
>
> I preferred the latter as it let users of the macro set the message format
> as they want.
>
>
> Before this change :
>
> Configuring Port 0 (socket 1)
> PMD: ixgbe_dev_tx_queue_setup(): sw_ring=0x7f3e59cd8080
> hw_ring=0x7f3e59d02080 dma_addr=0x727702080
>
> PMD: ixgbe_dev_tx_queue_setup(): Using simple tx code path
>
> PMD: ixgbe_dev_tx_queue_setup(): Vector tx enabled.
>
> PMD: ixgbe_dev_rx_queue_setup(): sw_ring=0x7f3e59cd57c0
> hw_ring=0x7f3e59d12080 dma_addr=0x727712080
>
> PMD: ixgbe_dev_rx_queue_setup(): Rx Burst Bulk Alloc Preconditions are
> satisfied. Rx Burst Bulk Alloc function will be used on port=0, queue=0.
>
> PMD: ixgbe_dev_rx_queue_setup(): Vector rx enabled, please make sure RX
> burst size no less than 32.
>
>
> After this change :
>
> Configuring Port 0 (socket 1)
> PMD: ixgbe_dev_tx_queue_setup(): sw_ring=0x7fd47ecd8080
> hw_ring=0x7fd47ed02080 dma_addr=0x727702080
> PMD: ixgbe_dev_tx_queue_setup(): Using simple tx code path
> PMD: ixgbe_dev_tx_queue_setup(): Vector tx enabled.
> PMD: ixgbe_dev_rx_queue_setup(): sw_ring=0x7fd47ecd57c0
> hw_ring=0x7fd47ed12080 dma_addr=0x727712080
> PMD: ixgbe_dev_rx_queue_setup(): Rx Burst Bulk Alloc Preconditions are
> satisfied. Rx Burst Bulk Alloc function will be used on port=0, queue=0.
> PMD: ixgbe_dev_rx_queue_setup(): Vector rx enabled, please make sure RX
> burst size no less than 32.
> Port 0: 90:E2:BA:29:DF:58
>
>
> --
> David Marchand
>
next prev parent reply other threads:[~2014-08-27 13:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-26 14:09 [dpdk-dev] [PATCH 00/11] cleanup logs in main PMDs David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 01/11] ixgbe: clean log messages David Marchand
2014-08-26 14:23 ` Jay Rolette
2014-08-26 14:55 ` David Marchand
2014-08-27 13:53 ` Jay Rolette [this message]
2014-08-27 18:06 ` Stephen Hemminger
2014-08-29 7:45 ` David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 02/11] ixgbe: always log init messages David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 03/11] ixgbe: add a message when forcing scatter mode David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 04/11] ixgbe: add log messages when rx bulk mode is not usable David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 05/11] i40e: clean log messages David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 06/11] i40e: always log init messages David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 07/11] i40e: add log messages when rx bulk mode is not usable David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 08/11] e1000: clean log messages David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 09/11] e1000: always log init messages David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 10/11] e1000: add a message when forcing scatter mode David Marchand
2014-08-26 14:09 ` [dpdk-dev] [PATCH 11/11] eal: set log level from command line 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=CADNuJVqKAPqXtZziEfwGa0iLsEg0N9ujFC_6ZbA2z5D2GDat9g@mail.gmail.com \
--to=rolette@infiniteio.com \
--cc=david.marchand@6wind.com \
--cc=dev@dpdk.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).