Skip to content

cleanup logs in main PMDs

David Marchand dpdk-dev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest20 patches 4 repliesIn review
  2. v217 patches 12 repliesSuperseded
  3. v111 patches 5 repliesSuperseded

Changes in v3 from the cover letter

- just a respin with Jay comments in mind
* don't introduce \n in one commit then remove them
* indent only the impacted parts before removing \n (so split previous patches)
* remove some "" garbage

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20ixgbe: use the right debug macrolib/librte_pmd_ixgbe/ixgbe_82599_bypass.c lib/librte_pmd_ixgbe/ixgbe_bypass.c lib/librte_pmd_ixgbe/ixgbe_ethdev.c +2 more+68 -660 replies
2/20ixgbe/base: add a raw macro for use by shared codelib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h lib/librte_pmd_ixgbe/ixgbe_logs.h+8 -50 replies
3/20ixgbe: indent logs sectionslib/librte_pmd_ixgbe/ixgbe_ethdev.c lib/librte_pmd_ixgbe/ixgbe_rxtx.c+42 -430 replies
4/20ixgbe: clean log messageslib/librte_pmd_ixgbe/ixgbe_ethdev.c lib/librte_pmd_ixgbe/ixgbe_fdir.c lib/librte_pmd_ixgbe/ixgbe_rxtx.c+76 -760 replies
5/20ixgbe: always log init messageslib/librte_pmd_ixgbe/ixgbe_logs.h+4 -30 replies
6/20ixgbe: add a message when forcing scatter modelib/librte_pmd_ixgbe/ixgbe_rxtx.c+8 -00 replies
7/20ixgbe: add log messages when rx bulk mode is not usablelib/librte_pmd_ixgbe/ixgbe_rxtx.c+24 -50 replies
8/20i40e: use the right debug macrolib/librte_pmd_i40e/i40e_ethdev.c lib/librte_pmd_i40e/i40e_ethdev_vf.c lib/librte_pmd_i40e/i40e_pf.c +1 more+111 -1090 replies
9/20i40e/base: add a raw macro for use by shared codelib/librte_pmd_i40e/i40e/i40e_osdep.h lib/librte_pmd_i40e/i40e_logs.h+10 -70 replies
10/20i40e: indent logs sectionslib/librte_pmd_i40e/i40e_ethdev.c lib/librte_pmd_i40e/i40e_ethdev_vf.c lib/librte_pmd_i40e/i40e_pf.c +1 more+113 -1210 replies
11/20i40e: clean log messageslib/librte_pmd_i40e/i40e_ethdev.c lib/librte_pmd_i40e/i40e_ethdev_vf.c lib/librte_pmd_i40e/i40e_pf.c +1 more+255 -2550 replies
12/20i40e: always log init messageslib/librte_pmd_i40e/i40e_logs.h+4 -30 replies
13/20i40e: add log messages when rx bulk mode is not usablelib/librte_pmd_i40e/i40e_rxtx.c+24 -50 replies
14/20e1000: use the right debug macrolib/librte_pmd_e1000/em_rxtx.c lib/librte_pmd_e1000/igb_ethdev.c lib/librte_pmd_e1000/igb_pf.c +1 more+33 -290 replies
15/20e1000/base: add a raw macro for use by shared codelib/librte_pmd_e1000/e1000/e1000_osdep.h lib/librte_pmd_e1000/e1000_logs.h+8 -50 replies
16/20e1000: indent logs sectionslib/librte_pmd_e1000/em_ethdev.c lib/librte_pmd_e1000/em_rxtx.c lib/librte_pmd_e1000/igb_ethdev.c +1 more+60 -640 replies
17/20e1000: clean log messageslib/librte_pmd_e1000/e1000_logs.h lib/librte_pmd_e1000/em_ethdev.c lib/librte_pmd_e1000/em_rxtx.c +2 more+78 -800 replies
18/20e1000: always log init messageslib/librte_pmd_e1000/e1000_logs.h+4 -30 replies
19/20e1000: add a message when forcing scatter modelib/librte_pmd_e1000/em_rxtx.c lib/librte_pmd_e1000/igb_rxtx.c+18 -00 replies
20/20eal: set log level from command linelib/librte_eal/bsdapp/eal/eal.c lib/librte_eal/bsdapp/eal/include/eal_internal_cfg.h lib/librte_eal/linuxapp/eal/eal.c +1 more+87 -13 replies

Reviews trailers per patch

11 of 20 patches have a Reviewed-by or Acked-by.

PatchBruce Richardson
1/20
2/20A-b
3/20
4/20
5/20A-b
6/20A-b
7/20A-b
8/20
9/20A-b
10/20
11/20
12/20A-b
13/20A-b
14/20
15/20A-b
16/20
17/20
18/20A-b
19/20A-b
20/20A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/20] cleanup logs in main PMDs

Here is a patchset that reworks the log macro in e1000, ixgbe and i40e PMDs. The idea behind this is to make it easier to debug some init failures and to be sure of the datapath selected in these PMDs (rx / tx handlers selection).

The PMDs changes involve adding more debug messages in the default build. A new eal option has been added to set the default log level, so that you can render the eal a little less noisy.

I did not change the default log level for now, as some eal log messages are marked as DEBUG while being interesting (from my point of view). I suppose we can change the default log level later once the eal has been cleaned up.

Changes since v2:
- just a respin with Jay comments in mind
* don't introduce \n in one commit then remove them
* indent only the impacted parts before removing \n (so split previous patches)
* remove some "" garbage

Changes since v1:
- continue clean up by always using PMD_*_LOG when logging something in PMD (i.e. no more printf, RTE_LOG, DEBUGOUT)
- introduce PMD_DRV_LOG_RAW macro for use by shared driver code
- adopt 'second approach': no more \n in PMD_*_LOG callers. This means that we will enforce a 'no \n' policy in logs for PMD.

--
David Marchand

David Marchand (20):
ixgbe: use the right debug macro
ixgbe/base: add a raw macro for use by shared code
ixgbe: indent logs sections
ixgbe: clean log messages
ixgbe: always log init messages
ixgbe: add a message when forcing scatter mode
ixgbe: add log messages when rx bulk mode is not usable
i40e: use the right debug macro
i40e/base: add a raw macro for use by shared code
i40e: indent logs sections
i40e: clean log messages
i40e: always log init messages
i40e: add log messages when rx bulk mode is not usable
e1000: use the right debug macro
e1000/base: add a raw macro for use by shared code
e1000: indent logs sections
e1000: clean log messages
e1000: always log init messages
e1000: add a message when forcing scatter mode
eal: set log level from command line

 lib/librte_eal/bsdapp/eal/eal.c                    |   42 ++
 .../bsdapp/eal/include/eal_internal_cfg.h          |    1 +
 lib/librte_eal/linuxapp/eal/eal.c                  |   44 +-
 .../linuxapp/eal/include/eal_internal_cfg.h        |    1 +
 lib/librte_pmd_e1000/e1000/e1000_osdep.h           |    4 +-
 lib/librte_pmd_e1000/e1000_logs.h                  |   18 +-
 lib/librte_pmd_e1000/em_ethdev.c                   |   53 ++-
 lib/librte_pmd_e1000/em_rxtx.c                     |  122 +++---
 lib/librte_pmd_e1000/igb_ethdev.c                  |   85 ++--
 lib/librte_pmd_e1000/igb_pf.c                      |    5 +-
 lib/librte_pmd_e1000/igb_rxtx.c                    |   65 +--
 lib/librte_pmd_i40e/i40e/i40e_osdep.h              |    8 +-
 lib/librte_pmd_i40e/i40e_ethdev.c                  |  451 ++++++++++----------
 lib/librte_pmd_i40e/i40e_ethdev_vf.c               |  166 ++++---
 lib/librte_pmd_i40e/i40e_logs.h                    |   16 +-
 lib/librte_pmd_i40e/i40e_pf.c                      |   79 ++--
 lib/librte_pmd_i40e/i40e_rxtx.c                    |  201 +++++----
 lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h           |    4 +-
 lib/librte_pmd_ixgbe/ixgbe_82599_bypass.c          |   14 +-
 lib/librte_pmd_ixgbe/ixgbe_bypass.c                |   26 +-
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c                |  150 ++++---
 lib/librte_pmd_ixgbe/ixgbe_fdir.c                  |    6 +-
 lib/librte_pmd_ixgbe/ixgbe_logs.h                  |   16 +-
 lib/librte_pmd_ixgbe/ixgbe_pf.c                    |    4 +-
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c                  |  172 +++++---
 25 files changed, 954 insertions(+), 799 deletions(-)
Signature · 1 line
1.7.10.4