From: kernel test robot <lkp@intel.com>
To: Xiaoyong Yan <yanxiaoyong5@gmail.com>,
jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us
Cc: kbuild-all@lists.01.org, davem@davemloft.net,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Xiaoyong Yan <yanxiaoyong5@gmail.com>
Subject: Re: [PATCH] net/sched: cbs: fix calculation error of idleslope credits
Date: Sat, 19 Sep 2020 19:35:32 +0800 [thread overview]
Message-ID: <202009191916.DrTH2ovQ%lkp@intel.com> (raw)
In-Reply-To: <20200918084252.4200-1-yanxiaoyong5@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2796 bytes --]
Hi Xiaoyong,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.9-rc5 next-20200918]
[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]
url: https://github.com/0day-ci/linux/commits/Xiaoyong-Yan/net-sched-cbs-fix-calculation-error-of-idleslope-credits/20200918-164430
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 10b82d5176488acee2820e5a2cf0f2ec5c3488b6
config: h8300-randconfig-m031-20200917 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
smatch warnings:
net/sched/sch_cbs.c:224 cbs_dequeue_soft() warn: inconsistent indenting
# https://github.com/0day-ci/linux/commit/6e3656a6f5879070aaee0343f90e633de7d2d85a
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Xiaoyong-Yan/net-sched-cbs-fix-calculation-error-of-idleslope-credits/20200918-164430
git checkout 6e3656a6f5879070aaee0343f90e633de7d2d85a
vim +224 net/sched/sch_cbs.c
205
206 static struct sk_buff *cbs_dequeue_soft(struct Qdisc *sch)
207 {
208 struct cbs_sched_data *q = qdisc_priv(sch);
209 struct Qdisc *qdisc = q->qdisc;
210 s64 now = ktime_get_ns();
211 struct sk_buff *skb;
212 s64 credits;
213 int len;
214
215 /* The previous packet is still being sent */
216 if (now < q->last) {
217 cbs_timer_schedule(q, q->last);
218 return NULL;
219 }
220 if (q->credits < 0) {
221 s64 delay;
222
223 delay = delay_from_credits(q->credits, q->idleslope);
> 224 cbs_timer_schedule(q, now+ delay);
225 q->last = now;
226
227 return NULL;
228 }
229 skb = cbs_child_dequeue(sch, qdisc);
230 if (!skb)
231 return NULL;
232
233 len = qdisc_pkt_len(skb);
234
235 /* As sendslope is a negative number, this will decrease the
236 * amount of q->credits.
237 */
238 credits = credits_from_len(len, q->sendslope,
239 atomic64_read(&q->port_rate));
240 credits += q->credits;
241
242 q->credits = max_t(s64, credits, q->locredit);
243 /* Estimate of the transmission of the last byte of the packet in ns */
244 if (unlikely(atomic64_read(&q->port_rate) == 0))
245 q->last = now;
246 else
247 q->last = now + div64_s64(len * NSEC_PER_SEC,
248 atomic64_read(&q->port_rate));
249
250 return skb;
251 }
252
---
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: 23901 bytes --]
prev parent reply other threads:[~2020-09-19 11:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-18 8:42 Xiaoyong Yan
2020-09-19 0:50 ` David Miller
2020-09-19 11:35 ` kernel test robot [this message]
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=202009191916.DrTH2ovQ%lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
--cc=yanxiaoyong5@gmail.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
all inboxes | Powered by JetHome®