netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: yushengjin <yushengjin@uniontech.com>, pablo@netfilter.org
Cc: oe-kbuild-all@lists.linux.dev, kadlec@netfilter.org,
	roopa@nvidia.com, razor@blackwall.org, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
	bridge@lists.linux.dev, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	yushengjin <yushengjin@uniontech.com>
Subject: Re: [PATCH v2] net/bridge: Optimizing read-write locks in ebtables.c
Date: Tue, 24 Sep 2024 15:43:30 +0800	[thread overview]
Message-ID: <202409241543.F99I82u3-lkp@intel.com> (raw)
In-Reply-To: <2860814445452DE8+20240924022437.119730-1-yushengjin@uniontech.com>

Hi yushengjin,

kernel test robot noticed the following build errors:

[auto build test ERROR on netfilter-nf/main]
[also build test ERROR on horms-ipvs/master linus/master v6.11 next-20240924]
[cannot apply to nf-next/master]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/yushengjin/net-bridge-Optimizing-read-write-locks-in-ebtables-c/20240924-102547
base:   https://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf.git main
patch link:    https://lore.kernel.org/r/2860814445452DE8%2B20240924022437.119730-1-yushengjin%40uniontech.com
patch subject: [PATCH v2] net/bridge: Optimizing read-write locks in ebtables.c
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20240924/202409241543.F99I82u3-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240924/202409241543.F99I82u3-lkp@intel.com/reproduce)

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/202409241543.F99I82u3-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/asm-generic/percpu.h:7,
                    from ./arch/sh/include/generated/asm/percpu.h:1,
                    from include/linux/irqflags.h:19,
                    from arch/sh/include/asm/cmpxchg-irq.h:5,
                    from arch/sh/include/asm/cmpxchg.h:20,
                    from arch/sh/include/asm/atomic.h:19,
                    from include/linux/atomic.h:7,
                    from include/asm-generic/bitops/atomic.h:5,
                    from arch/sh/include/asm/bitops.h:23,
                    from include/linux/bitops.h:68,
                    from include/linux/thread_info.h:27,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/sh/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:7,
                    from include/linux/umh.h:4,
                    from include/linux/kmod.h:9,
                    from net/bridge/netfilter/ebtables.c:14:
   net/bridge/netfilter/ebtables.c: In function 'get_counters':
>> net/bridge/netfilter/ebtables.c:1006:30: error: 'ebt_recseq' undeclared (first use in this function); did you mean 'xt_recseq'?
    1006 |                 s = &per_cpu(ebt_recseq, cpu);
         |                              ^~~~~~~~~~
   include/linux/percpu-defs.h:219:54: note: in definition of macro '__verify_pcpu_ptr'
     219 |         const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;    \
         |                                                      ^~~
   include/linux/percpu-defs.h:263:49: note: in expansion of macro 'VERIFY_PERCPU_PTR'
     263 | #define per_cpu_ptr(ptr, cpu)   ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
         |                                                 ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:269:35: note: in expansion of macro 'per_cpu_ptr'
     269 | #define per_cpu(var, cpu)       (*per_cpu_ptr(&(var), cpu))
         |                                   ^~~~~~~~~~~
   net/bridge/netfilter/ebtables.c:1006:22: note: in expansion of macro 'per_cpu'
    1006 |                 s = &per_cpu(ebt_recseq, cpu);
         |                      ^~~~~~~
   net/bridge/netfilter/ebtables.c:1006:30: note: each undeclared identifier is reported only once for each function it appears in
    1006 |                 s = &per_cpu(ebt_recseq, cpu);
         |                              ^~~~~~~~~~
   include/linux/percpu-defs.h:219:54: note: in definition of macro '__verify_pcpu_ptr'
     219 |         const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;    \
         |                                                      ^~~
   include/linux/percpu-defs.h:263:49: note: in expansion of macro 'VERIFY_PERCPU_PTR'
     263 | #define per_cpu_ptr(ptr, cpu)   ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
         |                                                 ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:269:35: note: in expansion of macro 'per_cpu_ptr'
     269 | #define per_cpu(var, cpu)       (*per_cpu_ptr(&(var), cpu))
         |                                   ^~~~~~~~~~~
   net/bridge/netfilter/ebtables.c:1006:22: note: in expansion of macro 'per_cpu'
    1006 |                 s = &per_cpu(ebt_recseq, cpu);
         |                      ^~~~~~~
   net/bridge/netfilter/ebtables.c: In function 'do_replace_finish':
   net/bridge/netfilter/ebtables.c:1111:42: error: 'ebt_recseq' undeclared (first use in this function); did you mean 'xt_recseq'?
    1111 |                 seqcount_t *s = &per_cpu(ebt_recseq, cpu);
         |                                          ^~~~~~~~~~
   include/linux/percpu-defs.h:219:54: note: in definition of macro '__verify_pcpu_ptr'
     219 |         const void __percpu *__vpp_verify = (typeof((ptr) + 0))NULL;    \
         |                                                      ^~~
   include/linux/percpu-defs.h:263:49: note: in expansion of macro 'VERIFY_PERCPU_PTR'
     263 | #define per_cpu_ptr(ptr, cpu)   ({ (void)(cpu); VERIFY_PERCPU_PTR(ptr); })
         |                                                 ^~~~~~~~~~~~~~~~~
   include/linux/percpu-defs.h:269:35: note: in expansion of macro 'per_cpu_ptr'
     269 | #define per_cpu(var, cpu)       (*per_cpu_ptr(&(var), cpu))
         |                                   ^~~~~~~~~~~
   net/bridge/netfilter/ebtables.c:1111:34: note: in expansion of macro 'per_cpu'
    1111 |                 seqcount_t *s = &per_cpu(ebt_recseq, cpu);
         |                                  ^~~~~~~


vim +1006 net/bridge/netfilter/ebtables.c

   987	
   988	
   989	static void get_counters(const struct ebt_counter *oldcounters,
   990				 struct ebt_counter *counters, unsigned int nentries)
   991	{
   992		int i, cpu;
   993		struct ebt_counter *counter_base;
   994		seqcount_t *s;
   995	
   996		/* counters of cpu 0 */
   997		memcpy(counters, oldcounters,
   998		       sizeof(struct ebt_counter) * nentries);
   999	
  1000		/* add other counters to those of cpu 0 */
  1001		for_each_possible_cpu(cpu) {
  1002	
  1003			if (cpu == 0)
  1004				continue;
  1005	
> 1006			s = &per_cpu(ebt_recseq, cpu);
  1007			counter_base = COUNTER_BASE(oldcounters, nentries, cpu);
  1008			for (i = 0; i < nentries; i++) {
  1009				u64 bcnt, pcnt;
  1010				unsigned int start;
  1011	
  1012				do {
  1013					start = read_seqcount_begin(s);
  1014					bcnt = counter_base[i].bcnt;
  1015					pcnt = counter_base[i].pcnt;
  1016				} while (read_seqcount_retry(s, start));
  1017	
  1018				ADD_COUNTER(counters[i], bcnt, pcnt);
  1019				cond_resched();
  1020			}
  1021		}
  1022	}
  1023	

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

  reply	other threads:[~2024-09-24  7:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-24  2:24 [PATCH v2] net/bridge: Optimizing read-write locks in ebtables.c yushengjin
2024-09-24  7:43 ` kernel test robot [this message]
2024-09-24  7:51   ` yushengjin
2024-09-24  8:35 ` kernel test robot

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=202409241543.F99I82u3-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=bridge@lists.linux.dev \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=kadlec@netfilter.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=pabeni@redhat.com \
    --cc=pablo@netfilter.org \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.com \
    --cc=yushengjin@uniontech.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 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).