[dpdk-dev] [RFC PATCH 00/14] Build file update proposals
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Thu Apr 1 14:27:18 CEST 2021
On 4/1/21 2:49 PM, Bruce Richardson wrote:
> This RFC contains 5 changes/updates to the DPDK build and build files. These
> updates all assume that the minimum version for DPDK has increased to at least
> meson 0.49 as proposed in [1].
>
> The changes in this set are:
> 1. Use "continue" keyword, new in 0.49 to shorten and reduce indentation levels
> in the foreach loops when building library or driver components.
> 2. For libraries, drop support for header-only libraries, which was added just
> for the "compat" lib which had a single header, and is now part of EAL. This
> similarly reduces indentation levels and makes the code easier to follow
> 3. Since the larger blocks of meson code in our repo is seeing massive
> whitespace changes, take the opportunity to switch our indentation style for
> meson files from that of C-files using tabs, to Meson/Python style using
> spaces. [More below on this for discussion]
> 4. Remove the "librte_" prefix from all our library directories. While as useful
> cleanup, the main driver for this was that it simplifies the matching for #5
> below.
> 5. Add a "disable_libs" build option to allow the user to optionally not build
> certain components. Include in this an explicit list of libraries which are
> "known safe" to disable in the build. For now this is a short list of three
> libs, all of which are safe because they are not buildable on FreeBSD. More
> work is needed to expand this list in future.
>
> Of these changes, I expect #3 to be most controversial. The initial
> implementation of meson build for DPDK should have originally been done using
> the correct meson style using spaces[2], but sadly it was not done that way. If
> we are to ever change, I believe it should be now while other rework such as
> this is being done. Here are the arguments for/against, as I see them.
>
> Reasons to change:
> * Align with official meson style, used on other projects
> * Reduce indentation levels in code. NOTE: While not normally a consideration in
> programming, this is a possible issue with meson compared to C or Python,
> because we cannot create separate functions to move inner loops to lower
> indentation levels.
> * It's probably now or never.
+1 and I think it is better to do it now, not never
> Reasons not to change:
> * Outstanding patches for meson would need respin
> * More work involved in backports - though with the more complicated meson
> blocks changing whitespace levels anyway due to #1 and #2 above, it's probably
> no more difficult than it would otherwise be. The extra changes to e.g. list
> indentation, require work to adjust whitespace, but are trivial to fix.
> * Code churn
>
> Feedback on these patches and proposed changes welcome, as always.
>
> [1] http://patches.dpdk.org/project/dpdk/list/?series=15827
> [2] https://mesonbuild.com/Style-guide.html#tabs-or-spaces
More information about the dev
mailing list