numam-dpdk/drivers/net/i40e
David Marchand eeded2044a log: register with standardized names
Let's try to enforce the convention where most drivers use a pmd. logtype
with their class reflected in it, and libraries use a lib. logtype.

Introduce two new macros:
- RTE_LOG_REGISTER_DEFAULT can be used when a single logtype is
  used in a component. It is associated to the default name provided
  by the build system,
- RTE_LOG_REGISTER_SUFFIX can be used when multiple logtypes are used,
  and then the passed name is appended to the default name,

RTE_LOG_REGISTER is left untouched for existing external users
and for components that do not comply with the convention.

There is a new Meson variable log_prefix to adapt the default name
for baseband (pmd.bb.), bus (no pmd.) and mempool (no pmd.) classes.

Note: achieved with below commands + reverted change on net/bonding +
edits on crypto/virtio, compress/mlx5, regex/mlx5

$ git grep -l RTE_LOG_REGISTER drivers/ |
  while read file; do
    pattern=${file##drivers/};
    class=${pattern%%/*};
    pattern=${pattern#$class/};
    drv=${pattern%%/*};
    case "$class" in
      baseband) pattern=pmd.bb.$drv;;
      bus) pattern=bus.$drv;;
      mempool) pattern=mempool.$drv;;
      *) pattern=pmd.$class.$drv;;
    esac
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
  done

$ git grep -l RTE_LOG_REGISTER lib/ |
  while read file; do
    pattern=${file##lib/};
    pattern=lib.${pattern%%/*};
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern',/RTE_LOG_REGISTER_DEFAULT(\1,/' $file;
    sed -i -e 's/RTE_LOG_REGISTER(\(.*\), '$pattern'\.\(.*\),/RTE_LOG_REGISTER_SUFFIX(\1, \2,/' $file;
  done

Signed-off-by: David Marchand <david.marchand@redhat.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
2021-05-11 15:17:55 +02:00
..
base build: fix formatting of Meson lists 2021-05-04 15:01:47 +02:00
i40e_ethdev_vf.c net/i40e: extend VF reset waiting time 2021-04-29 13:06:20 +02:00
i40e_ethdev.c log: register with standardized names 2021-05-11 15:17:55 +02:00
i40e_ethdev.h net/i40e: fix flow director config after flow validate 2021-04-01 13:56:34 +02:00
i40e_fdir.c net/i40e: fix flow director for common pctypes 2021-04-21 16:38:37 +02:00
i40e_flow.c net/i40e: fix flow director config after flow validate 2021-04-01 13:56:34 +02:00
i40e_hash.c net/i40e: fix register setting for hash enable 2021-01-29 18:16:11 +01:00
i40e_hash.h net/i40e: refactor RSS flow 2021-01-08 19:20:09 +01:00
i40e_logs.h net/i40e: refine debug build option 2021-04-01 16:10:20 +02:00
i40e_pf.c net/i40e: announce request queue capability in PF 2021-03-30 01:17:15 +02:00
i40e_pf.h net/i40e: support AVF basic interface 2018-01-16 18:47:49 +01:00
i40e_regs.h drivers: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
i40e_rxtx_vec_altivec.c mbuf: rename outer IP checksum macro 2021-03-02 10:57:28 +01:00
i40e_rxtx_vec_avx2.c net/i40e: fix crash in AVX512 2021-04-14 14:29:47 +02:00
i40e_rxtx_vec_avx512.c net/i40e: fix crash in AVX512 2021-04-14 14:29:47 +02:00
i40e_rxtx_vec_common.h net/i40e: fix crash in AVX512 2021-04-14 14:29:47 +02:00
i40e_rxtx_vec_neon.c net/i40e: fix parsing packet type for NEON 2021-03-30 01:17:15 +02:00
i40e_rxtx_vec_sse.c mbuf: rename outer IP checksum macro 2021-03-02 10:57:28 +01:00
i40e_rxtx.c net/i40e: remove redundant VSI check in Tx queue setup 2021-04-23 10:59:40 +02:00
i40e_rxtx.h net/i40e: add Tx preparation for simple Tx datapath 2021-04-20 16:01:15 +02:00
i40e_tm.c drivers/net: build i40e and mlx5 on Windows 2021-01-14 23:51:24 +01:00
i40e_vf_representor.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
rte_pmd_i40e.c net/i40e: add null input checks 2021-01-13 18:51:58 +01:00
rte_pmd_i40e.h net/i40e: add C++ include guard 2020-11-13 19:43:26 +01:00
version.map build: remove library name from version map file name 2020-10-19 22:13:59 +02:00