numam-dpdk/drivers/common/mlx5
David Marchand 1094dd940e cleanup compat header inclusions
With symbols going though experimental/stable stages, we accumulated
a lot of discrepancies about inclusion of the rte_compat.h header.

Some headers are including it where unneeded, while others rely on
implicit inclusion.

Fix unneeded inclusions:
$ git grep -l include..rte_compat.h |
  xargs grep -LE '__rte_(internal|experimental)' |
  xargs sed -i -e '/#include..rte_compat.h/d'

Fix missing inclusion, by inserting rte_compat.h before the first
inclusion of a DPDK header:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#include..\(rte_\|.*pmd.h.$\)/{
      s/\(#include..\(rte_\|.*pmd.h.$\)\)/#include <rte_compat.h>\n\1/
    }'

Fix missing inclusion, by inserting rte_compat.h after the last
inclusion of a non DPDK header:
$ for file in $(git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h); do
    tac $file > $file.$$
    sed -i -e \
      '0,/#include../{
        s/\(#include..*$\)/#include <rte_compat.h>\n\n\1/
      }' $file.$$
    tac $file.$$ > $file
    rm $file.$$
  done

Fix missing inclusion, by inserting rte_compat.h after the header guard:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h |
  xargs sed -i -e \
    '0,/#define/{
      s/\(#define .*$\)/\1\n\n#include <rte_compat.h>/
    }'

And finally, exclude rte_compat.h itself.
$ git checkout lib/eal/include/rte_compat.h

At the end of all this, we have a clean tree:
$ git grep -lE '__rte_(internal|experimental)' |
  xargs grep -L include..rte_compat.h
buildtools/check-symbols.sh
devtools/checkpatches.sh
doc/guides/contributing/abi_policy.rst
doc/guides/rel_notes/release_20_11.rst
lib/eal/include/rte_compat.h

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
2022-11-15 08:39:14 +01:00
..
linux cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
windows cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
meson.build common/mlx5: move build config initialization and check 2022-10-30 15:55:46 +01:00
mlx5_common_defs.h common/mlx5: update doorbell mapping parameter name 2022-02-23 15:57:43 +01:00
mlx5_common_devx.c common/mlx5: fix queue size in DevX queue pair creation 2021-11-08 19:46:28 +01:00
mlx5_common_devx.h cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
mlx5_common_log.h remove extra blank line at EOF 2022-02-27 21:26:06 +01:00
mlx5_common_mp.c common/mlx5: fix mempool registration 2021-11-21 15:38:07 +01:00
mlx5_common_mp.h cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
mlx5_common_mr.c common/mlx5: fix shared mempool subscription 2022-11-10 18:15:47 +01:00
mlx5_common_mr.h cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
mlx5_common_pci.c bus: hide bus object 2022-09-23 16:14:34 +02:00
mlx5_common_private.h bus/auxiliary: make driver-only headers private 2022-09-23 16:14:34 +02:00
mlx5_common_utils.c common/mlx5: remove unused lcore check 2022-06-05 17:04:43 +02:00
mlx5_common_utils.h cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
mlx5_common.c common/mlx5: fix shared mempool subscription 2022-11-10 18:15:47 +01:00
mlx5_common.h cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
mlx5_devx_cmds.c common/mlx5: fix DevX register read error severity 2022-11-10 18:16:48 +01:00
mlx5_devx_cmds.h net/mlx5: support flow counter action for HWS 2022-10-26 13:33:39 +02:00
mlx5_malloc.c fix spelling in comments and strings 2022-01-11 12:16:53 +01:00
mlx5_malloc.h cleanup compat header inclusions 2022-11-15 08:39:14 +01:00
mlx5_prm.h net/mlx5: support flow counter action for HWS 2022-10-26 13:33:39 +02:00
version.map net/mlx5: support flow counter action for HWS 2022-10-26 13:33:39 +02:00