numam-dpdk/drivers/net/hns3
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
..
hns3_cmd.c net/hns3: use existing macro to get array size 2021-05-04 18:02:14 +02:00
hns3_cmd.h net/hns3: remove unused VMDq code 2021-05-04 18:12:45 +02:00
hns3_dcb.c net/hns3: fix flow control mode 2021-04-15 02:55:04 +02:00
hns3_dcb.h net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
hns3_ethdev_vf.c net/hns3: remove unused VMDq code 2021-05-04 18:12:45 +02:00
hns3_ethdev.c log: register with standardized names 2021-05-11 15:17:55 +02:00
hns3_ethdev.h net/hns3: remove unused VMDq code 2021-05-04 18:12:45 +02:00
hns3_fdir.c net/hns3: log flow director configuration 2021-05-04 18:02:14 +02:00
hns3_fdir.h net/hns3: fix flow director lock 2021-04-20 02:40:43 +02:00
hns3_flow.c net/hns3: increase readability in logs 2021-05-04 18:12:45 +02:00
hns3_intr.c net/hns3: increase readability in logs 2021-05-04 18:12:45 +02:00
hns3_intr.h net/hns3: support RAS process in Kunpeng 930 2021-04-19 18:25:42 +02:00
hns3_logs.h net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
hns3_mbx.c net/hns3: fix handling link update 2021-04-27 17:08:03 +02:00
hns3_mbx.h net/hns3: remove unused mailbox macro and struct 2021-04-26 14:50:33 +02:00
hns3_mp.c net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
hns3_mp.h net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
hns3_ptp.c net/hns3: support IEEE 1588 PTP 2021-04-01 18:39:55 +02:00
hns3_regs.c net/hns3: support get device version when dump register 2021-04-08 18:57:09 +02:00
hns3_regs.h net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
hns3_rss.c net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
hns3_rss.h net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
hns3_rxtx_vec_neon.h net/hns3: add compile-time verification on Rx vector 2021-04-20 02:40:43 +02:00
hns3_rxtx_vec_sve.c net/hns3: fix vector Rx burst limitation 2021-05-04 18:02:14 +02:00
hns3_rxtx_vec.c net/hns3: fix vector Rx burst limitation 2021-05-04 18:02:14 +02:00
hns3_rxtx_vec.h net/hns3: fix vector Rx burst limitation 2021-05-04 18:02:14 +02:00
hns3_rxtx.c net/hns3: fix debug build 2021-05-07 15:19:54 +02:00
hns3_rxtx.h net/hns3: fix vector Rx burst limitation 2021-05-04 18:02:14 +02:00
hns3_stats.c net/hns3: increase readability in logs 2021-05-04 18:12:45 +02:00
hns3_stats.h net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
hns3_tm.c net/hns3: fix traffic management support check 2021-04-20 12:55:28 +02:00
hns3_tm.h net/hns3: fix copyright date 2021-04-08 17:55:35 +02:00
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
version.map build: remove library name from version map file name 2020-10-19 22:13:59 +02:00