From: kbuild test robot <lkp@intel.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>, Eric Dumazet <edumazet@google.com>,
Ivan Vecera <ivecera@redhat.com>
Subject: Re: [PATCH net-next 3/5] net: sched: always do stats accounting according to TCQ_F_CPUSTATS
Date: Tue, 9 Apr 2019 17:50:43 +0800 [thread overview]
Message-ID: <201904091725.rTc8LsuA%lkp@intel.com> (raw)
In-Reply-To: <4dfa606e376f151b283df1813faac360c9c78005.1554740883.git.pabeni@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 9347 bytes --]
Hi Paolo,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
url: https://github.com/0day-ci/linux/commits/Paolo-Abeni/net-caif-avoid-using-qdisc_qlen/20190409-164620
config: i386-randconfig-x077-201914 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
In file included from include/linux/filter.h:24:0,
from include/net/sock.h:64,
from net//vmw_vsock/af_vsock.c:118:
include/net/sch_generic.h: In function 'qdisc_all_tx_empty':
>> include/net/sch_generic.h:743:8: error: implicit declaration of function 'qdisc_is_empty'; did you mean 'ida_is_empty'? [-Werror=implicit-function-declaration]
if (!qdisc_is_empty(q)) {
^~~~~~~~~~~~~~
ida_is_empty
include/net/sch_generic.h: At top level:
>> include/net/sch_generic.h:818:20: error: conflicting types for 'qdisc_is_empty'
static inline bool qdisc_is_empty(const struct Qdisc *qdisc)
^~~~~~~~~~~~~~
include/net/sch_generic.h:743:8: note: previous implicit declaration of 'qdisc_is_empty' was here
if (!qdisc_is_empty(q)) {
^~~~~~~~~~~~~~
cc1: some warnings being treated as errors
--
In file included from include/linux/filter.h:24:0,
from include/net/sock.h:64,
from include/net/inet_sock.h:26,
from include/net/inet_connection_sock.h:24,
from include/linux/dccp.h:13,
from net//dccp/proto.c:12:
include/net/sch_generic.h: In function 'qdisc_all_tx_empty':
>> include/net/sch_generic.h:743:8: error: implicit declaration of function 'qdisc_is_empty'; did you mean 'ida_is_empty'? [-Werror=implicit-function-declaration]
if (!qdisc_is_empty(q)) {
^~~~~~~~~~~~~~
ida_is_empty
include/net/sch_generic.h: At top level:
>> include/net/sch_generic.h:818:20: error: conflicting types for 'qdisc_is_empty'
static inline bool qdisc_is_empty(const struct Qdisc *qdisc)
^~~~~~~~~~~~~~
include/net/sch_generic.h:743:8: note: previous implicit declaration of 'qdisc_is_empty' was here
if (!qdisc_is_empty(q)) {
^~~~~~~~~~~~~~
In file included from net//dccp/trace.h:84:0,
from net//dccp/proto.c:42:
include/trace/define_trace.h:89:42: fatal error: ./trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
cc1: some warnings being treated as errors
compilation terminated.
vim +743 include/net/sch_generic.h
5aa709954 David S. Miller 2008-07-08 732
3e745dd69 David S. Miller 2008-07-08 733 /* Are all TX queues of the device empty? */
3e745dd69 David S. Miller 2008-07-08 734 static inline bool qdisc_all_tx_empty(const struct net_device *dev)
3e745dd69 David S. Miller 2008-07-08 735 {
e8a0464cc David S. Miller 2008-07-17 736 unsigned int i;
46e5da40a John Fastabend 2014-09-12 737
46e5da40a John Fastabend 2014-09-12 738 rcu_read_lock();
e8a0464cc David S. Miller 2008-07-17 739 for (i = 0; i < dev->num_tx_queues; i++) {
e8a0464cc David S. Miller 2008-07-17 740 struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
46e5da40a John Fastabend 2014-09-12 741 const struct Qdisc *q = rcu_dereference(txq->qdisc);
3e745dd69 David S. Miller 2008-07-08 742
630dee66e Paolo Abeni 2019-04-08 @743 if (!qdisc_is_empty(q)) {
46e5da40a John Fastabend 2014-09-12 744 rcu_read_unlock();
e8a0464cc David S. Miller 2008-07-17 745 return false;
e8a0464cc David S. Miller 2008-07-17 746 }
46e5da40a John Fastabend 2014-09-12 747 }
46e5da40a John Fastabend 2014-09-12 748 rcu_read_unlock();
e8a0464cc David S. Miller 2008-07-17 749 return true;
3e745dd69 David S. Miller 2008-07-08 750 }
3e745dd69 David S. Miller 2008-07-08 751
6fa9864b5 David S. Miller 2008-07-08 752 /* Are any of the TX qdiscs changing? */
05bdd2f14 Eric Dumazet 2011-10-20 753 static inline bool qdisc_tx_changing(const struct net_device *dev)
6fa9864b5 David S. Miller 2008-07-08 754 {
e8a0464cc David S. Miller 2008-07-17 755 unsigned int i;
46e5da40a John Fastabend 2014-09-12 756
e8a0464cc David S. Miller 2008-07-17 757 for (i = 0; i < dev->num_tx_queues; i++) {
e8a0464cc David S. Miller 2008-07-17 758 struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
46e5da40a John Fastabend 2014-09-12 759 if (rcu_access_pointer(txq->qdisc) != txq->qdisc_sleeping)
e8a0464cc David S. Miller 2008-07-17 760 return true;
e8a0464cc David S. Miller 2008-07-17 761 }
e8a0464cc David S. Miller 2008-07-17 762 return false;
6fa9864b5 David S. Miller 2008-07-08 763 }
6fa9864b5 David S. Miller 2008-07-08 764
e8a0464cc David S. Miller 2008-07-17 765 /* Is the device using the noop qdisc on all queues? */
052979499 David S. Miller 2008-07-08 766 static inline bool qdisc_tx_is_noop(const struct net_device *dev)
052979499 David S. Miller 2008-07-08 767 {
e8a0464cc David S. Miller 2008-07-17 768 unsigned int i;
46e5da40a John Fastabend 2014-09-12 769
e8a0464cc David S. Miller 2008-07-17 770 for (i = 0; i < dev->num_tx_queues; i++) {
e8a0464cc David S. Miller 2008-07-17 771 struct netdev_queue *txq = netdev_get_tx_queue(dev, i);
46e5da40a John Fastabend 2014-09-12 772 if (rcu_access_pointer(txq->qdisc) != &noop_qdisc)
e8a0464cc David S. Miller 2008-07-17 773 return false;
e8a0464cc David S. Miller 2008-07-17 774 }
e8a0464cc David S. Miller 2008-07-17 775 return true;
052979499 David S. Miller 2008-07-08 776 }
052979499 David S. Miller 2008-07-08 777
bfe0d0298 Eric Dumazet 2011-01-09 778 static inline unsigned int qdisc_pkt_len(const struct sk_buff *skb)
0abf77e55 Jussi Kivilinna 2008-07-20 779 {
175f9c1bb Jussi Kivilinna 2008-07-20 780 return qdisc_skb_cb(skb)->pkt_len;
0abf77e55 Jussi Kivilinna 2008-07-20 781 }
0abf77e55 Jussi Kivilinna 2008-07-20 782
c27f339af Jarek Poplawski 2008-08-04 783 /* additional qdisc xmit flags (NET_XMIT_MASK in linux/netdevice.h) */
378a2f090 Jarek Poplawski 2008-08-04 784 enum net_xmit_qdisc_t {
378a2f090 Jarek Poplawski 2008-08-04 785 __NET_XMIT_STOLEN = 0x00010000,
c27f339af Jarek Poplawski 2008-08-04 786 __NET_XMIT_BYPASS = 0x00020000,
378a2f090 Jarek Poplawski 2008-08-04 787 };
378a2f090 Jarek Poplawski 2008-08-04 788
c27f339af Jarek Poplawski 2008-08-04 789 #ifdef CONFIG_NET_CLS_ACT
378a2f090 Jarek Poplawski 2008-08-04 790 #define net_xmit_drop_count(e) ((e) & __NET_XMIT_STOLEN ? 0 : 1)
378a2f090 Jarek Poplawski 2008-08-04 791 #else
378a2f090 Jarek Poplawski 2008-08-04 792 #define net_xmit_drop_count(e) (1)
378a2f090 Jarek Poplawski 2008-08-04 793 #endif
378a2f090 Jarek Poplawski 2008-08-04 794
a2da570d6 Eric Dumazet 2011-01-20 795 static inline void qdisc_calculate_pkt_len(struct sk_buff *skb,
a2da570d6 Eric Dumazet 2011-01-20 796 const struct Qdisc *sch)
5f86173bd Jussi Kivilinna 2008-07-20 797 {
3a682fbd7 David S. Miller 2008-07-20 798 #ifdef CONFIG_NET_SCHED
a2da570d6 Eric Dumazet 2011-01-20 799 struct qdisc_size_table *stab = rcu_dereference_bh(sch->stab);
a2da570d6 Eric Dumazet 2011-01-20 800
a2da570d6 Eric Dumazet 2011-01-20 801 if (stab)
a2da570d6 Eric Dumazet 2011-01-20 802 __qdisc_calculate_pkt_len(skb, stab);
3a682fbd7 David S. Miller 2008-07-20 803 #endif
a2da570d6 Eric Dumazet 2011-01-20 804 }
a2da570d6 Eric Dumazet 2011-01-20 805
520ac30f4 Eric Dumazet 2016-06-21 806 static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
520ac30f4 Eric Dumazet 2016-06-21 807 struct sk_buff **to_free)
a2da570d6 Eric Dumazet 2011-01-20 808 {
a2da570d6 Eric Dumazet 2011-01-20 809 qdisc_calculate_pkt_len(skb, sch);
520ac30f4 Eric Dumazet 2016-06-21 810 return sch->enqueue(skb, sch, to_free);
5f86173bd Jussi Kivilinna 2008-07-20 811 }
5f86173bd Jussi Kivilinna 2008-07-20 812
22e0f8b93 John Fastabend 2014-09-28 813 static inline bool qdisc_is_percpu_stats(const struct Qdisc *q)
22e0f8b93 John Fastabend 2014-09-28 814 {
22e0f8b93 John Fastabend 2014-09-28 815 return q->flags & TCQ_F_CPUSTATS;
22e0f8b93 John Fastabend 2014-09-28 816 }
bfe0d0298 Eric Dumazet 2011-01-09 817
9cda4ff7e Paolo Abeni 2019-04-08 @818 static inline bool qdisc_is_empty(const struct Qdisc *qdisc)
9cda4ff7e Paolo Abeni 2019-04-08 819 {
9cda4ff7e Paolo Abeni 2019-04-08 820 if (qdisc_is_percpu_stats(qdisc))
9cda4ff7e Paolo Abeni 2019-04-08 821 return qdisc->empty;
9cda4ff7e Paolo Abeni 2019-04-08 822 return !qdisc->q.qlen;
9cda4ff7e Paolo Abeni 2019-04-08 823 }
9cda4ff7e Paolo Abeni 2019-04-08 824
:::::: The code at line 743 was first introduced by commit
:::::: 630dee66e06a4ec68b87f0d1a9959b54b42f8959 net: sched: prefer qdisc_is_empty() over direct qlen access
:::::: TO: Paolo Abeni <pabeni@redhat.com>
:::::: CC: 0day robot <lkp@intel.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 32236 bytes --]
next prev parent reply other threads:[~2019-04-09 9:51 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-08 16:35 [PATCH net-next 0/5] net: sched: move back qlen to per CPU accounting Paolo Abeni
2019-04-08 16:35 ` [PATCH net-next 1/5] net: caif: avoid using qdisc_qlen() Paolo Abeni
2019-04-08 16:35 ` [PATCH net-next 2/5] net: sched: prefer qdisc_is_empty() over direct qlen access Paolo Abeni
2019-04-08 16:35 ` [PATCH net-next 3/5] net: sched: always do stats accounting according to TCQ_F_CPUSTATS Paolo Abeni
2019-04-09 9:50 ` kbuild test robot [this message]
2019-04-09 10:41 ` Paolo Abeni
2019-04-09 10:19 ` kbuild test robot
2019-04-08 16:35 ` [PATCH net-next 4/5] net: sched: when clearing NOLOCK, clear TCQ_F_CPUSTATS, too Paolo Abeni
2019-04-08 16:35 ` [PATCH net-next 5/5] Revert: "net: sched: put back q.qlen into a single location" Paolo Abeni
2019-04-08 21:17 ` Eric Dumazet
2019-04-09 7:52 ` Paolo Abeni
2019-04-09 9:51 ` kbuild test robot
2019-04-09 11:55 ` kbuild 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=201904091725.rTc8LsuA%lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ivecera@redhat.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=xiyou.wangcong@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;
as well as URLs for NNTP newsgroup(s).