numam-dpdk/drivers/net/cxgbe
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 net/cxgbe: disable Rx during port link down 2021-03-22 19:21:55 +01:00
clip_tbl.c net/cxgbe: use relative paths for includes 2018-12-21 16:22:41 +01:00
clip_tbl.h net/cxgbe: add Compressed Local IP region 2018-07-04 22:20:41 +02:00
cxgbe_compat.h net/cxgbe: remove local bool type 2020-01-17 19:46:02 +01:00
cxgbe_ethdev.c log: register with standardized names 2021-05-11 15:17:55 +02:00
cxgbe_filter.c net/cxgbe: rework queue allocation between ports 2020-09-18 18:55:12 +02:00
cxgbe_filter.h net/cxgbe: fix double MPS alloc by flow validate and create 2020-06-17 15:31:32 +02:00
cxgbe_flow.c ethdev: replace callback getting filter operations 2021-03-26 18:37:13 +01:00
cxgbe_flow.h ethdev: replace callback getting filter operations 2021-03-26 18:37:13 +01:00
cxgbe_main.c net/cxgbe: disable Rx during port link down 2021-03-22 19:21:55 +01:00
cxgbe_ofld.h net/cxgbe: support to delete flows in HASH region 2018-07-04 22:20:41 +02:00
cxgbe_pfvf.h ethdev: change stop operation callback to return int 2020-10-16 22:26:41 +02:00
cxgbe.h net/cxgbe: fix jumbo frame flag condition 2021-01-19 03:30:15 +01:00
cxgbevf_ethdev.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
cxgbevf_main.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
l2t.c net/cxgbe: add prefix to global functions 2019-10-07 15:00:57 +02:00
l2t.h net/cxgbe: add prefix to global functions 2019-10-07 15:00:57 +02:00
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
mps_tcam.c net/cxgbe: fix duplicate MAC addresses in MPS TCAM 2020-09-18 18:55:10 +02:00
mps_tcam.h net: add rte prefix to ether defines 2019-05-24 13:34:45 +02:00
sge.c ethdev: make driver-only headers private 2021-01-29 20:59:09 +01:00
smt.c net/cxgbe: fix SMT leak in filter error and free path 2020-06-17 15:31:32 +02:00
smt.h net/cxgbe: fix SMT leak in filter error and free path 2020-06-17 15:31:32 +02:00
version.map build: remove library name from version map file name 2020-10-19 22:13:59 +02:00