From: Bruce Richardson <email@example.com> To: Thomas Monjalon <firstname.lastname@example.org> Cc: David Marchand <email@example.com>, firstname.lastname@example.org, Ma Lihong <email@example.com>, Hemant Agrawal <firstname.lastname@example.org>, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org Subject: Re: [dpdk-dev] [PATCH v2 0/3] Allow overriding of build-time constants Date: Tue, 20 Oct 2020 11:15:39 +0100 Message-ID: <20201020101539.GD558@bricha3-MOBL.ger.corp.intel.com> (raw) In-Reply-To: <1612430.ynYusz7o8J@thomas> On Tue, Oct 20, 2020 at 12:04:56PM +0200, Thomas Monjalon wrote: > 20/10/2020 10:34, Bruce Richardson: > > On Mon, Oct 19, 2020 at 11:04:54PM +0200, Thomas Monjalon wrote: > > > 19/10/2020 12:21, Bruce Richardson: > > > > On Fri, Oct 16, 2020 at 06:46:12PM +0200, David Marchand wrote: > > > > > On Fri, Oct 16, 2020 at 5:56 PM Bruce Richardson > > > > > <email@example.com> wrote: > > > > > > > librte_eal.so is indeed built with the 64 value: $ pahole -C > > > > > > > rte_mem_config build/install/lib64/librte_eal.so |grep > > > > > > > memsegs die__process_function: tag not supported (INVALID)! > > > > > > > struct rte_memseg_list memsegs; /* 136 > > > > > > > 8704 */ > > > > > > > > > > > > > > > > > > > > > But no trace of the custom value for external applications: $ > > > > > > > grep -r RTE_MAX_MEMSEG_LISTS build/install > > > > > > > build/install/include/rte_config.h:#ifndef > > > > > > > RTE_MAX_MEMSEG_LISTS > > > > > > > build/install/include/rte_config.h:#define > > > > > > > RTE_MAX_MEMSEG_LISTS 128 Binary file > > > > > > > build/install/lib64/librte_eal.a matches Binary file > > > > > > > build/install/lib64/librte_eal.so.21.0 matches > > > > > > > > > > > > > > I can see the same using the meson option -Dc_args. > > > > > > > > > > > > Good point, I had not thought of external apps using these > > > > > > values. > > > > > > > > > > > > They are mostly for internal use, so maybe its worthwhile > > > > > > looking to not have them in a public header file. What do you > > > > > > think? Is it likely that apps would be using some of these > > > > > > values, or needs to know the specifics? > > > > > > > > > > Some are publicly exposed, like RTE_MEMPOOL_CACHE_MAX_SIZE, > > > > > RTE_PKTMBUF_HEADROOM, RTE_ETHDEV_RXTX_CALLBACKS, For those, > > > > > either we propagate the overriden value to the installed > > > > > rte_config.h or we refuse customisation. > > > > > > > > > I'd suggest the first 2 of those should possibly be global meson > > > > options. > > > > > > How the application is reading the meson options? > > > > > The meson options are reflected in the rte_build_config.h file. It's > > not automatic, but they should be set there by the config/meson.build > > file. If some are missed, they can be added, but I disagree that all > > meson options should always be passed through to apps. It makes them > > part of the API, perhaps unnecessarily, and therefore harder to change > > or adjust. Furthermore why should an app ever need to care if a DPDK > > build included the docs, or the kmods? > > > > > > Third should probably not be exposed at all. > > > > > > I think everything should be exposed. The application may need to > > > know whether a feature is enabled or not, and what is a specific > > > tuning value. > > > > > > I suspect it is the last blocker for meson adoption. Now that we > > > removed the makefiles, we need to fill this gap urgently. > > > > > I really don't see this as a gap. With "make" we struggled with massive > > amounts of build config, and we tried to remove as much as we can. > > While this is reporting what's there rather than tweaking it, surely > > many of these settings are just better as #defines in the individual > > header files - if they need to be exposed at all. > > I agree with the goal of moving these #defines internally. I just feel > having wrong values in rte_config.h looks to be a bug. > Oh agree, absolutely! The other attitude to take (and document) here is that if someone is going to the trouble to override the default DPDK value when building DPDK they also need to provide that CFLAG when building their app too. If they don't want that, they need to adjust the value in the code directly.
next prev parent reply index Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-25 11:44 [dpdk-dev] [PATCH 1/2] config: remove explicit undefinition of unset values Bruce Richardson 2020-08-25 11:44 ` [dpdk-dev] [PATCH 2/2] config: allow overriding some build defaults Bruce Richardson 2020-09-01 5:17 ` Ma, LihongX 2020-09-01 6:07 ` Hemant Agrawal 2020-09-01 9:02 ` Bruce Richardson 2020-09-03 14:50 ` Bruce Richardson 2020-09-03 14:49 ` [dpdk-dev] [PATCH v2 0/3] Allow overriding of build-time constants Bruce Richardson 2020-09-03 14:49 ` [dpdk-dev] [PATCH v2 1/3] config: remove explicit undefinition of unset values Bruce Richardson 2020-09-03 14:49 ` [dpdk-dev] [PATCH v2 2/3] config: allow overriding some build defaults Bruce Richardson 2020-09-03 14:49 ` [dpdk-dev] [PATCH v2 3/3] doc: add notes on overriding extra config values Bruce Richardson 2020-09-03 15:43 ` Hemant Agrawal 2020-10-14 14:20 ` [dpdk-dev] [PATCH v2 0/3] Allow overriding of build-time constants Bruce Richardson 2020-10-15 8:55 ` Chen, BoX C 2020-10-15 9:20 ` Bruce Richardson 2020-10-16 15:47 ` David Marchand 2020-10-16 15:55 ` Bruce Richardson 2020-10-16 16:46 ` David Marchand 2020-10-19 10:21 ` Bruce Richardson 2020-10-19 21:04 ` Thomas Monjalon 2020-10-20 8:34 ` Bruce Richardson 2020-10-20 10:04 ` Thomas Monjalon 2020-10-20 10:15 ` Bruce Richardson [this message] 2020-10-28 16:32 ` Bruce Richardson
Reply instructions: You may reply publically 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=20201020101539.GD558@bricha3-MOBL.ger.corp.intel.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ /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
DPDK patches and discussions Archives are clonable: git clone --mirror http://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ http://inbox.dpdk.org/dev \ firstname.lastname@example.org public-inbox-index dev Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/ public-inbox