From: David Marchand <david.marchand@redhat.com>
To: David Marchand <david.marchand@redhat.com>
Cc: dev@dpdk.org, thomas@monjalon.net, gakhil@marvell.com,
ferruh.yigit@amd.com, jerinj@marvell.com,
bruce.richardson@intel.com,
Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Subject: Re: [PATCH v2] cleanup compat header inclusions
Date: Tue, 15 Nov 2022 09:16:36 +0100 [thread overview]
Message-ID: <CAJFAV8xh1ff2WYf7-MGrhSkE28vxvpdMBUdW8p6M3z1H5WqaDA@mail.gmail.com> (raw)
In-Reply-To: <8b9c3daa-de71-6d23-2f40-8a047f30e412@oktetlabs.ru>
On Sun, Nov 6, 2022 at 9:36 AM Andrew Rybchenko
<andrew.rybchenko@oktetlabs.ru> wrote:
> 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>
Applied, thanks.
--
David Marchand
prev parent reply other threads:[~2022-11-15 8:16 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
2022-11-15 8:16 ` David Marchand [this message]
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=CAJFAV8xh1ff2WYf7-MGrhSkE28vxvpdMBUdW8p6M3z1H5WqaDA@mail.gmail.com \
--to=david.marchand@redhat.com \
--cc=andrew.rybchenko@oktetlabs.ru \
--cc=bruce.richardson@intel.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).