All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Simon Horman <horms@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, Jiri Pirko <jiri@resnulli.us>,
	Madhu Chittim <madhu.chittim@intel.com>,
	Sridhar Samudrala <sridhar.samudrala@intel.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Sunil Kovvuri Goutham <sgoutham@marvell.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>
Subject: Re: [PATCH v3 08/12] testing: net-drv: add basic shaper test
Date: Thu, 8 Aug 2024 07:17:54 -0700	[thread overview]
Message-ID: <20240808071754.72be6896@kernel.org> (raw)
In-Reply-To: <20240808122042.GA3067851@kernel.org>

On Thu, 8 Aug 2024 13:20:42 +0100 Simon Horman wrote:
> Thanks again for the information.
> 
> I have now taken another look at this problem.
> 
> Firstly, my analysis is that the cause of the problem is a combination of
> the way the patchset is constricted, and the way that the build tests (I
> have focussed on build_allmodconfig_warn.sh [1]).
> 
> [1] https://github.com/linux-netdev/nipa/blob/main/tests/patch/build_allmodconfig_warn/build_allmodconfig.sh
> 
> What I believe happens is this: The patches 01/12 - 07/12 modify some
> header files, adds a new Kconfig entry, and does a bunch of other normal
> stuff. Each of those patches is tested in turn, and everything seems fine.
> 
> Then we get to patch 08/12. The key thing about this patch is that it
> enables the CONFIG_NET_SHAPER Kconfig option, in the context of an
> allmodconfig build. That in turn modifies the headers
> include/linux/netdevice.h and net/core/dev.h (and net/Makefile). Not in the
> in terms of their on-disk contents changing, but rather in the case of the
> header files, in terms of preprocessor output. And this is, I believe,
> where everything goes wrong.

That's strange, make does not understand preprocessor, does it?
Either file has been modified or it has not.
I guess it doesn't matter, given your solution  

> NIPA arrives at running build_allmodconfig_warn.sh for patch 08/12 with the tree
> built for the previous patch, 07/12. It then:
> 
> * touches $output_dir/include/generated/utsrelease.h
> * checks out HEAD~ (patch 07/12)
> * prepares the kernel config
> * builds kernel and records incumbent errors (49)
> 
> The thing to note here is that the tree has been little perturbed since build
> tests were run for patch 07/12, and thus few files are rebuilt.
> 
> Moving on, simplifying things, the following then runs:
> 
> * touches $output_dir/include/generated/utsrelease.h
> * checks out $HEAD (patch 08/12)
> * prepares the kernel config
> * builds kernel and records current errors (4219)
> 
> The key to understanding why the large delta between 49 and 4219 is
> that vastly more files have been rebuilt. Because the preprocessor output
> of netdevice.h and dev.h have changes since the last build, and those
> headers are included, directly or indirectly, by a lot of files (and
> compilation results in warnings for many of those files).
> 
> 
> I was able to reproduce the result by running build_allmodconfig_warn.sh
> over patch 07/12 and then 07/12 with FIRST_IN_SERIES=0.
> 
> I was able to get the desired result no new compiler warnings
> by doing the same again, but with FIRST_IN_SERIES=1 for the
> invocation of build_allmodconfig_warn.sh for 08/12.
> 
> I believe this is entirely due to a baseline rebuild being run due to the
> FIRST_IN_SERIES=1 parameter. And, FWIIW, I believe the invocation of
> build_allmodconfig_warn.sh for 07/12 ensures reproducibility.
> 
> My suggestion is that while we may consider reorganising the patch-set,
> that is really only a work around. And it would be best to make the CI more
> robust in the presence of such constructions.
> 
> It may be a bit heavy handed, but my tested solution is to invoke a
> baseline rebuild if a Kconfig change is made. At the very last it does
> address the problem at hand. (In precisely the same way as manually setting
> FIRST_IN_SERIES=1.)
> 
> The patch implementing this for build_allmodconfig.sh which I tested is
> below. If we want to go ahead with this approach then I expect it is best
> to add it to other build tests too. But this seems to be a good point
> to report my findings, so here we are.
> 
> --- build_allmodconfig.sh.orig  2024-08-08 07:30:56.599372164 +0000
> +++ build_allmodconfig.sh       2024-08-08 09:58:22.692206313 +0000
> @@ -34,8 +34,10 @@
>  echo "Tree base:"
>  git log -1 --pretty='%h ("%s")' HEAD~
> 
> -if [ x$FIRST_IN_SERIES == x0 ]; then
> -    echo "Skip baseline build, not the first patch"
> +if [ x$FIRST_IN_SERIES == x0 ] && \
> +   ! git diff --name-only HEAD~ | grep -q -E "Kconfig$"
> +then
> +    echo "Skip baseline build, not the first patch and no Kconfig updates"
>  else
>      echo "Baseline building the tree"

Excellent idea, let's try it! Could you send a PR to NIPA?
Note that the code is copied 3 times for each flavor of building :(

  reply	other threads:[~2024-08-08 14:17 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-30 20:39 [PATCH v3 00/12] net: introduce TX H/W shaping API Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 01/12] tools: ynl: lift an assumption about spec file name Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 02/12] netlink: spec: add shaper YAML spec Paolo Abeni
2024-07-31 21:13   ` Donald Hunter
2024-08-01 14:31     ` Paolo Abeni
2024-08-02 10:57       ` Jiri Pirko
2024-08-02 11:15       ` Donald Hunter
2024-08-05 14:35         ` Paolo Abeni
2024-08-05 20:37           ` Jakub Kicinski
2024-08-01 13:10   ` Jiri Pirko
2024-08-01 14:40     ` Jakub Kicinski
2024-08-01 15:12     ` Paolo Abeni
2024-08-02 10:49       ` Jiri Pirko
2024-08-05 15:11         ` Paolo Abeni
2024-08-06  7:06           ` Jiri Pirko
2024-08-12 14:58             ` Paolo Abeni
2024-08-12 15:25               ` Jakub Kicinski
2024-08-12 16:50                 ` Jiri Pirko
2024-08-12 17:42                   ` Jakub Kicinski
2024-08-13  5:38                     ` Jiri Pirko
2024-08-13 14:12                       ` Jakub Kicinski
2024-08-13 14:47                         ` Paolo Abeni
2024-08-13 14:58                           ` Jakub Kicinski
2024-08-13 15:31                             ` Paolo Abeni
2024-08-13 15:43                               ` Jakub Kicinski
2024-08-14  8:56                           ` Donald Hunter
2024-08-13 17:12                 ` Donald Hunter
2024-08-14 14:21                   ` Paolo Abeni
2024-08-15  9:07                     ` Donald Hunter
2024-08-02 11:19   ` Jiri Pirko
2024-08-02 11:26   ` Jiri Pirko
2024-08-02 16:04   ` Jiri Pirko
2024-07-30 20:39 ` [PATCH v3 03/12] net-shapers: implement NL get operation Paolo Abeni
2024-08-01 13:42   ` Jiri Pirko
2024-08-13 15:17     ` Paolo Abeni
2024-08-14  8:37       ` Jiri Pirko
2024-08-16  8:52         ` Paolo Abeni
2024-08-16  9:16           ` Jiri Pirko
2024-08-19  9:33             ` Paolo Abeni
2024-08-19 11:53               ` Jiri Pirko
2024-08-19 16:52                 ` Paolo Abeni
2024-08-22 12:02                   ` Jiri Pirko
2024-08-22 14:41                     ` Jakub Kicinski
2024-08-22 20:30                       ` Paolo Abeni
2024-08-22 22:56                         ` Jakub Kicinski
2024-08-23 11:50                           ` Jiri Pirko
2024-08-23 12:58                             ` Paolo Abeni
2024-08-23 13:36                               ` Jiri Pirko
2024-08-23 14:23                                 ` Paolo Abeni
2024-08-26  9:31                                   ` Jiri Pirko
2024-08-27 14:37                                     ` Paolo Abeni
2024-08-27 14:54                                       ` Jakub Kicinski
2024-08-27 20:43                                         ` Paolo Abeni
2024-08-27 21:03                                           ` Jakub Kicinski
2024-08-27 21:54                                             ` Paolo Abeni
2024-08-28  6:40                                               ` Jiri Pirko
2024-08-28 10:55                                                 ` Paolo Abeni
2024-08-28 13:02                                                   ` Jiri Pirko
2024-08-28 20:30                                                   ` Jakub Kicinski
2024-08-28 21:13                                                     ` Paolo Abeni
2024-08-29 11:45                                                       ` Jiri Pirko
2024-08-01 15:09   ` Jakub Kicinski
2024-08-02 11:53   ` Jiri Pirko
2024-07-30 20:39 ` [PATCH v3 04/12] net-shapers: implement NL set and delete operations Paolo Abeni
2024-08-01 15:00   ` Jakub Kicinski
2024-08-01 15:25     ` Paolo Abeni
2024-08-01 15:39       ` Jakub Kicinski
2024-08-02 16:15         ` Jiri Pirko
2024-08-02 22:01           ` Jakub Kicinski
2024-08-05 15:23           ` Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 05/12] net-shapers: implement NL group operation Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 06/12] netlink: spec: add shaper introspection support Paolo Abeni
2024-08-02 11:21   ` Donald Hunter
2024-07-30 20:39 ` [PATCH v3 07/12] net: shaper: implement " Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 08/12] testing: net-drv: add basic shaper test Paolo Abeni
2024-07-31  7:52   ` Paolo Abeni
2024-08-01  1:55     ` Jakub Kicinski
2024-08-05 14:22       ` Simon Horman
2024-08-05 19:36         ` Jakub Kicinski
2024-08-06 15:21           ` Simon Horman
2024-08-08 12:20             ` Simon Horman
2024-08-08 14:17               ` Jakub Kicinski [this message]
2024-08-08 14:34                 ` Simon Horman
2024-08-11 12:40                   ` Simon Horman
2024-08-12 15:31                     ` Jakub Kicinski
2024-08-12 16:03                 ` Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 09/12] virtchnl: support queue rate limit and quanta size configuration Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 10/12] ice: Support VF " Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 11/12] iavf: Add net_shaper_ops support Paolo Abeni
2024-07-30 20:39 ` [PATCH v3 12/12] iavf: add support to exchange qos capabilities Paolo Abeni
2024-08-01 12:57 ` [PATCH v3 00/12] net: introduce TX H/W shaping API Jiri Pirko

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=20240808071754.72be6896@kernel.org \
    --to=kuba@kernel.org \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=madhu.chittim@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sgoutham@marvell.com \
    --cc=sridhar.samudrala@intel.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
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.