From: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
To: David Marchand <david.marchand@redhat.com>, dev@dpdk.org
Cc: thomas@monjalon.net, gakhil@marvell.com, ferruh.yigit@amd.com,
jerinj@marvell.com, bruce.richardson@intel.com
Subject: Re: [PATCH v2] cleanup compat header inclusions
Date: Sun, 6 Nov 2022 11:36:38 +0300 [thread overview]
Message-ID: <8b9c3daa-de71-6d23-2f40-8a047f30e412@oktetlabs.ru> (raw)
In-Reply-To: <20221103140047.11750-1-david.marchand@redhat.com>
On 11/3/22 17:00, David Marchand wrote:
> 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>
next prev parent reply other threads:[~2022-11-06 8:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-02 15:08 [PATCH] " David Marchand
2022-11-02 16:08 ` Bruce Richardson
2022-11-02 16:33 ` David Marchand
2022-11-03 14:00 ` [PATCH v2] " David Marchand
2022-11-06 8:36 ` Andrew Rybchenko [this message]
2022-11-15 8:16 ` David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8b9c3daa-de71-6d23-2f40-8a047f30e412@oktetlabs.ru \
--to=andrew.rybchenko@oktetlabs.ru \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@redhat.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@amd.com \
--cc=gakhil@marvell.com \
--cc=jerinj@marvell.com \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).