numam-dpdk/drivers/net/ixgbe
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
ixgbe_82599_bypass.c
ixgbe_bypass_api.h
ixgbe_bypass_defines.h
ixgbe_bypass.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
ixgbe_bypass.h
ixgbe_ethdev.c log: register with standardized names 2021-05-11 15:17:55 +02:00
ixgbe_ethdev.h net/ixgbe: fix jumbo frame flag condition 2021-01-19 03:30:15 +01:00
ixgbe_fdir.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
ixgbe_flow.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
ixgbe_ipsec.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
ixgbe_ipsec.h cryptodev: make xform key pointer constant 2019-07-19 14:15:21 +02:00
ixgbe_logs.h net/ixgbe: refine debug build option 2021-04-01 16:10:20 +02:00
ixgbe_pf.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
ixgbe_regs.h
ixgbe_rxtx_vec_common.h ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
ixgbe_rxtx_vec_neon.c net/ixgbe: fix UDP zero checksum on Arm 2021-02-10 21:51:38 +01:00
ixgbe_rxtx_vec_sse.c net/ixgbe: fix UDP zero checksum on x86 2021-02-10 21:49:00 +01:00
ixgbe_rxtx.c net/ixgbe: refine debug build option 2021-04-01 16:10:20 +02:00
ixgbe_rxtx.h net/ixgbe: fix UDP zero checksum on x86 2021-02-10 21:49:00 +01:00
ixgbe_tm.c drivers/net: update TM capability 2020-09-18 18:55:10 +02:00
ixgbe_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_ixgbe.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
rte_pmd_ixgbe.h drivers/net: fix exposing internal headers 2020-07-11 06:18:54 +02:00
version.map build: remove library name from version map file name 2020-10-19 22:13:59 +02:00