From: kernel test robot <lkp@intel.com>
To: Gaurav Singh <gaurav1086@gmail.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
"open list:TC subsystem" <netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
netdev@vger.kernel.org
Subject: Re: [PATCH] [net/sched]: Remove redundant condition in qdisc_graft
Date: Thu, 18 Jun 2020 14:05:36 +0800 [thread overview]
Message-ID: <202006181358.FcHHxOTA%lkp@intel.com> (raw)
In-Reply-To: <20200618005526.27101-1-gaurav1086@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4398 bytes --]
Hi Gaurav,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.8-rc1 next-20200617]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Gaurav-Singh/Remove-redundant-condition-in-qdisc_graft/20200618-085703
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 1b5044021070efa3259f3e9548dc35d1eb6aa844
config: s390-randconfig-r016-20200618 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 487ca07fcc75d52755c9fe2ee05bcb3b6eeeec44)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install s390 cross compiling tool for clang build
# apt-get install binutils-s390-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
vim +1097 net/sched/sch_api.c
1019
1020 /* Graft qdisc "new" to class "classid" of qdisc "parent" or
1021 * to device "dev".
1022 *
1023 * When appropriate send a netlink notification using 'skb'
1024 * and "n".
1025 *
1026 * On success, destroy old qdisc.
1027 */
1028
1029 static int qdisc_graft(struct net_device *dev, struct Qdisc *parent,
1030 struct sk_buff *skb, struct nlmsghdr *n, u32 classid,
1031 struct Qdisc *new, struct Qdisc *old,
1032 struct netlink_ext_ack *extack)
1033 {
1034 struct Qdisc *q = old;
1035 struct net *net = dev_net(dev);
1036
1037 if (parent == NULL) {
1038 unsigned int i, num_q, ingress;
1039
1040 ingress = 0;
1041 num_q = dev->num_tx_queues;
1042 if ((q && q->flags & TCQ_F_INGRESS) ||
1043 (new && new->flags & TCQ_F_INGRESS)) {
1044 num_q = 1;
1045 ingress = 1;
1046 if (!dev_ingress_queue(dev)) {
1047 NL_SET_ERR_MSG(extack, "Device does not have an ingress queue");
1048 return -ENOENT;
1049 }
1050 }
1051
1052 if (dev->flags & IFF_UP)
1053 dev_deactivate(dev);
1054
1055 qdisc_offload_graft_root(dev, new, old, extack);
1056
1057 if (new && new->ops->attach)
1058 goto skip;
1059
1060 for (i = 0; i < num_q; i++) {
1061 struct netdev_queue *dev_queue = dev_ingress_queue(dev);
1062
1063 if (!ingress)
1064 dev_queue = netdev_get_tx_queue(dev, i);
1065
1066 old = dev_graft_qdisc(dev_queue, new);
1067 if (new && i > 0)
1068 qdisc_refcount_inc(new);
1069
1070 if (!ingress)
1071 qdisc_put(old);
1072 }
1073
1074 skip:
1075 if (!ingress) {
1076 notify_and_destroy(net, skb, n, classid,
1077 dev->qdisc, new);
1078 if (new && !new->ops->attach)
1079 qdisc_refcount_inc(new);
1080 dev->qdisc = new ? : &noop_qdisc;
1081
1082 if (new && new->ops->attach)
1083 new->ops->attach(new);
1084 } else {
1085 notify_and_destroy(net, skb, n, classid, old, new);
1086 }
1087
1088 if (dev->flags & IFF_UP)
1089 dev_activate(dev);
1090 } else {
1091 const struct Qdisc_class_ops *cops = parent->ops->cl_ops;
1092 unsigned long cl;
1093 int err;
1094
1095 /* Only support running class lockless if parent is lockless */
1096 if (new && (new->flags & TCQ_F_NOLOCK) &&
> 1097 && !(parent->flags & TCQ_F_NOLOCK))
1098 qdisc_clear_nolock(new);
1099
1100 if (!cops || !cops->graft)
1101 return -EOPNOTSUPP;
1102
1103 cl = cops->find(parent, classid);
1104 if (!cl) {
1105 NL_SET_ERR_MSG(extack, "Specified class not found");
1106 return -ENOENT;
1107 }
1108
1109 err = cops->graft(parent, cl, new, &old, extack);
1110 if (err)
1111 return err;
1112 notify_and_destroy(net, skb, n, classid, old, new);
1113 }
1114 return 0;
1115 }
1116
---
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: 21348 bytes --]
prev parent reply other threads:[~2020-06-18 6:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-18 0:55 [PATCH] [net/sched]: Remove redundant condition in qdisc_graft Gaurav Singh
2020-06-18 1:14 ` Jakub Kicinski
2020-06-18 1:23 ` Gaurav Singh
2020-06-18 3:43 ` Eric Dumazet
2020-06-18 4:00 ` Gaurav Singh
2020-06-18 14:53 ` David Miller
2020-06-18 20:36 ` Gaurav Singh
2020-06-21 0:30 ` David Miller
2020-06-18 6:05 ` 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=202006181358.FcHHxOTA%lkp@intel.com \
--to=lkp@intel.com \
--cc=clang-built-linux@googlegroups.com \
--cc=davem@davemloft.net \
--cc=gaurav1086@gmail.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kbuild-all@lists.01.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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