numam-dpdk/drivers/net/bnxt
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
..
hcapi net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
tf_core net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
tf_ulp net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_cpr.c net/bnxt: handle echo request async message 2021-03-12 07:00:22 +01:00
bnxt_cpr.h net/bnxt: fix Rx queue count 2021-03-01 01:26:10 +01:00
bnxt_ethdev.c log: register with standardized names 2021-05-11 15:17:55 +02:00
bnxt_filter.c net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_filter.h net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_flow.c net/bnxt: fix dynamic VNIC count 2021-05-03 00:15:57 +02:00
bnxt_hwrm.c net/bnxt: remove unused function parameters 2021-04-24 21:05:07 +02:00
bnxt_hwrm.h net/bnxt: remove unused function parameters 2021-04-24 21:05:07 +02:00
bnxt_irq.c net/bnxt: rename a member to avoid conflict 2021-03-12 07:13:49 +01:00
bnxt_irq.h net/bnxt: rename a member to avoid conflict 2021-03-12 07:13:49 +01:00
bnxt_nvm_defs.h net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_reps.c net/bnxt: drop unused attribute 2021-04-24 21:23:09 +02:00
bnxt_reps.h net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_ring.c net/bnxt: optimize Tx completion handling 2021-03-12 16:07:33 +01:00
bnxt_ring.h net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_rxq.c net/bnxt: refactor multi-queue Rx configuration 2021-05-03 00:14:58 +02:00
bnxt_rxq.h net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_rxr.c net/bnxt: fix mismatched type comparison in Rx 2021-05-03 00:17:17 +02:00
bnxt_rxr.h net/bnxt: fix Rx buffer posting 2021-03-19 20:29:56 +01:00
bnxt_rxtx_vec_common.h net/bnxt: optimize Tx completion handling 2021-03-12 16:07:33 +01:00
bnxt_rxtx_vec_neon.c net/bnxt: optimize Tx completion handling 2021-03-12 16:07:33 +01:00
bnxt_rxtx_vec_sse.c net/bnxt: optimize Tx completion handling 2021-03-12 16:07:33 +01:00
bnxt_stats.c net/bnxt: skip get statistics for stopped queues 2021-04-24 20:53:45 +02:00
bnxt_stats.h net/bnxt: drop unused attribute 2021-04-24 21:23:09 +02:00
bnxt_txq.c net/bnxt: optimize Tx completion handling 2021-03-12 16:07:33 +01:00
bnxt_txq.h net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_txr.c net/bnxt: fix Tx length hint threshold 2021-03-19 20:29:56 +01:00
bnxt_txr.h net/bnxt: optimize Tx completion handling 2021-03-12 16:07:33 +01:00
bnxt_util.c net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
bnxt_util.h net/bnxt: fix firmware fatal error handling 2021-03-12 07:00:22 +01:00
bnxt_vnic.c net/bnxt: use prefix on global function 2021-04-24 21:39:12 +02:00
bnxt_vnic.h net/bnxt: use prefix on global function 2021-04-24 21:39:12 +02:00
bnxt.h net/bnxt: fix ring count calculation 2021-05-03 00:17:17 +02:00
hsi_struct_def_dpdk.h net/bnxt: update HWRM structures 2021-03-12 07:00:21 +01:00
meson.build drivers: change indentation in build files 2021-04-21 14:04:09 +02:00
rte_pmd_bnxt.c net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
rte_pmd_bnxt.h net/bnxt: update copyright year 2021-01-29 18:16:10 +01:00
version.map build: remove library name from version map file name 2020-10-19 22:13:59 +02:00