On Mon, Dec 18, 2023 at 2:59 PM David Marchand <david.march...@redhat.com> wrote: > > When a driver dedicated logtype exists, use it instead of the generic > PMD logtype. > > This has been done partially automatically with: > > $ for file in $(git grep -l RTE_LOG.*PMD.*fmt drivers/'**.h' \ > :^drivers/common/cnxk/roc_platform.h) > do > tail=${file#drivers/*/*/} > dir=${file%%$tail} > ! git grep -q RTE_LOGTYPE_ $dir || \ > { echo $dir already done; continue; } > git grep -hE '^extern int .*log.*;$' $file | \ > sed -ne 's/^extern int \([^ ;]*\);$/\1/p' | \ > while read logtype > do > git grep -q 'RTE_LOG_REGISTER\(_DEFAULT\|\)('$logtype',' || \ > [ "$logtype" != "${logtype%%driver}" ] || \ > { echo Skipped $logtype; continue; } > abbrev=$(echo $logtype | sed -e 's/_logtype//' | tr '[a-z]' '[A-Z]') > sed -i -e 's/^\(extern int '$logtype'.*\)$/\1\n#define RTE_LOGTYPE_' \ > $abbrev' '$logtype'/' $file > sed -i -e 's/\(RTE_LOG.*, \)PMD,/\1'$abbrev',/' $file > break > done > done > > Then a manual update for: > - common/cpt, > - common/dpaax, > - common/idpf, > - mempool/dpaa, > - net/bnxt, > - net/octeon_ep, > - raw/ifpga, > - vdpa/ifc, > > Signed-off-by: David Marchand <david.march...@redhat.com>
Rebased and applied, thanks. -- David Marchand