From: kernel test robot <lkp@intel.com> To: "YU, Xiangning" <xiangning.yu@alibaba-inc.com>, Linux Kernel Network Developers <netdev@vger.kernel.org> Cc: kbuild-all@lists.01.org Subject: Re: [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB) qdisc Date: Thu, 9 Jul 2020 18:19:10 +0800 [thread overview] Message-ID: <202007091828.KTlaLIvZ%lkp@intel.com> (raw) In-Reply-To: <4835f4cb-eee0-81e7-d935-5ad85767802c@alibaba-inc.com> [-- Attachment #1: Type: text/plain, Size: 8350 bytes --] Hi Xiangning", Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/YU-Xiangning/Lockless-Token-Bucket-LTB-Qdisc/20200709-004116 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8cb601f15886f6d05479e46913d954e9ff237312 config: parisc-randconfig-s032-20200709 (attached as .config) compiler: hppa-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.2-37-gc9676a3b-dirty # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> sparse warnings: (new ones prefixed by >>) >> net/sched/sch_ltb.c:231:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ >> net/sched/sch_ltb.c:231:35: sparse: expected void const [noderef] __percpu *__vpp_verify >> net/sched/sch_ltb.c:231:35: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:327:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:327:35: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:327:35: sparse: got struct ltb_pcpu_data * >> net/sched/sch_ltb.c:704:17: sparse: sparse: incompatible types in comparison expression (different address spaces): >> net/sched/sch_ltb.c:704:17: sparse: struct ltb_class [noderef] __rcu * >> net/sched/sch_ltb.c:704:17: sparse: struct ltb_class * net/sched/sch_ltb.c:752:17: sparse: sparse: incompatible types in comparison expression (different address spaces): net/sched/sch_ltb.c:752:17: sparse: struct ltb_class [noderef] __rcu * net/sched/sch_ltb.c:752:17: sparse: struct ltb_class * net/sched/sch_ltb.c:988:16: sparse: sparse: incompatible types in comparison expression (different address spaces): net/sched/sch_ltb.c:988:16: sparse: struct ltb_class [noderef] __rcu * net/sched/sch_ltb.c:988:16: sparse: struct ltb_class * net/sched/sch_ltb.c:1000:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1000:16: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1000:16: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1029:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1029:16: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1029:16: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1047:29: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1047:29: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1047:29: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1072:27: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1072:27: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1072:27: sparse: got struct ltb_pcpu_data * >> net/sched/sch_ltb.c:1080:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __percpu *__pdata @@ got struct ltb_pcpu_data *pcpu_data @@ >> net/sched/sch_ltb.c:1080:24: sparse: expected void [noderef] __percpu *__pdata >> net/sched/sch_ltb.c:1080:24: sparse: got struct ltb_pcpu_data *pcpu_data >> net/sched/sch_ltb.c:1122:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ltb_pcpu_data *pcpu_data @@ got struct ltb_pcpu_data [noderef] __percpu * @@ >> net/sched/sch_ltb.c:1122:24: sparse: expected struct ltb_pcpu_data *pcpu_data >> net/sched/sch_ltb.c:1122:24: sparse: got struct ltb_pcpu_data [noderef] __percpu * net/sched/sch_ltb.c:1141:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1141:17: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1141:17: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1142:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1142:17: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1142:17: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1168:46: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1168:46: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1168:46: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1176:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __percpu *__pdata @@ got struct ltb_pcpu_data *pcpu_data @@ net/sched/sch_ltb.c:1176:32: sparse: expected void [noderef] __percpu *__pdata net/sched/sch_ltb.c:1176:32: sparse: got struct ltb_pcpu_data *pcpu_data vim +231 net/sched/sch_ltb.c 181 182 static int ltb_drain(struct ltb_class *cl) 183 { 184 struct ltb_sched *ltb = qdisc_priv(cl->root_qdisc); 185 struct ltb_pcpu_sched *pcpu_q; 186 bool need_watchdog = false; 187 unsigned int npkts, bytes; 188 unsigned long now = NOW(); 189 struct cpumask cpumask; 190 struct sk_buff *skb; 191 s64 timestamp; 192 int cpu; 193 194 npkts = 0; 195 bytes = 0; 196 cpumask_clear(&cpumask); 197 while (kfifo_peek(&cl->drain_queue, &skb) > 0) { 198 int len = qdisc_pkt_len(skb); 199 200 if (cl->curr_interval != now) { 201 cl->curr_interval = now; 202 timestamp = ktime_get_ns(); 203 cl->bw_measured = (cl->stat_bytes - cl->last_bytes) * 204 NSEC_PER_SEC / (timestamp - cl->last_timestamp); 205 cl->last_bytes = cl->stat_bytes; 206 cl->last_timestamp = timestamp; 207 cl->bw_used = 0; 208 } else if (len + cl->bw_used > cl->maxbw) { 209 need_watchdog = true; 210 break; 211 } 212 kfifo_skip(&cl->drain_queue); 213 cl->bw_used += len; 214 215 /* Fanout */ 216 cpu = ltb_skb_cb(skb)->cpu; 217 ltb_skb_cb(skb)->cpu = 0; 218 if (unlikely(kfifo_put(&cl->fanout_queues[cpu], skb) == 0)) { 219 kfree_skb(skb); 220 atomic64_inc(&cl->stat_drops); 221 } else { 222 /* Account for Generic Segmentation Offload(gso). */ 223 cl->stat_bytes += len; 224 cl->stat_packets += skb_is_gso(skb) ? 225 skb_shinfo(skb)->gso_segs : 1; 226 cpumask_set_cpu(cpu, &cpumask); 227 } 228 } 229 230 for_each_cpu(cpu, &cpumask) { > 231 struct Qdisc *q = per_cpu_ptr(ltb->pcpu_data, cpu)->qdisc; 232 233 pcpu_q = (struct ltb_pcpu_sched *)qdisc_priv(q); 234 if (!(q->state & __QDISC_STATE_SCHED) && !qdisc_is_running(q)) 235 irq_work_queue_on(&pcpu_q->fanout_irq_work, cpu); 236 } 237 238 return need_watchdog; 239 } 240 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org [-- Attachment #2: .config.gz --] [-- Type: application/gzip, Size: 27348 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com> To: kbuild-all@lists.01.org Subject: Re: [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB) qdisc Date: Thu, 09 Jul 2020 18:19:10 +0800 [thread overview] Message-ID: <202007091828.KTlaLIvZ%lkp@intel.com> (raw) In-Reply-To: <4835f4cb-eee0-81e7-d935-5ad85767802c@alibaba-inc.com> [-- Attachment #1: Type: text/plain, Size: 8488 bytes --] Hi Xiangning", Thank you for the patch! Perhaps something to improve: [auto build test WARNING on net-next/master] url: https://github.com/0day-ci/linux/commits/YU-Xiangning/Lockless-Token-Bucket-LTB-Qdisc/20200709-004116 base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 8cb601f15886f6d05479e46913d954e9ff237312 config: parisc-randconfig-s032-20200709 (attached as .config) compiler: hppa-linux-gcc (GCC) 9.3.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # apt-get install sparse # sparse version: v0.6.2-37-gc9676a3b-dirty # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@intel.com> sparse warnings: (new ones prefixed by >>) >> net/sched/sch_ltb.c:231:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ >> net/sched/sch_ltb.c:231:35: sparse: expected void const [noderef] __percpu *__vpp_verify >> net/sched/sch_ltb.c:231:35: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:327:35: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:327:35: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:327:35: sparse: got struct ltb_pcpu_data * >> net/sched/sch_ltb.c:704:17: sparse: sparse: incompatible types in comparison expression (different address spaces): >> net/sched/sch_ltb.c:704:17: sparse: struct ltb_class [noderef] __rcu * >> net/sched/sch_ltb.c:704:17: sparse: struct ltb_class * net/sched/sch_ltb.c:752:17: sparse: sparse: incompatible types in comparison expression (different address spaces): net/sched/sch_ltb.c:752:17: sparse: struct ltb_class [noderef] __rcu * net/sched/sch_ltb.c:752:17: sparse: struct ltb_class * net/sched/sch_ltb.c:988:16: sparse: sparse: incompatible types in comparison expression (different address spaces): net/sched/sch_ltb.c:988:16: sparse: struct ltb_class [noderef] __rcu * net/sched/sch_ltb.c:988:16: sparse: struct ltb_class * net/sched/sch_ltb.c:1000:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1000:16: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1000:16: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1029:16: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1029:16: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1029:16: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1047:29: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1047:29: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1047:29: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1072:27: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1072:27: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1072:27: sparse: got struct ltb_pcpu_data * >> net/sched/sch_ltb.c:1080:24: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __percpu *__pdata @@ got struct ltb_pcpu_data *pcpu_data @@ >> net/sched/sch_ltb.c:1080:24: sparse: expected void [noderef] __percpu *__pdata >> net/sched/sch_ltb.c:1080:24: sparse: got struct ltb_pcpu_data *pcpu_data >> net/sched/sch_ltb.c:1122:24: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct ltb_pcpu_data *pcpu_data @@ got struct ltb_pcpu_data [noderef] __percpu * @@ >> net/sched/sch_ltb.c:1122:24: sparse: expected struct ltb_pcpu_data *pcpu_data >> net/sched/sch_ltb.c:1122:24: sparse: got struct ltb_pcpu_data [noderef] __percpu * net/sched/sch_ltb.c:1141:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1141:17: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1141:17: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1142:17: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1142:17: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1142:17: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1168:46: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct ltb_pcpu_data * @@ net/sched/sch_ltb.c:1168:46: sparse: expected void const [noderef] __percpu *__vpp_verify net/sched/sch_ltb.c:1168:46: sparse: got struct ltb_pcpu_data * net/sched/sch_ltb.c:1176:32: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void [noderef] __percpu *__pdata @@ got struct ltb_pcpu_data *pcpu_data @@ net/sched/sch_ltb.c:1176:32: sparse: expected void [noderef] __percpu *__pdata net/sched/sch_ltb.c:1176:32: sparse: got struct ltb_pcpu_data *pcpu_data vim +231 net/sched/sch_ltb.c 181 182 static int ltb_drain(struct ltb_class *cl) 183 { 184 struct ltb_sched *ltb = qdisc_priv(cl->root_qdisc); 185 struct ltb_pcpu_sched *pcpu_q; 186 bool need_watchdog = false; 187 unsigned int npkts, bytes; 188 unsigned long now = NOW(); 189 struct cpumask cpumask; 190 struct sk_buff *skb; 191 s64 timestamp; 192 int cpu; 193 194 npkts = 0; 195 bytes = 0; 196 cpumask_clear(&cpumask); 197 while (kfifo_peek(&cl->drain_queue, &skb) > 0) { 198 int len = qdisc_pkt_len(skb); 199 200 if (cl->curr_interval != now) { 201 cl->curr_interval = now; 202 timestamp = ktime_get_ns(); 203 cl->bw_measured = (cl->stat_bytes - cl->last_bytes) * 204 NSEC_PER_SEC / (timestamp - cl->last_timestamp); 205 cl->last_bytes = cl->stat_bytes; 206 cl->last_timestamp = timestamp; 207 cl->bw_used = 0; 208 } else if (len + cl->bw_used > cl->maxbw) { 209 need_watchdog = true; 210 break; 211 } 212 kfifo_skip(&cl->drain_queue); 213 cl->bw_used += len; 214 215 /* Fanout */ 216 cpu = ltb_skb_cb(skb)->cpu; 217 ltb_skb_cb(skb)->cpu = 0; 218 if (unlikely(kfifo_put(&cl->fanout_queues[cpu], skb) == 0)) { 219 kfree_skb(skb); 220 atomic64_inc(&cl->stat_drops); 221 } else { 222 /* Account for Generic Segmentation Offload(gso). */ 223 cl->stat_bytes += len; 224 cl->stat_packets += skb_is_gso(skb) ? 225 skb_shinfo(skb)->gso_segs : 1; 226 cpumask_set_cpu(cpu, &cpumask); 227 } 228 } 229 230 for_each_cpu(cpu, &cpumask) { > 231 struct Qdisc *q = per_cpu_ptr(ltb->pcpu_data, cpu)->qdisc; 232 233 pcpu_q = (struct ltb_pcpu_sched *)qdisc_priv(q); 234 if (!(q->state & __QDISC_STATE_SCHED) && !qdisc_is_running(q)) 235 irq_work_queue_on(&pcpu_q->fanout_irq_work, cpu); 236 } 237 238 return need_watchdog; 239 } 240 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org [-- Attachment #2: config.gz --] [-- Type: application/gzip, Size: 27348 bytes --]
next prev parent reply other threads:[~2020-07-09 10:46 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-08 16:38 [PATCH net-next v2 2/2] net: sched: Lockless Token Bucket (LTB) qdisc YU, Xiangning 2020-07-08 16:47 ` Randy Dunlap 2020-07-08 21:14 ` Eric Dumazet 2020-07-08 21:38 ` YU, Xiangning 2020-07-08 21:37 ` Eric Dumazet 2020-07-08 22:01 ` YU, Xiangning 2020-07-08 22:08 ` Eric Dumazet 2020-07-08 22:29 ` Eric Dumazet 2020-07-08 23:59 ` YU, Xiangning 2020-07-09 0:08 ` Eric Dumazet 2020-07-09 0:58 ` YU, Xiangning 2020-07-09 1:24 ` Eric Dumazet 2020-07-09 17:04 ` YU, Xiangning 2020-07-09 17:15 ` Eric Dumazet 2020-07-09 18:20 ` YU, Xiangning 2020-07-09 22:22 ` Eric Dumazet 2020-07-10 1:42 ` YU, Xiangning 2020-07-09 10:19 ` kernel test robot [this message] 2020-07-09 10:19 ` kernel test robot 2020-08-04 10:37 ` Maxim Mikityanskiy 2020-08-04 21:27 ` YU, Xiangning
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=202007091828.KTlaLIvZ%lkp@intel.com \ --to=lkp@intel.com \ --cc=kbuild-all@lists.01.org \ --cc=netdev@vger.kernel.org \ --cc=xiangning.yu@alibaba-inc.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: linkBe 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.