numam-dpdk/drivers/crypto/octeontx2
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
..
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
otx2_cryptodev_capabilities.c crypto/octeontx2: add security capabilities 2020-07-18 23:09:02 +02:00
otx2_cryptodev_capabilities.h crypto/octeontx2: add security capabilities 2020-07-18 23:09:02 +02:00
otx2_cryptodev_hw_access.c crypto/octeontx2: support CN98xx 2021-01-19 18:05:17 +01:00
otx2_cryptodev_hw_access.h crypto/octeontx2: support CN98xx 2021-01-19 18:05:17 +01:00
otx2_cryptodev_mbox.c crypto/octeontx2: support CN98xx 2021-01-19 18:05:17 +01:00
otx2_cryptodev_mbox.h crypto/octeontx2: support CN98xx 2021-01-19 18:05:17 +01:00
otx2_cryptodev_ops_helper.h crypto/octeontx2: move functions to helper file 2020-10-15 22:13:35 +02:00
otx2_cryptodev_ops.c event/octeontx2: support crypto adapter forward mode 2021-04-17 18:50:06 +02:00
otx2_cryptodev_ops.h crypto/octeontx2: discover capabilities 2020-07-08 18:16:17 +02:00
otx2_cryptodev_qp.h event/octeontx2: fix crypto adapter queue pair operations 2021-04-29 10:47:49 +02:00
otx2_cryptodev_sec.c crypto/octeontx2: support lookaside IPv4 transport mode 2021-04-16 12:43:33 +02:00
otx2_cryptodev_sec.h crypto/octeontx2: support lookaside IPv4 transport mode 2021-04-16 12:43:33 +02:00
otx2_cryptodev.c log: register with standardized names 2021-05-11 15:17:55 +02:00
otx2_cryptodev.h crypto/octeontx2: support CN98xx 2021-01-19 18:05:17 +01:00
otx2_ipsec_anti_replay.h crypto/octeontx2: support IPsec ESN and anti-replay 2021-01-19 18:05:17 +01:00
otx2_ipsec_fp.h net/octeontx2: support anti-replay for security session 2020-10-14 22:22:06 +02:00
otx2_ipsec_po_ops.h crypto/octeontx2: support lookaside IPv4 transport mode 2021-04-16 12:43:33 +02:00
otx2_ipsec_po.h crypto/octeontx2: support lookaside IPv4 transport mode 2021-04-16 12:43:33 +02:00
otx2_security.h crypto/octeontx2: support AES-CBC SHA256-128-HMAC 2021-01-19 18:05:17 +01:00
version.map build: remove library name from version map file name 2020-10-19 22:13:59 +02:00