From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 51F85A00C4; Sun, 6 Nov 2022 09:36:43 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA47A40691; Sun, 6 Nov 2022 09:36:42 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id B44764003C for ; Sun, 6 Nov 2022 09:36:41 +0100 (CET) Received: from [192.168.38.17] (aros.oktetlabs.ru [192.168.38.17]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 1FE985A; Sun, 6 Nov 2022 11:36:40 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 1FE985A DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1667723800; bh=7zyyn9DCqNzoSsBiO/p4xvh47vsMDaz/hS1N8FJu7Ck=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WBKGZwHr8Zpb9o4j8pEc/Jjs30we4lqAd3daltVxK4SbTHNjHC52/mY/XhWJAzIBq mnmn7udjoOijf8kx6hfSAOQ2M5z6TQARw7uUiAKjcVBbxV8rtcLU/iPHp5sKx+dJS4 iIeTZxao9uBePmG6AZTyz7+uq8oq0pTket89YkU0= Message-ID: <8b9c3daa-de71-6d23-2f40-8a047f30e412@oktetlabs.ru> Date: Sun, 6 Nov 2022 11:36:38 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH v2] cleanup compat header inclusions To: David Marchand , dev@dpdk.org Cc: thomas@monjalon.net, gakhil@marvell.com, ferruh.yigit@amd.com, jerinj@marvell.com, bruce.richardson@intel.com References: <20221102150828.2161307-1-david.marchand@redhat.com> <20221103140047.11750-1-david.marchand@redhat.com> Content-Language: en-US From: Andrew Rybchenko Organization: OKTET Labs In-Reply-To: <20221103140047.11750-1-david.marchand@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 \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 \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 / > }' > > 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 > Acked-by: Bruce Richardson Acked-by: Andrew Rybchenko