All of lore.kernel.org
 help / color / mirror / Atom feed
From: "David Harton (dharton)" <dharton@cisco.com>
To: Bruce Richardson <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [RFC PATCH] build: allow passing extra config header to	build
Date: Tue, 17 Nov 2020 17:08:47 +0000	[thread overview]
Message-ID: <MN2PR11MB38861B346B34C7740F57ED9DAAE20@MN2PR11MB3886.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201112163134.1893190-1-bruce.richardson@intel.com>


> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Bruce Richardson
> Sent: Thursday, November 12, 2020 11:32 AM
> To: dev@dpdk.org
> Cc: Bruce Richardson <bruce.richardson@intel.com>
> Subject: [dpdk-dev] [RFC PATCH] build: allow passing extra config header
> to build
> 
> To allow per-build override of some settings, without having to change
> DPDK source-code files, i.e. rte_config.h, we can add an option to allow
> the user to pass in a file containing their own defines for the build.
> 

This is definitely better than what we have now.

Even going forward with this as a temp solution would be good while we work out longer-term strategy would be good.

What I believe is missing in the existing code base:
- knowing what all the knobs are
- ability to tune knobs in a build specific manner (providing per build config)

Regards,
Dave

> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> This is just a quick RFC to show what might be possible and to help keep
> the discussion going on how to improve build config in DPDK!
> ---
>  config/meson.build  | 10 ++++++++++
>  config/rte_config.h |  4 ++++
>  meson_options.txt   |  2 ++
>  3 files changed, 16 insertions(+)
> 
> diff --git a/config/meson.build b/config/meson.build index
> 258b01d06..5c137e4f5 100644
> --- a/config/meson.build
> +++ b/config/meson.build
> @@ -14,6 +14,16 @@ foreach env:supported_exec_envs
>  	set_variable('is_' + env, exec_env == env)  endforeach
> 
> +if get_option('extra_config') != ''
> +	extra_config = files(get_option('extra_config'))
> +	configure_file(copy: true,
> +			input: extra_config,
> +			output: 'rte_build_config_extra.h',
> +			install_dir: join_paths(get_option('includedir'),
> +				get_option('include_subdir_arch')))
> +	dpdk_conf.set('RTE_BUILD_CONFIG_EXTRA', 1) endif
> +
>  # MS linker requires special treatment.
>  # TODO: use cc.get_linker_id() with Meson >= 0.54  is_ms_linker =
> is_windows and (cc.get_id() == 'clang') diff --git a/config/rte_config.h
> b/config/rte_config.h index 25219f04a..2f5ecf999 100644
> --- a/config/rte_config.h
> +++ b/config/rte_config.h
> @@ -148,4 +148,8 @@
>  #define RTE_LIBRTE_PMD_DLB2_SW_CREDIT_QUANTA 32  #define
> RTE_PMD_DLB2_DEFAULT_DEPTH_THRESH 256
> 
> +#ifdef RTE_BUILD_CONFIG_EXTRA
> +#include <rte_build_config_extra.h>
> +#endif
> +
>  #endif /* _RTE_CONFIG_H_ */
> diff --git a/meson_options.txt b/meson_options.txt index
> 9bf18ab6b..91319b0e4 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -2,6 +2,8 @@
> 
>  option('armv8_crypto_dir', type: 'string', value: '',
>  	description: 'path to the armv8_crypto library installation
> directory')
> +option('extra_config', type: 'string', value: '',
> +	description: 'path to a header file with extra build defines. Will
> be
> +installed as rte_build_config_extra.h')
>  option('disable_drivers', type: 'string', value: '',
>  	description: 'Comma-separated list of drivers to explicitly
> disable.')  option('drivers_install_subdir', type: 'string', value:
> 'dpdk/pmds-<VERSION>',
> --
> 2.25.1


      parent reply	other threads:[~2020-11-17 17:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-12 16:31 [dpdk-dev] [RFC PATCH] build: allow passing extra config header to build Bruce Richardson
2020-11-13  4:55 ` Honnappa Nagarahalli
2020-11-13 10:06   ` Bruce Richardson
2020-11-17 17:08 ` David Harton (dharton) [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=MN2PR11MB38861B346B34C7740F57ED9DAAE20@MN2PR11MB3886.namprd11.prod.outlook.com \
    --to=dharton@cisco.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.