oe-kbuild-all.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Stefan Roesch <shr@devkernel.io>,
	io-uring@vger.kernel.org, kernel-team@fb.com
Cc: oe-kbuild-all@lists.linux.dev, shr@devkernel.io, axboe@kernel.dk,
	ammarfaizi2@gnuweeb.org, netdev@vger.kernel.org, kuba@kernel.org,
	olivier@trillion01.com
Subject: Re: [PATCH v15 1/7] net: split off __napi_busy_poll from napi_busy_poll
Date: Fri, 9 Jun 2023 03:33:04 +0800	[thread overview]
Message-ID: <202306090341.ShxjwRn1-lkp@intel.com> (raw)
In-Reply-To: <20230608163839.2891748-2-shr@devkernel.io>

Hi Stefan,

kernel test robot noticed the following build warnings:

[auto build test WARNING on f026be0e1e881e3395c3d5418ffc8c2a2203c3f3]

url:    https://github.com/intel-lab-lkp/linux/commits/Stefan-Roesch/net-split-off-__napi_busy_poll-from-napi_busy_poll/20230609-010104
base:   f026be0e1e881e3395c3d5418ffc8c2a2203c3f3
patch link:    https://lore.kernel.org/r/20230608163839.2891748-2-shr%40devkernel.io
patch subject: [PATCH v15 1/7] net: split off __napi_busy_poll from napi_busy_poll
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20230609/202306090341.ShxjwRn1-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout f026be0e1e881e3395c3d5418ffc8c2a2203c3f3
        b4 shazam https://lore.kernel.org/r/20230608163839.2891748-2-shr@devkernel.io
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=alpha olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=alpha SHELL=/bin/bash net/core/

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306090341.ShxjwRn1-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> net/core/dev.c:6182:6: warning: no previous prototype for '__napi_busy_loop' [-Wmissing-prototypes]
    6182 | void __napi_busy_loop(unsigned int napi_id,
         |      ^~~~~~~~~~~~~~~~


vim +/__napi_busy_loop +6182 net/core/dev.c

  6181	
> 6182	void __napi_busy_loop(unsigned int napi_id,
  6183			      bool (*loop_end)(void *, unsigned long),
  6184			      void *loop_end_arg, bool prefer_busy_poll, u16 budget,
  6185			      bool rcu)
  6186	{
  6187		unsigned long start_time = loop_end ? busy_loop_current_time() : 0;
  6188		int (*napi_poll)(struct napi_struct *napi, int budget);
  6189		void *have_poll_lock = NULL;
  6190		struct napi_struct *napi;
  6191	
  6192	restart:
  6193		napi_poll = NULL;
  6194	
  6195		if (!rcu)
  6196			rcu_read_lock();
  6197	
  6198		napi = napi_by_id(napi_id);
  6199		if (!napi)
  6200			goto out;
  6201	
  6202		preempt_disable();
  6203		for (;;) {
  6204			int work = 0;
  6205	
  6206			local_bh_disable();
  6207			if (!napi_poll) {
  6208				unsigned long val = READ_ONCE(napi->state);
  6209	
  6210				/* If multiple threads are competing for this napi,
  6211				 * we avoid dirtying napi->state as much as we can.
  6212				 */
  6213				if (val & (NAPIF_STATE_DISABLE | NAPIF_STATE_SCHED |
  6214					   NAPIF_STATE_IN_BUSY_POLL)) {
  6215					if (prefer_busy_poll)
  6216						set_bit(NAPI_STATE_PREFER_BUSY_POLL, &napi->state);
  6217					goto count;
  6218				}
  6219				if (cmpxchg(&napi->state, val,
  6220					    val | NAPIF_STATE_IN_BUSY_POLL |
  6221						  NAPIF_STATE_SCHED) != val) {
  6222					if (prefer_busy_poll)
  6223						set_bit(NAPI_STATE_PREFER_BUSY_POLL, &napi->state);
  6224					goto count;
  6225				}
  6226				have_poll_lock = netpoll_poll_lock(napi);
  6227				napi_poll = napi->poll;
  6228			}
  6229			work = napi_poll(napi, budget);
  6230			trace_napi_poll(napi, work, budget);
  6231			gro_normal_list(napi);
  6232	count:
  6233			if (work > 0)
  6234				__NET_ADD_STATS(dev_net(napi->dev),
  6235						LINUX_MIB_BUSYPOLLRXPACKETS, work);
  6236			local_bh_enable();
  6237	
  6238			if (!loop_end || loop_end(loop_end_arg, start_time))
  6239				break;
  6240	
  6241			if (unlikely(need_resched())) {
  6242				if (rcu)
  6243					break;
  6244				if (napi_poll)
  6245					busy_poll_stop(napi, have_poll_lock, prefer_busy_poll, budget);
  6246				preempt_enable();
  6247				rcu_read_unlock();
  6248				cond_resched();
  6249				if (loop_end(loop_end_arg, start_time))
  6250					return;
  6251				goto restart;
  6252			}
  6253			cpu_relax();
  6254		}
  6255		if (napi_poll)
  6256			busy_poll_stop(napi, have_poll_lock, prefer_busy_poll, budget);
  6257		preempt_enable();
  6258	out:
  6259		if (!rcu)
  6260			rcu_read_unlock();
  6261	}
  6262	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

           reply	other threads:[~2023-06-08 19:33 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <20230608163839.2891748-2-shr@devkernel.io>]

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=202306090341.ShxjwRn1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ammarfaizi2@gnuweeb.org \
    --cc=axboe@kernel.dk \
    --cc=io-uring@vger.kernel.org \
    --cc=kernel-team@fb.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=olivier@trillion01.com \
    --cc=shr@devkernel.io \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).